mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Convenience method for looking for any buff from a list
This commit is contained in:
24
IceHUD.lua
24
IceHUD.lua
@ -493,6 +493,30 @@ do
|
||||
function IceHUD:HasDebuffs(unit, spellIDs, filter)
|
||||
return IceHUD:HasBuffs(unit, spellIDs, filter and filter.."|HARMFUL" or "HARMFUL")
|
||||
end
|
||||
|
||||
function IceHUD:HasAnyBuff(unit, spellIDs, filter)
|
||||
local buffs = IceHUD:HasBuffs(unit, spellIDs, filter)
|
||||
|
||||
for i=1, #buffs do
|
||||
if buffs[i] then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
function IceHUD:HasAnyDebuff(unit, spellIDs, filter)
|
||||
local debuffs = IceHUD:HasDebuffs(unit, spellIDs, filter)
|
||||
|
||||
for i=1, #debuffs do
|
||||
if debuffs[i] then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function IceHUD:OnDisable()
|
||||
|
Reference in New Issue
Block a user