예제 #1
0
        public static void WhileCastingR()
        {
            if (!RSettings.RBool.Enabled)
            {
                return;
            }

            var rMode = RSettings.RMode.Value;

            var rTarget = RSettings.FocusMouse.Enabled
                ? GetTargetNearMouse(RSettings.MouseRange.Value)
                : TargetSelector.GetBestTargetsList(R.Range).OrderBy(x => x.HP).FirstOrDefault();

            if (rTarget != null)
            {
                //Wait at least 0.6f if the target is going to die or if the target is to far away
                if (rTarget.HP - R.GetDamage(rTarget) < 0)
                {
                    if (Game.TickCount - Xerath.RCharge.CastT <= 700)
                    {
                        return;
                    }
                }

                switch (rMode)
                {
                case 0:     //Normal
                    R.Cast(rTarget);
                    break;

                case 1:     //Selected delays.
                    var delay = RSettings.RDelay.Value;
                    if (Game.TickCount - Xerath.RCharge.CastT > delay)
                    {
                        R.Cast(rTarget);
                    }

                    break;

                case 2:     //On tap
                    if (RSettings.RSemiAutoKeyBind.Enabled)
                    {
                        R.Cast(rTarget);
                    }

                    break;
                }
            }
        }
예제 #2
0
 /// <summary>
 ///     Gets the best valid enemy heroes targets in the game inside a determined range.
 /// </summary>
 public static List <AIHeroClient> GetBestEnemyHeroesTargetsInRange(float range)
 {
     return(TargetSelector.GetBestTargetsList(range).ToList());
 }