View Single Post
07-25-18, 04:09 AM   #2
Sylen
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 50
I use this for highlighting debuffs

Lua Code:
  1. --Highlight Purgable Magic Buffs on Target and Focus
  2. hooksecurefunc("TargetFrame_UpdateAuras", function(s)
  3.     for i = 1, MAX_TARGET_BUFFS do
  4.         _, ic, _, dT = UnitBuff(s.unit, i)
  5.         if(ic and (not s.maxBuffs or i<=s.maxBuffs)) then
  6.             fS=_G[s:GetName().."Buff"..i.."Stealable"]
  7.             if(UnitIsEnemy(PlayerFrame.unit, s.unit) and dT=="Magic") then
  8.                 fS:Show()
  9.             else
  10.                 fS:Hide()
  11.             end
  12.         end
  13.     end
  14. end)


With some classes getting a dispel for enrage effects back, might want to use this

Lua Code:
  1. --Highlight Purgable Enrage Buffs on Target and Focus
  2. --Enrage effects return an empty string as debuffType
  3. hooksecurefunc("TargetFrame_UpdateAuras", function(s)
  4.     for i = 1, MAX_TARGET_BUFFS do
  5.         _, ic, _, dT = UnitBuff(s.unit, i)
  6.         if(ic and (not s.maxBuffs or i<=s.maxBuffs)) then
  7.             fS=_G[s:GetName().."Buff"..i.."Stealable"]
  8.             if(UnitIsEnemy(PlayerFrame.unit, s.unit) and dT=="") then
  9.                 fS:Show()
  10.             else
  11.                 fS:Hide()
  12.             end
  13.         end
  14.     end
  15. end)
  Reply With Quote