2009-08-16 01:42:06 +00:00
|
|
|
|
2010-05-02 22:20:55 +00:00
|
|
|
local myname, ns = ...
|
|
|
|
|
2009-08-16 01:42:06 +00:00
|
|
|
local tip = CreateFrame("GameTooltip")
|
|
|
|
tip:SetOwner(WorldFrame, "ANCHOR_NONE")
|
|
|
|
|
|
|
|
local lcache = {}
|
2009-10-17 03:53:57 +00:00
|
|
|
for i=1,40 do
|
2009-08-16 01:42:06 +00:00
|
|
|
lcache[i] = tip:CreateFontString()
|
|
|
|
tip:AddFontStrings(lcache[i], tip:CreateFontString())
|
|
|
|
end
|
|
|
|
|
2010-05-02 22:20:55 +00:00
|
|
|
ns.knowns = setmetatable({}, {__index = function(t, i)
|
2009-08-16 01:42:06 +00:00
|
|
|
tip:ClearLines()
|
|
|
|
if not tip:IsOwned(WorldFrame) then tip:SetOwner(WorldFrame, "ANCHOR_NONE") end
|
|
|
|
tip:SetHyperlink(i)
|
|
|
|
for i=1,tip:NumLines() do
|
|
|
|
if lcache[i]:GetText() == ITEM_SPELL_KNOWN then
|
|
|
|
t[i] = true
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end})
|