NPC buildings dont run out of gold space on buildings

This commit is contained in:
FatBoy committed 2024-04-21 16:01:01 -05:00
1 parent a902ff720a
commit 7a7559dee5
2 files changed
+4 -4

No files matched your search

+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;
}