View Single Post
01-27-16, 04:55 PM   #3
Baggyman
A Deviate Faerie Dragon
Join Date: Jan 2016
Posts: 12
Can anyone help me out with the code on this.

I tried editing some other peoples existing code but it still isn't working. Are any of these 2 trys close:


UIParent:SetScript("OnUpdate", function()
if TargetFrame:IsShown() then
numBuffs = 0
for i=1, MAX_TARGET_BUFFS do
if (select(3,UnitBuff("target",i)) ~= 'Magic') then
numBuffs = numBuffs + 1
end
end
for i=1, numBuffs do
local frame = _G["TargetFrameBuff"..i]
frame:Hide()
end
end


OR


hooksecurefunc("TargetFrame_UpdateAuras", function(s)
for i=1, MAX_TARGET_BUFFS do
if select(5,UnitAura(s.unit,i)) ~= 'Magic' then
_G[s:GetName()..i]:Hide()
end
end
end)
  Reply With Quote