WoWInterface SVN Eui

[/] [Eui/] [script/] [SpellID.lua] - Rev 2

Compare with Previous | Blame | View Log

local E, C = unpack(select(2, ...))
if C["other"].spellid ~= true then return end

hooksecurefunc(GameTooltip, "SetUnitBuff", function(self,...)
        local id = select(11,UnitBuff(...))
        if id then
                self:AddDoubleLine("技能ID:",id)
                self:Show()
        end
end)

hooksecurefunc(GameTooltip, "SetUnitDebuff", function(self,...)
        local id = select(11,UnitDebuff(...))
        if id then
                self:AddDoubleLine("技能ID:",id)
                self:Show()
        end
end)

hooksecurefunc(GameTooltip, "SetUnitAura", function(self,...)
        local id = select(11,UnitAura(...))
        if id then
                self:AddDoubleLine("技能ID:",id)
                self:Show()
        end
end)

hooksecurefunc("SetItemRef", function(link, text, button, chatFrame)
        if string.find(link,"^spell:") then
                local id = string.sub(link,7)
                ItemRefTooltip:AddDoubleLine("技能ID:",id)
                ItemRefTooltip:Show()
        end
end)

GameTooltip:HookScript("OnTooltipSetSpell", function(self)
        local id = select(3,self:GetSpell())
        if id then
                self:AddDoubleLine("技能ID:",id)
                self:Show()
        end
end)

Compare with Previous | Blame