mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- minor garbage generation fix (thanks Torhal!)
This commit is contained in:
33
IceHUD.lua
33
IceHUD.lua
@ -1141,27 +1141,30 @@ function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
|
||||
return 0
|
||||
end
|
||||
|
||||
function IceHUD:HasBuffs(unit, spellIDs)
|
||||
do
|
||||
local retval = {}
|
||||
for i=1, #spellIDs do
|
||||
retval[i] = false
|
||||
end
|
||||
|
||||
local i = 1
|
||||
local name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i)
|
||||
while name do
|
||||
function IceHUD:HasBuffs(unit, spellIDs)
|
||||
for i=1, #spellIDs do
|
||||
if spellIDs[i] == auraID then
|
||||
retval[i] = applications == 0 and true or applications
|
||||
break
|
||||
end
|
||||
retval[i] = false
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i)
|
||||
end
|
||||
local i = 1
|
||||
local name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i)
|
||||
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
|
||||
|
||||
function IceHUD:OnDisable()
|
||||
|
Reference in New Issue
Block a user