Exemple #1
0
        public void Run()
        {
            var currentTarget = TargetSelector.GetTarget(Orbwalking.GetRealAutoAttackRange(null) + 240f, TargetSelector.DamageType.Physical);

            if (!currentTarget.IsValidTarget())
            {
                return;
            }

            if (currentTarget.ServerPosition.Distance(ObjectManager.Player.ServerPosition) <=
                Orbwalking.GetRealAutoAttackRange(null))
            {
                return;
            }

            if (HealthPrediction.GetHealthPrediction(currentTarget, (int)(250 + Game.Ping / 2f)) <
                ObjectManager.Player.GetAutoAttackDamage(currentTarget) +
                Variables.spells[SpellSlot.Q].GetDamage(currentTarget) &&
                HealthPrediction.GetHealthPrediction(currentTarget, (int)(250 + Game.Ping / 2f)) > 0)
            {
                var extendedPosition = ObjectManager.Player.ServerPosition.Extend(
                    currentTarget.ServerPosition, 300f);
                if (VayneQ.IsSafe(extendedPosition))
                {
                    Variables.spells[SpellSlot.Q].Cast(extendedPosition);
                    Orbwalking.ResetAutoAttackTimer();
                    TargetSelector.SetTarget(currentTarget);
                }
            }
        }
Exemple #2
0
 protected override void OnAfterAttack(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     switch (Variables.Orbwalker.ActiveMode)
     {
     case Orbwalking.OrbwalkingMode.Combo:
     case Orbwalking.OrbwalkingMode.Mixed:
         VayneQ.HandleQLogic(args.Target as Obj_AI_Base);
         break;
     }
 }
Exemple #3
0
        internal static void OnNonKillableMinion(AttackableUnit minion)
        {
            if (Variables.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear &&
                Variables.spells[SpellSlot.Q].IsEnabledAndReady() && (minion is Obj_AI_Base))
            {
                var mBase = minion as Obj_AI_Base;
                if (HealthPrediction.GetHealthPrediction(mBase, 250 + (int)ObjectManager.Player.AttackCastDelay + (int)(Game.Ping / 2f)) > 0 &&
                    HealthPrediction.GetHealthPrediction(mBase, 250 + (int)ObjectManager.Player.AttackCastDelay + 75 + (int)(Game.Ping / 2f)) + 5 <
                    Variables.spells[SpellSlot.Q].GetDamage(mBase) + ObjectManager.Player.GetAutoAttackDamage(mBase))
                {
                    var qEndPosition = ObjectManager.Player.ServerPosition.Extend(Game.CursorPos, 325f);

                    if (!VayneQ.IsSafe(qEndPosition))
                    {
                        return;
                    }

                    LeagueSharp.Common.Utility.DelayAction.Add(250, Orbwalking.ResetAutoAttackTimer);
                    Variables.spells[SpellSlot.Q].Cast(qEndPosition);
                }
            }
        }