/// <summary> /// Find pulsing spell effect by spell handler /// </summary> /// <param name="target">Living to find effect on</param> /// <param name="handler">Spell Handler to find (Exact Object Match)</param> /// <returns>First occurence of PulsingSpellEffect in targets' concentration list or null</returns> public static List <PulsingSpellEffect> FindPulsingSpellsOnTarget(this GameLiving target, ISpellHandler handler) { List <PulsingSpellEffect> effects = null; lock (target.ConcentrationEffects) { effects = target.PulsingSpellsOnTarget(handler).ToList(); } return(effects); }
/// <summary> /// Find pulsing spell effect by spell handler /// </summary> /// <param name="target">Living to find effect on</param> /// <param name="handler">Spell Handler to find (Exact Object Match)</param> /// <returns>First occurence of PulsingSpellEffect in targets' concentration list or null</returns> public static PulsingSpellEffect FindPulsingSpellOnTarget(this GameLiving target, ISpellHandler handler) { PulsingSpellEffect effect = null; lock (target.ConcentrationEffects) { effect = target.PulsingSpellsOnTarget(handler).FirstOrDefault(); } return(effect); }
/// <summary> /// Find Pulsing Spell Effects by spell object /// </summary> /// <param name="target">Living to find effect on</param> /// <param name="spell">Spell Object to Find (Spell.ID Match)</param> /// <returns>All PulsingSpellEffect build from spell in target's concentration list or null</returns> public static List <PulsingSpellEffect> FindPulsingSpellsOnTarget(this GameLiving target, Spell spell) { List <PulsingSpellEffect> effects; lock (target.EffectList) { effects = target.PulsingSpellsOnTarget(spell).ToList(); } return(effects); }
/// <summary> /// Find Pulsing Spell Effect by spell object /// </summary> /// <param name="target">Living to find effect on</param> /// <param name="spell">Spell Object to Find (Spell.ID Match)</param> /// <returns>First occurence PulsingSpellEffect build from spell in target's concentration list or null</returns> public static PulsingSpellEffect FindPulsingSpellOnTarget(this GameLiving target, Spell spell) { PulsingSpellEffect pulsingSpell; lock (target.ConcentrationEffects) { pulsingSpell = target.PulsingSpellsOnTarget(spell).FirstOrDefault(); } return(pulsingSpell); }