NPC buildings dont run out of gold space on buildings

This commit is contained in:
2024-04-21 15:58:13 -05:00
parent 98cb307e09
commit a902ff720a
+1 -1
View File
@@ -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;
}