From d9b55448944fa7609a2dc6422cea28b1547083f3 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 5 Jun 2022 17:12:56 -0500 Subject: [PATCH] added message to player trying to delete asset during active siege --- src/engine/net/client/handlers/DestroyBuildingHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/net/client/handlers/DestroyBuildingHandler.java b/src/engine/net/client/handlers/DestroyBuildingHandler.java index 65578faf..4de1f37b 100644 --- a/src/engine/net/client/handlers/DestroyBuildingHandler.java +++ b/src/engine/net/client/handlers/DestroyBuildingHandler.java @@ -8,6 +8,7 @@ import engine.gameManager.BuildingManager; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.DestroyBuildingMsg; +import engine.net.client.msg.ErrorPopupMsg; import engine.net.client.msg.PlaceAssetMsg; import engine.objects.*; @@ -56,8 +57,8 @@ public class DestroyBuildingHandler extends AbstractClientMsgHandler { if (!BuildingManager.PlayerCanControlNotOwner(building, pc)) return true; Bane bane = city.getBane(); -if(bane.getSiegePhase() == Enum.SiegePhase.WAR && bane != null) { - PlaceAssetMsg.sendPlaceAssetError(origin, 171, pc.getName()); +if(bane.getSiegePhase() != Enum.SiegePhase.WAR && bane != null) { + ErrorPopupMsg.sendErrorPopup(pc, 171); return true; } // Can't destroy a tree of life