Ejemplo n.º 1
0
        public int GetAbilityWaitTime(ActiveAbility ability, Hero target)
        {
            if (ability.CanBeCasted && ability.CanHit(target) && ability.UseAbility(target))
            {
                int delay;

                // wait for projectile to hit, so that the amplifier is actually applied for the rest of the combo
                if (ability is IHasDamageAmplifier && ability.Speed != float.MaxValue)
                {
                    delay = ability.GetHitTime(target);
                }
                else
                {
                    delay = ability.GetCastDelay(target);
                }

                var diff = (int)(50 - Game.Ping);
                if (diff > 0)
                {
                    delay += diff;
                }

                return(delay);
            }

            return(0);
        }
Ejemplo n.º 2
0
        // Token: 0x060007D3 RID: 2003 RVA: 0x00023DD0 File Offset: 0x00021FD0
        protected override void Execute()
        {
            if (!this.useChains)
            {
                return;
            }
            Hero9 hero = base.Owner.Hero;

            if (!hero.IsValid || !hero.IsAlive)
            {
                return;
            }
            ActiveAbility chains  = hero.Abilities.FirstOrDefault((Ability9 x) => x.Id == AbilityId.ember_spirit_searing_chains) as ActiveAbility;
            ActiveAbility chains2 = chains;

            if (chains2 == null || !chains2.IsValid || !chains.CanBeCasted(true))
            {
                return;
            }
            if (!base.TargetManager.EnemyHeroes.Any((Unit9 x) => chains.CanHit(x)))
            {
                return;
            }
            if (this.menu.fistKey)
            {
                chains.UseAbility(false, false);
            }
            this.useChains = false;
        }
Ejemplo n.º 3
0
        // Token: 0x06000975 RID: 2421 RVA: 0x00029954 File Offset: 0x00027B54
        public bool CycloneTarget(TargetManager targetManager)
        {
            if (this.cyclone == null)
            {
                return(false);
            }
            ActiveAbility ability = this.cyclone.Ability;

            return(ability.CanBeCasted(true) && ability.CanHit(targetManager.Target) && ability.UseAbility(targetManager.Target, false, false));
        }
Ejemplo n.º 4
0
        // Token: 0x060005EE RID: 1518 RVA: 0x0001DB44 File Offset: 0x0001BD44
        protected override bool UseOrbAbility(Unit9 target, ComboModeMenu comboMenu)
        {
            if (!base.Owner.CanUseAbilities)
            {
                return(false);
            }
            ActiveAbility ability = this.tidebringer.Ability;

            return(comboMenu != null && comboMenu.IsAbilityEnabled(ability) && (ability.CanBeCasted(true) && ability.CanHit(target) && ability.UseAbility(target, false, false)));
        }