public IHttpActionResult GetSystemFleets(string System)
 {
     try
     {
         return(Ok(ShipDAL.GetUserFleets(null, null, null, System).FindAll(x => x.Status == 0)));
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
 public IHttpActionResult GetUserFleets(int UserID)
 {
     try
     {
         return(Ok(ShipDAL.GetUserFleets(UserID)));
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
Exemplo n.º 3
0
        public static List <Fleet> InsertUpdatePlayerShip(BuildingQue ship)
        {
            List <Fleet> fleets = ShipDAL.GetUserFleets(ship.UserID, ship.PlanetID).FindAll(x => x.Status == 0).OrderBy(x => x.Arrival).ToList();

            if (fleets.Count == 0)
            {
                ShipDAL.AddFleet(ship);
            }
            else
            {
                ShipDAL.AddFleetDetails(ship, fleets[0].FleetID);
            }
            fleets = ShipDAL.GetUserFleets(ship.UserID, ship.PlanetID);
            return(fleets);
        }
Exemplo n.º 4
0
 public static List <Fleet> FleetMoveComplete(int UserID)
 {
     ShipDAL.FleetMoveComplete();
     return(ShipDAL.GetUserFleets(UserID));
 }
Exemplo n.º 5
0
 public static List <Fleet> MoveFleet(int UserID, int FleetID, int PlanetID)
 {
     ShipDAL.SetMoveFleet(UserID, FleetID, PlanetID);
     return(ShipDAL.GetUserFleets(UserID));
 }