/// <summary> /// Adds a set of spells to the explicite relationship set of this effect, which is used to determine whether /// a certain Spell and this effect have some kind of influence on one another (for procs, talent modifiers etc). /// Only adds the spells, will not work on the spells' trigger spells. /// </summary> /// <param name="abilities"></param> public void AddAffectingSpells(params SpellId[] spells) { if (AffectSpellSet == null) { AffectSpellSet = new HashSet <Spell>(); } foreach (var spellId in spells) { AffectSpellSet.Add(SpellHandler.Get(spellId)); } }
/// <summary> /// Adds a set of spells to the explicite relationship set of this effect, which is used to determine whether /// a certain Spell and this effect have some kind of influence on one another (for procs, talent modifiers etc). /// Only adds the spells, will not work on the spells' trigger spells. /// </summary> /// <param name="abilities"></param> public void AddAffectingSpells(params SpellLineId[] abilities) { if (AffectSpellSet == null) { AffectSpellSet = new HashSet <Spell>(); } foreach (var ability in abilities) { AffectSpellSet.AddRange(SpellLines.GetLine(ability)); } }
public bool MatchesSpell(Spell spell) { return((spell.SpellClassSet == Spell.SpellClassSet && spell.MatchesMask(AffectMask)) || (AffectSpellSet != null && AffectSpellSet.Contains(spell))); }