From 114aeb9f642d18ef0a03796616804227219f1934 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 14 Apr 2024 15:38:24 -0400 Subject: [PATCH] Update NPC window --- src/engine/gameManager/ForgeManager.java | 7 +++++++ .../net/client/handlers/ItemProductionMsgHandler.java | 1 + 2 files changed, 8 insertions(+) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index a4c251e4..56efd89c 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -12,6 +12,8 @@ import engine.loot.ModTableEntry; import engine.loot.ModTypeTableEntry; import engine.loot.WorkOrder; import engine.mbEnums; +import engine.net.DispatchMessage; +import engine.net.client.msg.ItemProductionMsg; import engine.objects.*; import engine.powers.EffectsBase; import engine.powers.poweractions.AbstractPowerAction; @@ -302,6 +304,11 @@ public enum ForgeManager implements Runnable { vendorItemLookup.get(workOrder.vendor).add(forged_item); ForgeManager.vendorWorkOrderLookup.get(workOrder.vendor).add(workOrder); + // Update NPC window + + ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, forged_item, 8, true); + DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); + Logger.info("Forging item: " + forged_item.objectUUID + " (" + forged_item.templateID + ") " + forged_item.template.item_base_name); workOrder.total_produced = workOrder.total_produced + 1; } diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index ad926368..b5645cf9 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -99,6 +99,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { ErrorPopupMsg.sendErrorPopup(player, validation_result); return true; } + break; case JUNK: junkItem(msg.itemUUID, vendorNPC, origin);