mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-15 22:30:13 -05:00
- added basic implementation of Druid Eclipse bar for balance druids
This commit is contained in:
39
IceHUD.lua
39
IceHUD.lua
@ -923,21 +923,44 @@ function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
|
||||
return 0
|
||||
end
|
||||
|
||||
for i = 1, 40 do
|
||||
local name, _, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
|
||||
|
||||
if (not matchByName and not texture) or (matchByName and not name) then
|
||||
break
|
||||
end
|
||||
|
||||
if (not matchByName and string.match(texture:upper(), ability:upper())) or (matchByName and string.match(name:upper(), ability:upper())) then
|
||||
local i = 1
|
||||
local name, _, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
|
||||
while name do
|
||||
if (not matchByName and string.match(texture:upper(), ability:upper()))
|
||||
or (matchByName and string.match(name:upper(), ability:upper())) then
|
||||
return applications
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
name, _, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
function IceHUD:HasBuffs(unit, spellIDs)
|
||||
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
|
||||
for i=1, #spellIDs do
|
||||
if spellIDs[i] == auraID then
|
||||
retval[i] = applications == 0 and true or applications
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i)
|
||||
end
|
||||
|
||||
return retval
|
||||
end
|
||||
|
||||
function IceHUD:OnDisable()
|
||||
IceHUD.IceCore:Disable()
|
||||
end
|
||||
|
Reference in New Issue
Block a user