|
|
@ -1455,8 +1455,15 @@ public class ClientMessagePump implements NetMsgHandler { |
|
|
|
if (b != null && (b.getStrongboxValue() + buildingDeposit) > b.getMaxGold() && !b.isOwnerIsNPC()) { |
|
|
|
if (b != null && (b.getStrongboxValue() + buildingDeposit) > b.getMaxGold() && !b.isOwnerIsNPC()) { |
|
|
|
ErrorPopupMsg.sendErrorPopup(sourcePlayer, 206); |
|
|
|
ErrorPopupMsg.sendErrorPopup(sourcePlayer, 206); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
}if(npc.getContractID() == 152041){ |
|
|
|
if (!itemMan.buyFromNPC(b, cost, buildingDeposit)) { |
|
|
|
me.fromNoob = true; |
|
|
|
|
|
|
|
buy = Item.createItemForPlayer(sourcePlayer, ib, me.fromNoob); |
|
|
|
|
|
|
|
if (buy != null) { |
|
|
|
|
|
|
|
me.transferEnchants(buy); |
|
|
|
|
|
|
|
itemMan.addItemToInventory(buy); |
|
|
|
|
|
|
|
itemMan.updateInventory(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (!itemMan.buyFromNPC(b, cost, buildingDeposit)) { |
|
|
|
// chatMan.chatSystemInfo(pc, "" + "You Failed to buy the item.");
|
|
|
|
// chatMan.chatSystemInfo(pc, "" + "You Failed to buy the item.");
|
|
|
|
ChatManager.chatSystemError(sourcePlayer, "Failed To Buy Item"); |
|
|
|
ChatManager.chatSystemError(sourcePlayer, "Failed To Buy Item"); |
|
|
|
return; |
|
|
|
return; |
|
|
|