Aka_s_Vayne.Logic.Tumble.GetAggressiveTumblePos C# (CSharp) Method

GetAggressiveTumblePos() private static method

private static GetAggressiveTumblePos ( this target ) : System.Vector3
target this
return System.Vector3
        private static Vector3 GetAggressiveTumblePos(this Obj_AI_Base target)
        {
            var cursorPos = Game.CursorPos;

            if (!cursorPos.IsDangerousPosition()) return cursorPos;
            //if the target is not a melee and he's alone he's not really a danger to us, proceed to 1v1 him :^ )
            if (!target.IsMelee && Variables._Player.CountEnemiesInRange(800) == 1) return cursorPos;

            var aRC = new Geometry.Polygon.Circle(Variables._Player.ServerPosition.To2D(), 300).ToClipperPath();
            var targetPosition = target.ServerPosition;

            foreach (var p in aRC)
            {
                var v3 = new Vector2(p.X, p.Y).To3D();
                var dist = v3.Distance(targetPosition);
                if (dist > 325 && dist < 450)
                {
                    return v3;
                }
            }
            return Vector3.Zero;
        }