diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index 850bbeff..31a42b62 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -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; } diff --git a/src/engine/objects/CharacterItemManager.java b/src/engine/objects/CharacterItemManager.java index 5e92e112..80c8950b 100644 --- a/src/engine/objects/CharacterItemManager.java +++ b/src/engine/objects/CharacterItemManager.java @@ -1399,7 +1399,7 @@ public class CharacterItemManager { if (buildingCity != null) { buildingCity.transactionLock.writeLock().lock(); try { - if (!vendorBuilding.transferGold(buildingDeposit, true)) { + if (!vendorBuilding.isOwnerIsNPC() && !vendorBuilding.transferGold(buildingDeposit, true)) { return false; } } catch (Exception e) { @@ -1408,7 +1408,7 @@ public class CharacterItemManager { } finally { buildingCity.transactionLock.writeLock().unlock(); } - } else if (!vendorBuilding.transferGold(buildingDeposit, true)) { + } else if (!vendorBuilding.isOwnerIsNPC() && !vendorBuilding.transferGold(buildingDeposit, true)) { return false; } return true;