Browse Source

NPC buildings dont run out of gold space on buildings

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
a902ff720a
  1. 2
      src/engine/net/client/ClientMessagePump.java

2
src/engine/net/client/ClientMessagePump.java

@ -1443,7 +1443,7 @@ public class ClientMessagePump implements NetMsgHandler { @@ -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;
}

Loading…
Cancel
Save