diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index d3b32326..347fe11d 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -49,6 +49,8 @@ public enum ForgeManager implements Runnable { if (workOrder.total_to_produce == 0) { workOrder.runCompleted = true; + workOrder.vendor.workOrders.remove(workOrder); + Logger.info("Workorder has completed: " + workOrder.workOrderID); // Remove this workOrder from any slots on vendor @@ -85,6 +87,7 @@ public enum ForgeManager implements Runnable { workOrder.total_to_produce = Math.max(1, workOrder.total_to_produce); + workOrder.vendor.workOrders.add(workOrder); workOrders.add(workOrder); } diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index 9e38eff3..95cafce1 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -79,7 +79,7 @@ public class NPC extends AbstractCharacter { public int parentZoneUUID; public int equipmentSetID = 0; private int repairCost = 5; - ArrayList workOrders = new ArrayList<>(); + public ArrayList workOrders = new ArrayList<>(); // New NPC constructor. Fill in the blanks and then call // PERSIST.