From f5faa8ce41270f287e21283eaa92241c6719332e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20=C3=81lvarez?= Date: Mon, 9 Sep 2019 13:11:34 +0200 Subject: [PATCH] first errors with Classic, CURRENCY_DISPLAY_UPDATE, SetMerchantFilter and C_Heirloom doesn't exists --- Init.lua | 3 --- KnownScanner.lua | 7 +------ frames/MainFrame.lua | 1 - frames/MerchantItem.lua | 7 ------- 4 files changed, 1 insertion(+), 17 deletions(-) diff --git a/Init.lua b/Init.lua index 8954c97..189c775 100644 --- a/Init.lua +++ b/Init.lua @@ -25,9 +25,6 @@ function ns.OnLoad() MerchantBuyBackItem:ClearAllPoints() MerchantBuyBackItem:SetPoint("BOTTOMRIGHT", -7, 33) - -- The little class select dropdown show trigget a refresh - hooksecurefunc("SetMerchantFilter", function() GVS:GetScript("OnShow")(GVS) end) - -- Force show when we're loaded on demand and the tab is already selected if MerchantFrame:IsVisible() and MerchantFrame.selectedTab == 1 then GVS:Show() diff --git a/KnownScanner.lua b/KnownScanner.lua index 7740f4e..1f2692e 100644 --- a/KnownScanner.lua +++ b/KnownScanner.lua @@ -2,11 +2,6 @@ local myname, ns = ... -local function HasHeirloom(id) - return C_Heirloom.IsItemHeirloom(id) and C_Heirloom.PlayerHasHeirloom(id) -end - - local function IsKnown(link) ns.scantip:SetHyperlink(link) for i=1,ns.scantip:NumLines() do @@ -20,7 +15,7 @@ ns.knowns = setmetatable({}, { local id = ns.ids[i] if not id then return end - if HasHeirloom(id) or IsKnown(i) then + if IsKnown(i) then t[i] = true return true end diff --git a/frames/MainFrame.lua b/frames/MainFrame.lua index b583a22..a47d339 100644 --- a/frames/MainFrame.lua +++ b/frames/MainFrame.lua @@ -70,7 +70,6 @@ function ns.NewMainFrame() GVS:RegisterEvent("BAG_UPDATE") GVS:RegisterEvent("MERCHANT_UPDATE") - GVS:RegisterEvent("CURRENCY_DISPLAY_UPDATE") end) GVS:SetScript("OnHide", GVS.UnregisterAllEvents) diff --git a/frames/MerchantItem.lua b/frames/MerchantItem.lua index 2686a1a..2c0a009 100644 --- a/frames/MerchantItem.lua +++ b/frames/MerchantItem.lua @@ -27,14 +27,7 @@ local function HasAllCommonBarterItems(index) end -local function IsHeirloom(index) - local id = GetMerchantItemID(index) - return id and C_Heirloom.IsItemHeirloom(id) -end - - local function RequiresConfirmation(index) - if IsHeirloom(index) then return true end if not HasAllCommonBarterItems(index) then return true end end