I use this for highlighting debuffs
Lua Code:
--Highlight Purgable Magic Buffs on Target and Focus
hooksecurefunc("TargetFrame_UpdateAuras", function(s)
for i = 1, MAX_TARGET_BUFFS do
_, ic, _, dT = UnitBuff(s.unit, i)
if(ic and (not s.maxBuffs or i<=s.maxBuffs)) then
fS=_G[s:GetName().."Buff"..i.."Stealable"]
if(UnitIsEnemy(PlayerFrame.unit, s.unit) and dT=="Magic") then
fS:Show()
else
fS:Hide()
end
end
end
end)
With some classes getting a dispel for enrage effects back, might want to use this
Lua Code:
--Highlight Purgable Enrage Buffs on Target and Focus
--Enrage effects return an empty string as debuffType
hooksecurefunc("TargetFrame_UpdateAuras", function(s)
for i = 1, MAX_TARGET_BUFFS do
_, ic, _, dT = UnitBuff(s.unit, i)
if(ic and (not s.maxBuffs or i<=s.maxBuffs)) then
fS=_G[s:GetName().."Buff"..i.."Stealable"]
if(UnitIsEnemy(PlayerFrame.unit, s.unit) and dT=="") then
fS:Show()
else
fS:Hide()
end
end
end
end)