From c1939075cdc11ebf54f4019c30931bf1bad43e64 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 19 Apr 2024 09:07:23 -0400 Subject: [PATCH] Window refresh update --- .../client/handlers/ItemProductionMsgHandler.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index 088d2888..afa3eb39 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -131,6 +131,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { Item virtualItem = ForgeManager.inMemoryItemLookup.get(itemUUID); WorkOrder workOrder = ForgeManager.itemWorkOrderLookup.get(virtualItem); + // Remove from collections + + workOrder.cooking.remove(virtualItem); + ForgeManager.itemWorkOrderLookup.remove(virtualItem); + // Persist item and add to vendor inventory Item completedItem = DbManager.ItemQueries.PERSIST(virtualItem); @@ -141,15 +146,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { ItemProductionMsg outMsg2 = new ItemProductionMsg(vendor.building, vendor, completedItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true); DispatchMessage.dispatchMsgToInterestArea(vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false); - // Remove from collections - - ItemProductionMsg outMsg = new ItemProductionMsg(vendor.building, vendor, virtualItem, mbEnums.ProductionActionType.CONFIRM_SETPRICE, true); - DispatchMessage.dispatchMsgToInterestArea(vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); - - workOrder.cooking.remove(virtualItem); - ForgeManager.itemWorkOrderLookup.remove(virtualItem); - - } private static void setItemPrice(int itemUUID, int itemPrice, NPC vendor, ClientConnection origin) {