Browse Source

first errors with Classic, CURRENCY_DISPLAY_UPDATE, SetMerchantFilter and C_Heirloom doesn't exists

master
Sergio Álvarez 2 years ago
parent
commit
f5faa8ce41
  1. 3
      Init.lua
  2. 7
      KnownScanner.lua
  3. 1
      frames/MainFrame.lua
  4. 7
      frames/MerchantItem.lua

3
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()

7
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

1
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)

7
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

Loading…
Cancel
Save