diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 3f73fe54..0fbb5ae3 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -61,11 +61,12 @@ public enum ForgeManager implements Runnable { // workOrder ArrayList toRemove = new ArrayList<>(); + Item completed_item = null; for (Item cooked_item : workOrder.cooking) { toRemove.add(cooked_item); cooked_item.containerType = mbEnums.ItemContainerType.INVENTORY; - Item completed_item = DbManager.ItemQueries.PERSIST(cooked_item); + completed_item = DbManager.ItemQueries.PERSIST(cooked_item); workOrder.vendor.charItemManager.addItemToInventory(completed_item); } @@ -78,8 +79,12 @@ public enum ForgeManager implements Runnable { vendorItemLookup.get(workOrder.vendor).remove(memoryItem); } - Logger.info("item forged:" + workOrder.workOrderID + " (" + workOrder.total_produced + "/" + workOrder.total_to_produce + ")"); + // Update vendor window + + ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, completed_item, 8, true); + DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); + Logger.info("item forged:" + workOrder.workOrderID + " (" + workOrder.total_produced + "/" + workOrder.total_to_produce + ")"); if (workOrder.total_produced >= workOrder.total_to_produce) { Logger.info("workOrder has completed: " + workOrder.workOrderID);