Ejemplo n.º 1
0
        /// <summary>
        ///     Spell Cleansing
        /// </summary>
        private static void SpellCleansing()
        {
            if (!OneReady())
            {
                return;
            }

            CleanseableSpell mySpell = null;

            if (
                CleanseableSpells.Where(
                    spell => ObjectManager.Player.HasBuff(spell.SpellBuff) && SpellEnabledAlways(spell.SpellBuff))
                .OrderBy(spell => GetChampByName(spell.ChampName).GetSpellDamage(ObjectManager.Player, spell.Slot))
                .Any())
            {
                mySpell =
                    CleanseableSpells.Where(
                        spell => ObjectManager.Player.HasBuff(spell.SpellBuff) && SpellEnabledAlways(spell.SpellBuff))
                    .OrderBy(
                        spell => GetChampByName(spell.ChampName).GetSpellDamage(ObjectManager.Player, spell.Slot))
                    .First();
            }

            if (mySpell != null)
            {
                UseCleanser(mySpell, ObjectManager.Player);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 ///     Use Cleanser
 /// </summary>
 /// <param name="spell">
 ///     The Spell
 /// </param>
 /// <param name="target">
 ///     The target
 /// </param>
 private static void UseCleanser(CleanseableSpell spell, Obj_AI_Hero target)
 {
     Utility.DelayAction.Add(SpellDelay(spell.RealName), () => CastCleanseItem(target));
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     Use Cleanser
 /// </summary>
 /// <param name="spell">
 ///     The Spell
 /// </param>
 /// <param name="target">
 ///     The target
 /// </param>
 private static void UseCleanser(CleanseableSpell spell, Obj_AI_Hero target)
 {
     Utility.DelayAction.Add(SpellDelay(spell.RealName), () => CastCleanseItem(target));
 }