From 571ad4b4665fff628e909ed1a09cd4dbe20d574d Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 18 Feb 2024 17:49:13 -0600 Subject: [PATCH] resource merchant work --- src/engine/net/client/ClientMessagePump.java | 1 + src/engine/objects/CharacterItemManager.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index af9ad608..9af7ab6e 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/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); resource.setValue(Warehouse.getCostForResource(buy.getItemBaseID())); npc.getCharItemManager().addItemToInventory(resource); + npc.getCharItemManager().updateInventory(resource,true); } itemMan.updateInventory(); } diff --git a/src/engine/objects/CharacterItemManager.java b/src/engine/objects/CharacterItemManager.java index 833b04d5..575798dc 100644 --- a/src/engine/objects/CharacterItemManager.java +++ b/src/engine/objects/CharacterItemManager.java @@ -1218,10 +1218,9 @@ public class CharacterItemManager { if (this.doesCharOwnThisItem(i.getObjectUUID()) == false) return false; if (this.inventory.contains(i)) { - if(this.getOwner().getName().equals("Resource Merchant") == false){ this.inventory.remove(i); this.itemIDtoType.remove(i.getObjectUUID()); - } + updateInventory(i, false); return true; } }