diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index d7c455fc..c5180464 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -307,10 +307,7 @@ public enum ForgeManager implements Runnable { for (Item workOrderItem : workOrder.cooking) { - // Remove the virtual items from the forge window - - ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, workOrderItem, mbEnums.ProductionActionType.CONFIRM_SETPRICE, true); - DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); + // Persist item Item completedItem = DbManager.ItemQueries.PERSIST(workOrderItem); @@ -331,6 +328,12 @@ public enum ForgeManager implements Runnable { // persisted when bought/taken from vendor. for (Item memoryItem : toRemove) { + + // Remove the virtual items from the forge window + + ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, memoryItem, mbEnums.ProductionActionType.CONFIRM_SETPRICE, true); + DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); + workOrder.cooking.remove(memoryItem); vendorItemLookup.get(workOrder.vendor).remove(memoryItem); itemWorkOrderLookup.remove(memoryItem);