Browse Source

resource merchant work

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
571ad4b466
  1. 1
      src/engine/net/client/ClientMessagePump.java
  2. 3
      src/engine/objects/CharacterItemManager.java

1
src/engine/net/client/ClientMessagePump.java

@ -1588,6 +1588,7 @@ public class ClientMessagePump implements NetMsgHandler {
MobLoot resource = new MobLoot(npc,ItemBase.getItemBase(buy.getItemBaseID()), 1, true); MobLoot resource = new MobLoot(npc,ItemBase.getItemBase(buy.getItemBaseID()), 1, true);
resource.setValue(Warehouse.getCostForResource(buy.getItemBaseID())); resource.setValue(Warehouse.getCostForResource(buy.getItemBaseID()));
npc.getCharItemManager().addItemToInventory(resource); npc.getCharItemManager().addItemToInventory(resource);
npc.getCharItemManager().updateInventory(resource,true);
} }
itemMan.updateInventory(); itemMan.updateInventory();
} }

3
src/engine/objects/CharacterItemManager.java

@ -1218,10 +1218,9 @@ public class CharacterItemManager {
if (this.doesCharOwnThisItem(i.getObjectUUID()) == false) if (this.doesCharOwnThisItem(i.getObjectUUID()) == false)
return false; return false;
if (this.inventory.contains(i)) { if (this.inventory.contains(i)) {
if(this.getOwner().getName().equals("Resource Merchant") == false){
this.inventory.remove(i); this.inventory.remove(i);
this.itemIDtoType.remove(i.getObjectUUID()); this.itemIDtoType.remove(i.getObjectUUID());
} updateInventory(i, false);
return true; return true;
} }
} }

Loading…
Cancel
Save