Resource Merchant
This commit is contained in:
@@ -1376,20 +1376,17 @@ public class ClientMessagePump implements NetMsgHandler {
|
||||
CharacterItemManager itemMan = sourcePlayer.getCharItemManager();
|
||||
|
||||
if (itemMan == null) {
|
||||
ChatManager.chatSystemError(sourcePlayer,"Item Man Null");
|
||||
return;
|
||||
}
|
||||
|
||||
NPC npc = NPC.getFromCache(msg.getNPCID());
|
||||
|
||||
if (npc == null) {
|
||||
ChatManager.chatSystemError(sourcePlayer,"NPC Null");
|
||||
return;
|
||||
}
|
||||
Item gold = itemMan.getGoldInventory();
|
||||
|
||||
if (gold == null) {
|
||||
ChatManager.chatSystemError(sourcePlayer,"Gold Null");
|
||||
return;
|
||||
}
|
||||
Item buy = null;
|
||||
@@ -1397,19 +1394,16 @@ public class ClientMessagePump implements NetMsgHandler {
|
||||
if (msg.getItemType() == GameObjectType.MobEquipment.ordinal()) {
|
||||
ArrayList<MobEquipment> sellInventory = npc.getContract().getSellInventory();
|
||||
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) {
|
||||
ChatManager.chatSystemError(sourcePlayer,"Item Base Null");
|
||||
return;
|
||||
}
|
||||
//test room available for item
|
||||
if (!itemMan.hasRoomInventory(ib.getWeight())) {
|
||||
ChatManager.chatSystemError(sourcePlayer,"No Room In Inventory");
|
||||
return;
|
||||
}
|
||||
int cost = me.getMagicValue();
|
||||
@@ -1428,7 +1422,6 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user