Esempio 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);
            }
        }
Esempio 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));
 }
Esempio 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));
 }