@ -13,6 +13,7 @@ import engine.Enum;
@@ -13,6 +13,7 @@ import engine.Enum;
import engine.Enum.GameObjectType ;
import engine.Enum.TransactionType ;
import engine.gameManager.DbManager ;
import engine.objects.Building ;
import engine.objects.City ;
import engine.objects.Transaction ;
import engine.objects.Warehouse ;
@ -114,6 +115,15 @@ public class dbWarehouseHandler extends dbHandlerBase {
@@ -114,6 +115,15 @@ public class dbWarehouseHandler extends dbHandlerBase {
JSONObject jsonObject = ( JSONObject ) jsonParser . parse ( rs . getString ( "warehouse" ) ) ;
City city = City . getCity ( cityUID ) ;
city . warehouse = new Warehouse ( jsonObject ) ;
// Locate warehouse building
for ( Building building : city . parentZone . zoneBuildingSet ) {
if ( building . getBlueprint ( ) . getBuildingGroup ( ) . equals ( Enum . BuildingGroup . WAREHOUSE ) ) {
city . warehouse . building = building ;
break ;
}
}
}
} catch ( Exception e ) {