示例#1
0
        public static float GetTravelTime(StealerInfo stealer, Vector3 point)
        {
            switch (Player.Instance.Hero)
            {
            case Champion.Ashe:
            case Champion.Draven:
            case Champion.Ezreal:
            {
                return(stealer.CastTime + (Player.Instance.Position.Distance(point) / stealer.Speed * 1000));
            }

            case Champion.Jinx:
            {
                var distance = Player.Instance.Position.Distance(point);
                if (distance <= 1700)
                {
                    return(stealer.CastTime + (Player.Instance.Position.Distance(point) / stealer.Speed * 1000));
                }
                return(((1700 / stealer.Speed + stealer.CastTime) + (distance - 1700) / 2230) * 1000);
            }

            default:
                Console.WriteLine("ReCORE.ReCore.Managers :: Utils :: GetTravelTime - Error.");
                break;
            }
            return(float.MaxValue);
        }
示例#2
0
        public static Vector3 GetCastPosition(StealerInfo stealer, Obj_AI_Base target)
        {
            switch (Player.Instance.Hero)
            {
            case Champion.Ashe:
            case Champion.Jinx:
            {
                var closest_enemy = EloBuddy.SDK.EntityManager.Heroes.Enemies.Where(e => !e.IsDead && e.IsInRange(target, 250)).OrderByDescending(e => e.Distance(target)).FirstOrDefault();
                if (closest_enemy == null)
                {
                    return(new Vector3());
                }
                return(closest_enemy.Position);
            }

            case Champion.Draven:
            case Champion.Ezreal:
            {
                return(target.Position);
            }

            default:
                Console.WriteLine("ReCORE.ReCore.Managers :: Utils :: GetCastPosition - Error.");
                break;
            }

            return(new Vector3());
        }