示例#1
0
 public IOrderedEnumerable <Obj_AI_Base> GetDashObjects()
 {
     try
     {
         var objects =
             GameObjects.EnemyMinions.Concat(GameObjects.Jungle)
             .Where(o => o.IsValidTarget(Orbwalking.GetRealAutoAttackRange(o)))
             .Select(o => o as Obj_AI_Base)
             .ToList();
         var apexPoint = Player.ServerPosition.To2D() +
                         (Player.ServerPosition.To2D() - Game.CursorPos.To2D()).Normalized() *
                         Orbwalking.GetRealAutoAttackRange(Player);
         return
             (objects.Where(
                  o =>
                  Utils.IsLyingInCone(
                      o.ServerPosition.To2D(), apexPoint, Player.ServerPosition.To2D(), Math.PI))
              .OrderBy(o => o.Distance(apexPoint, true)));
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return(null);
 }
示例#2
0
        public List <Obj_AI_Base> GetDashObjects(List <Obj_AI_Base> targets)
        {
            try
            {
                var apexPoint = Player.ServerPosition.To2D() +
                                (Player.ServerPosition.To2D() - Game.CursorPos.To2D()).Normalized() *
                                Orbwalking.GetRealAutoAttackRange(Player);

                return
                    (targets.Where(
                         o =>
                         Utils.IsLyingInCone(
                             o.ServerPosition.To2D(), apexPoint, Player.ServerPosition.To2D(), Math.PI))
                     .OrderBy(o => o.Distance(apexPoint, true))
                     .ToList());
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
            return(null);
        }