Add findanyof

pull/1/head
4n0n 1 year ago
parent 1cc8b541f8
commit 7b3b714d39
  1. 37
      src/AuraTable/AuraTable.lua

@ -384,6 +384,43 @@ function AuraTable:FindAny(spell)
return self:FindMy(spell)
end
-- FindAnyOf
---@param spells List
---@return Aura
function AuraTable:FindAnyOf(spells)
return spells:find(function(spell)
return self:FindAny(spell):IsValid()
end) or Bastion.Aura:New()
end
-- FindAnyOfMy
---@param spells List
---@return Aura
function AuraTable:FindAnyOfMy(spells)
return spells:find(function(spell)
return self:FindMy(spell):IsValid()
end) or Bastion.Aura:New()
end
-- FindAnyOfTheirs
---@param spells List
---@return Aura
function AuraTable:FindAnyOfTheirs(spells)
return spells:find(function(spell)
return self:FindTheirs(spell):IsValid()
end) or Bastion.Aura:New()
end
-- FindAnyFrom
---@param spells List
---@param source Unit
---@return Aura
function AuraTable:FindAnyFrom(spells, source)
return spells:find(function(spell)
return self:FindFrom(spell, source):IsValid()
end) or Bastion.Aura:New()
end
-- Has any stealable aura
---@return boolean
function AuraTable:HasAnyStealableAura()

Loading…
Cancel
Save