Help fix code 9.0 broke

Hi, returning player here. I had some code in a big lua of small little UI tweaks. Most works, but this section that makes the spell glow show on dispellable buffs on unit frames is not working.

If anyone could find what the fix is I’d appreciate it.

hooksecurefunc("TargetFrame_UpdateAuras", function(s)
      local name = s:GetName() .. "Buff"
      for i = 1 ,MAX_TARGET_BUFFS do
           local _, _, _, _, buffType = UnitAura(s.unit, i)
           if buffType == 'Magic' then
                _G[name .. i .. "Stealable"]:Show()
       end
  end

end)

UnitAura return 5 is the duration and 4 is the buffType

local _, _, _, buffType = UnitAura(s.unit, i)

1 Like

Thanks, that fixed it.