diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index bc5b33ef..94417c3a 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -1392,18 +1392,22 @@ public class ClientMessagePump implements NetMsgHandler { if (msg.getItemType() == GameObjectType.MobEquipment.ordinal()) { ArrayList sellInventory = npc.getContract().getSellInventory(); - if (sellInventory == null) + if (sellInventory == null) { + ChatManager.chatSystemError(sourcePlayer,"Sell Inventory Null"); return; + } for (MobEquipment me : sellInventory) { if (me.getObjectUUID() == msg.getItemID()) { ItemBase ib = me.getItemBase(); - if (ib == null) + if (ib == null) { + ChatManager.chatSystemError(sourcePlayer,"Item Base Null"); return; - + } //test room available for item - if (!itemMan.hasRoomInventory(ib.getWeight())) + if (!itemMan.hasRoomInventory(ib.getWeight())) { + ChatManager.chatSystemError(sourcePlayer,"No Room In Inventory"); return; - + } int cost = me.getMagicValue(); float bargain = sourcePlayer.getBargain(); @@ -1420,6 +1424,7 @@ public class ClientMessagePump implements NetMsgHandler { if (gold.getNumOfItems() - cost < 0) { //dont' have enough goldItem exit! // chatMan.chatSystemInfo(pc, "" + "You dont have enough gold."); + ChatManager.chatSystemError(sourcePlayer,"Not Enough Gold"); return; } @@ -1435,11 +1440,11 @@ public class ClientMessagePump implements NetMsgHandler { if (!itemMan.buyFromNPC(b, cost, buildingDeposit)) { // chatMan.chatSystemInfo(pc, "" + "You Failed to buy the item."); + ChatManager.chatSystemError(sourcePlayer,"Failed To Buy Item"); return; } buy = Item.createItemForPlayer(sourcePlayer, ib); - if (buy != null) { me.transferEnchants(buy); itemMan.addItemToInventory(buy);