private Cargo LoadCargo(Player player, string cargoString) { try { OreCollection ores = null; if (cargoString == "") { ores = new OreCollection(); } else { var myCargo = JsonConvert.DeserializeObject <int[]>(cargoString); ores = new OreCollection(myCargo[0], myCargo[1], myCargo[2], myCargo[3], myCargo[4], myCargo[5], myCargo[6], myCargo[7], myCargo[8]); } var cargo = new Cargo(player) { Ores = ores }; return(cargo); } catch (Exception) { Out.QuickLog("Critical error occured", LogKeys.ERROR_LOG); } return(null); }
public void SellCargo(OreCollection oresForSale) { }
public Cargo(Player player) : base(player) { Ores = new OreCollection(); }