From 5b246211e131be37218149b033b7c941fe6fd04e Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 18 Jun 2024 11:51:11 -0400 Subject: [PATCH] Warehouse record removed in destruction banes. --- src/engine/workthreads/DestroyCityThread.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/engine/workthreads/DestroyCityThread.java b/src/engine/workthreads/DestroyCityThread.java index c7783536..9c5b2050 100644 --- a/src/engine/workthreads/DestroyCityThread.java +++ b/src/engine/workthreads/DestroyCityThread.java @@ -125,6 +125,13 @@ public class DestroyCityThread implements Runnable { cityBuilding.setProtectionState(mbEnums.ProtectionState.NONE); + // Remove warehouse entry if one exists. + + if (cityBuilding.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.WAREHOUSE) { + DbManager.WarehouseQueries.DELETE_WAREHOUSE(city.warehouse); + city.warehouse = null; + } + // Destroy all remaining city assets if ((cityBuilding.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.BARRACK)