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) {