Пример #1
0
        public void BlinkSkewerCombo(TargetManager targetManager, BlinkSkewerModeMenu menu)
        {
            if (this.ComboSleeper.IsSleeping)
            {
                return;
            }

            if (this.blink?.Ability.CanBeCasted() != true || this.skewer?.Ability.CanBeCasted() != true)
            {
                return;
            }

            var target        = targetManager.Target;
            var castPosition  = target.GetPredictedPosition(this.skewer.Ability.CastPoint);
            var blinkPosition = this.Owner.Position.Extend2D(castPosition, this.Owner.Distance(castPosition) + 100);
            var distance      = this.Owner.Distance(blinkPosition);

            if (this.blink.Ability.CastRange < distance)
            {
                return;
            }

            var ally = targetManager.AllyHeroes
                       .Where(
                x => !x.Equals(this.Owner) && menu.IsAllyEnabled(x.Name) &&
                x.Distance(blinkPosition) < this.skewer.Ability.CastRange + 800)
                       .OrderBy(x => x.Distance(blinkPosition))
                       .FirstOrDefault();

            if (ally == null)
            {
                return;
            }

            this.OrbwalkSleeper.Sleep(this.skewer.Ability.CastPoint + 0.3f);

            this.blink.Ability.UseAbility(blinkPosition);
            this.skewer.Ability.UseAbility(ally.Position);
            this.ComboSleeper.Sleep(0.3f);
        }
Пример #2
0
        // Token: 0x06000549 RID: 1353 RVA: 0x0001B2B4 File Offset: 0x000194B4
        public void BlinkSkewerCombo(TargetManager targetManager, BlinkSkewerModeMenu menu)
        {
            if (base.ComboSleeper.IsSleeping)
            {
                return;
            }
            BlinkDaggerMagnus blinkDaggerMagnus = this.blink;

            if (blinkDaggerMagnus != null && blinkDaggerMagnus.Ability.CanBeCasted(true))
            {
                Skewer skewer = this.skewer;
                if (skewer != null && skewer.Ability.CanBeCasted(true))
                {
                    Vector3 predictedPosition = targetManager.Target.GetPredictedPosition(this.skewer.Ability.CastPoint);
                    Vector3 blinkPosition     = Vector3Extensions.Extend2D(base.Owner.Position, predictedPosition, base.Owner.Distance(predictedPosition) + 100f);
                    float   num = base.Owner.Distance(blinkPosition);
                    if (this.blink.Ability.CastRange < num)
                    {
                        return;
                    }
                    Unit9 unit = (from x in targetManager.AllyHeroes
                                  where !x.Equals(this.Owner) && menu.IsAllyEnabled(x.Name) && x.Distance(blinkPosition) < this.skewer.Ability.CastRange + 800f
                                  orderby x.Distance(blinkPosition)
                                  select x).FirstOrDefault <Unit9>();
                    if (unit == null)
                    {
                        return;
                    }
                    base.OrbwalkSleeper.Sleep(this.skewer.Ability.CastPoint + 0.3f);
                    this.blink.Ability.UseAbility(blinkPosition, false, false);
                    this.skewer.Ability.UseAbility(unit.Position, false, false);
                    base.ComboSleeper.Sleep(0.3f);
                    return;
                }
            }
        }