PHP код:
do
local f = CreateFrame('frame',nil,UIParent)
f:RegisterEvent("VARIABLES_LOADED")
f:SetScript("OnEvent",function()
local w = AtlasLootWishList
if not w then return else w = w.Own[UnitName("player")] end
if w then
local function c(f,id)
for _,l in ipairs(w) do
for _,v in ipairs(l) do
if id == v[2] then
f:SetBackdropColor(.4,.6,.4,.7)
f:SetBackdropBorderColor(.8,.3,.3,1)
f:AddLine("AtlasLootWishList: ".. l.info[1].." |T"..l.info[3]..":22|t")
f:Show()
return
end
end
end
end
hooksecurefunc("SetItemRef", function(link)
if string.find(link,"^item:") then c(ItemRefTooltip,tonumber(string.sub(link,6):match('(%d+)'))) end
end)
GameTooltip:HookScript("OnTooltipSetItem", function(self)
local name,link = self:GetItem()
if self:GetItem() then
local id = string.sub(link,18):match('(%d+)')
if id then c(self,tonumber(id)) end
end
end)
end
end)
end