- minor garbage generation fix (thanks Torhal!)

This commit is contained in:
Parnic
2010-10-20 04:30:48 +00:00
parent 3cc7b1b1fb
commit ef18b488da

View File

@ -1141,27 +1141,30 @@ function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
return 0 return 0
end end
function IceHUD:HasBuffs(unit, spellIDs) do
local retval = {} local retval = {}
for i=1, #spellIDs do
retval[i] = false
end
local i = 1 function IceHUD:HasBuffs(unit, spellIDs)
local name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i)
while name do
for i=1, #spellIDs do for i=1, #spellIDs do
if spellIDs[i] == auraID then retval[i] = false
retval[i] = applications == 0 and true or applications
break
end
end end
i = i + 1 local i = 1
name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i) local name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i)
end while name do
for i=1, #spellIDs do
if spellIDs[i] == auraID then
retval[i] = applications == 0 and true or applications
break
end
end
return retval i = i + 1
name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i)
end
return retval
end
end end
function IceHUD:OnDisable() function IceHUD:OnDisable()