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
|
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()
|
||||||
|
Reference in New Issue
Block a user