Exemple #1
0
 public void Refresh()
 {
     arcaneBoots = manager.MyHero.UsableAbilities.FirstOrDefault(x => x.Id == AbilityId) as ArcaneBoots;
 }
Exemple #2
0
        private async void UseItem(CancellationToken token)
        {
            // SoulRing
            if (SoulRing != null &&
                Config.ItemsToggler.Value.IsEnabled(SoulRing.Item.Name) &&
                SoulRing.CanBeCasted)
            {
                SoulRing.UseAbility();
                await Await.Delay(SoulRing.GetCastDelay(), token);
            }
            else
            {
                Elsecount += 1;
            }

            // MidnightPulse
            if (MidnightPulse != null &&
                Config.AbilityToggler.Value.IsEnabled(MidnightPulse.Ability.Name) &&
                MidnightPulse.CanBeCasted)
            {
                MidnightPulse.UseAbility(Output.CastPosition);
                await Await.Delay(MidnightPulse.GetCastDelay(Output.CastPosition), token);
            }
            else
            {
                Elsecount += 1;
            }

            // GlimmerCape
            if (GlimmerCape != null &&
                Config.ItemsToggler.Value.IsEnabled(GlimmerCape.Item.Name) &&
                GlimmerCape.CanBeCasted)
            {
                GlimmerCape.UseAbility(Owner);
                await Await.Delay(GlimmerCape.GetCastDelay(Owner), token);
            }
            else
            {
                Elsecount += 1;
            }

            // BKB
            if (BKB != null &&
                Config.ItemsToggler.Value.IsEnabled(BKB.Item.Name) &&
                BKB.CanBeCasted)
            {
                BKB.UseAbility();
                await Await.Delay(BKB.GetCastDelay(), token);
            }
            else
            {
                Elsecount += 1;
            }

            // Shivas
            if (Shivas != null &&
                Config.ItemsToggler.Value.IsEnabled(Shivas.Item.Name) &&
                Shivas.CanBeCasted)
            {
                Shivas.UseAbility();
                await Await.Delay(Shivas.GetCastDelay(), token);
            }
            else
            {
                Elsecount += 1;
            }

            // ArcaneBoots
            if (ArcaneBoots != null &&
                Config.ItemsToggler.Value.IsEnabled(ArcaneBoots.Item.Name) &&
                ArcaneBoots.CanBeCasted &&
                Owner.Mana * 100 / Owner.MaximumMana <= 92 &&
                Elsecount == 5)
            {
                ArcaneBoots.UseAbility();
                await Await.Delay(ArcaneBoots.GetCastDelay(), token);
            }

            // Guardian
            if (Guardian != null &&
                Config.ItemsToggler.Value.IsEnabled(Guardian.Item.Name) &&
                Guardian.CanBeCasted &&
                Owner.Mana * 100 / Owner.MaximumMana <= 92 &&
                Elsecount == 5)
            {
                Guardian.UseAbility();
                await Await.Delay(Guardian.GetCastDelay(), token);
            }

            // Veil
            if (Veil != null &&
                Config.ItemsToggler.Value.IsEnabled(Veil.Item.Name) &&
                Veil.CanBeCasted)
            {
                Veil.UseAbility(Output.CastPosition);
                await Await.Delay(Veil.GetCastDelay(Output.CastPosition), token);
            }
            else
            {
                Elsecount += 1;
            }
        }