From eaf9b759b5f0cd1e37e66e14048251968fda02ba Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 21 Jul 2018 01:18:57 +0200 Subject: [PATCH 1/2] Fixed invisible name in patch 8.0 --- frames/MerchantItem.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frames/MerchantItem.lua b/frames/MerchantItem.lua index 2686a1a..8eb5f2f 100644 --- a/frames/MerchantItem.lua +++ b/frames/MerchantItem.lua @@ -136,6 +136,11 @@ local function SetValue(self, i) self.ItemName:SetText(text) self.AltCurrency:SetValue(i) + if self.AltCurrency:IsShown() then + self.ItemName:SetPoint("RIGHT", self.AltCurrency, "LEFT", -GAP, 0) + else + self.ItemName:SetPoint("RIGHT", self.ItemPrice, "LEFT", -GAP, 0) + end if extendedCost then self.link, self.texture, self.extendedCost = link, itemTexture, true From a10ccd6ed7f4ffb1cdb910718bd70e7870ad9ba0 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 21 Jul 2018 01:19:10 +0200 Subject: [PATCH 2/2] Fixed scoll reset when buying item --- Init.lua | 8 +++++++- frames/MainFrame.lua | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Init.lua b/Init.lua index 8954c97..a4fb956 100644 --- a/Init.lua +++ b/Init.lua @@ -26,7 +26,13 @@ function ns.OnLoad() MerchantBuyBackItem:SetPoint("BOTTOMRIGHT", -7, 33) -- The little class select dropdown show trigget a refresh - hooksecurefunc("SetMerchantFilter", function() GVS:GetScript("OnShow")(GVS) end) + hooksecurefunc("SetMerchantFilter", function() + if GVS.Merchant ~= UnitGUID("npc") then + GVS:GetScript("OnShow")(GVS) + else + GVS:GetScript("OnEvent")(GVS) + end + end) -- Force show when we're loaded on demand and the tab is already selected if MerchantFrame:IsVisible() and MerchantFrame.selectedTab == 1 then diff --git a/frames/MainFrame.lua b/frames/MainFrame.lua index b583a22..2bdc674 100644 --- a/frames/MainFrame.lua +++ b/frames/MainFrame.lua @@ -63,6 +63,7 @@ function ns.NewMainFrame() end) GVS:SetScript("OnEvent", Refresh) GVS:SetScript("OnShow", function(self) + self.Merchant = UnitGUID("npc") local max = math.max(0, GetMerchantNumItems() - NUMROWS) scrollbar:SetMinMaxValues(0, max) scrollbar:SetValue(0)