WoW Classic Addon - Compact scrolling vendor frame. Fork of https://github.com/TekNoLogic/GnomishVendorShrinker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
801 B

local myname, ns = ...
local function IsKnown(link)
ns.scantip:SetHyperlink(link)
for i=1,ns.scantip:NumLines() do
if ns.scantip.L[i] == ITEM_SPELL_KNOWN then return true end
end
end
ns.knowns = setmetatable({}, {
__index = function(t, i)
local id = ns.ids[i]
if not id then return end
if IsKnown(i) then
t[i] = true
return true
end
end
})
-- "Requires Previous Rank"
local PREV_RANK = TOOLTIP_SUPERCEDING_SPELL_NOT_KNOWN
local function NeedsRank(link)
ns.scantip:SetHyperlink(link)
for i=1,ns.scantip:NumLines() do
if ns.scantip.L[i] == PREV_RANK then return true end
end
end
ns.unmet_requirements = setmetatable({}, {
__index = function(t, i)
local id = ns.ids[i]
if not id then return end
if NeedsRank(i) then
t[i] = true
return true
end
end
})