From a7bc1d5a6afad4ebc7b953e8277a9380f7846e11 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 18 Feb 2024 18:04:31 -0600 Subject: [PATCH] resource merchant work --- src/engine/net/client/ClientMessagePump.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index 65aa1c68..bcffbd21 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -1577,12 +1577,6 @@ public class ClientMessagePump implements NetMsgHandler { return; if (buy != null) { - if(npc.getName().equals("Resource Merchant")) { - 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); - } msg.setItem(buy); //send the buy message back to update player // msg.setItemType(buy.getObjectType().ordinal()); @@ -1592,13 +1586,18 @@ public class ClientMessagePump implements NetMsgHandler { itemMan.updateInventory(); } + if(npc.getName().equals("Resource Merchant")) { + 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); + } } finally { origin.buyLock.unlock(); } } else { ErrorPopupMsg.sendErrorPopup(origin.getPlayerCharacter(), 12); // All production slots taken } - } private static void Repair(RepairMsg msg, ClientConnection origin) {