From a902ff720ab867de3ff8b8af5f35aa5b32989faa Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 21 Apr 2024 15:58:13 -0500 Subject: [PATCH] NPC buildings dont run out of gold space on buildings --- src/engine/net/client/ClientMessagePump.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index 58177526..850bbeff 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -1443,7 +1443,7 @@ public class ClientMessagePump implements NetMsgHandler { if (b != null && b.getProtectionState().equals(ProtectionState.NPC)) b = null; int buildingDeposit = cost - me.getMagicValue(); - if (b != null && (b.getStrongboxValue() + buildingDeposit) > b.getMaxGold()) { + if (b != null && (b.getStrongboxValue() + buildingDeposit) > b.getMaxGold() && !b.isOwnerIsNPC()) { ErrorPopupMsg.sendErrorPopup(sourcePlayer, 206); return; }