View Single Post
10-05-10, 11:24 AM   #3
d87
A Chromatic Dragonspawn
 
d87's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 163
Code:
local f = CreateFrame("Frame",nil,UIParent)
f:SetWidth(60); f:SetHeight(60)
local t = f:CreateTexture(nil, "ARTWORK")
t:SetAllPoints(f)
f.tex = t
f:Hide()
f:SetPoint("CENTER",UIParent,"CENTER",0,0)

local spellID = <Righteous Fury id>
f.tex:SetTexture(select(3,GetSpellInfo(spellID)))

f:RegisterEvent("UNIT_AURA")
f:SetScript("OnEvent",function(self,event,unit)
    if unit ~= "player" then return end
    if UnitAura(unit,GetSpellInfo(spellID),nil,"HELPFUL") then
         self:Show()
    else self:Hide() end
end)
  Reply With Quote