first errors with Classic, CURRENCY_DISPLAY_UPDATE, SetMerchantFilter and C_Heirloom doesn't exists
This commit is contained in:
parent
fea1948f74
commit
f5faa8ce41
3
Init.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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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…
Reference in New Issue