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 {
if (b != null && b.getProtectionState().equals(ProtectionState.NPC)) if (b != null && b.getProtectionState().equals(ProtectionState.NPC))
b = null; b = null;
int buildingDeposit = cost - me.getMagicValue(); 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); ErrorPopupMsg.sendErrorPopup(sourcePlayer, 206);
return; return;
} }

Loading…
Cancel
Save