attempt to add ShipBagMax

This commit is contained in:
raphaeIl
2024-04-03 01:46:39 -04:00
parent 2d7f83bafc
commit cea1a22103
4 changed files with 77 additions and 145 deletions

View File

@@ -19,9 +19,9 @@ namespace BLHX.Server.Game.Commands {
}
if (Unlock.Equals("all", StringComparison.CurrentCultureIgnoreCase)) {
int amount = 500; // not sure why but if you add more than this amount the client crashes
int amount = 585; // not sure why but if you add more than this amount the client crashes
List<int> all_ship_ids = Data.ShipDataTemplate.Where(x => x.Value.Star == x.Value.StarMax && x.Value.Star >= 5).ToDictionary().Keys.ToList();
List<PlayerShip> all_ships = all_ship_ids.Select(ship_id => CreateShipFromId((uint)ship_id, connection.player.Uid)).Take(amount).ToList();
List<PlayerShip> all_ships = all_ship_ids.Select(ship_id => CreateShipFromId((uint)ship_id, connection.player.Uid)).ToList();
all_ships.AddRange(GetDefaultShips(connection.player.Ships)); // add the defaults
connection.player.Ships = all_ships;