Browse Source

added message to player trying to delete asset during active siege

pull/13/head
FatBoy-DOTC 2 years ago
parent
commit
d9b5544894
  1. 5
      src/engine/net/client/handlers/DestroyBuildingHandler.java

5
src/engine/net/client/handlers/DestroyBuildingHandler.java

@ -8,6 +8,7 @@ import engine.gameManager.BuildingManager; @@ -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 { @@ -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

Loading…
Cancel
Save