NPC buildings dont run out of gold space on buildings

This commit is contained in:
2024-04-21 16:01:01 -05:00
parent a902ff720a
commit 7a7559dee5
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1519,7 +1519,7 @@ public class ClientMessagePump implements NetMsgHandler {
int buildingDeposit = cost;
if (b != null && (b.getStrongboxValue() + buildingDeposit) > b.getMaxGold()) {
if (b != null && (b.getStrongboxValue() + buildingDeposit) > b.getMaxGold() && !b.isOwnerIsNPC()) {
ErrorPopupMsg.sendErrorPopup(sourcePlayer, 206);
return;
}
@@ -1575,7 +1575,7 @@ public class ClientMessagePump implements NetMsgHandler {
b = null;
int buildingDeposit = cost;
if (b != null && (b.getStrongboxValue() + buildingDeposit) > b.getMaxGold()) {
if (b != null && (b.getStrongboxValue() + buildingDeposit) > b.getMaxGold() && !b.isOwnerIsNPC()) {
ErrorPopupMsg.sendErrorPopup(sourcePlayer, 206);
return;
}