public bool Tick() { Auras = GetAuras(); if (Auras == null || !Auras.Any()) { return(false); } if (Buffs != null) { if (BuffsToKeepActive?.Count > 0) { foreach (KeyValuePair <string, CastFunction> keyValuePair in BuffsToKeepActive) { if (!Buffs.Any(e => e.SpellId != 0 && e.Name.Equals(keyValuePair.Key, StringComparison.OrdinalIgnoreCase)) && keyValuePair.Value()) { return(true); } } } if (Buffs.Any() && DispellBuffs != null) { DispellBuffs(); } } if (Debuffs != null) { if (DebuffsToKeepActive?.Count > 0) { foreach (KeyValuePair <string, CastFunction> keyValuePair in DebuffsToKeepActive) { if (!Debuffs.Any(e => e.SpellId != 0 && e.Name.Equals(keyValuePair.Key, StringComparison.OrdinalIgnoreCase)) && keyValuePair.Value()) { return(true); } } } if (Debuffs.Any() && DispellDebuffs != null) { // DispellDebuffs(); } } return(false); }
public bool HasAura(int spellId) { return(Auras.Any(a => a.SpellId == spellId)); }
public bool HasBuffByName(string name) => Auras.Any(e => e.Name == name);
public bool HasAura(Spell spell) { return(Auras.Any(aura => aura.Id == spell.Id)); }
public bool HasBuffByName(string auraName) { return(Auras != null && Auras.Any(e => e.Name.Equals(auraName, StringComparison.OrdinalIgnoreCase))); }
public bool HasBuffById(int spellId) { return(Auras != null && Auras.Any(e => e.SpellId == spellId)); }
public bool HasBuffByName(string name) { return(Auras != null && Auras.Any(e => e.Name == name)); }