diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index b0e3ee61..a7ae3dbb 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -142,6 +142,9 @@ public enum ForgeManager implements Runnable { vendorWorkOrderLookup.get(workOrder.vendor).add(workOrder); forge.add(workOrder); + String jsonWorkOrder = workOrder.toString(); + jsonWorkOrder = jsonWorkOrder.trim(); + } catch (Exception e) { Logger.error(e); } finally { diff --git a/src/engine/loot/WorkOrder.java b/src/engine/loot/WorkOrder.java index 72baeab5..c90f9a15 100644 --- a/src/engine/loot/WorkOrder.java +++ b/src/engine/loot/WorkOrder.java @@ -11,6 +11,7 @@ package engine.loot; import engine.mbEnums; import engine.objects.Item; import engine.objects.NPC; +import org.json.simple.JSONValue; import java.time.Duration; import java.time.Instant; @@ -49,6 +50,12 @@ public class WorkOrder implements Delayed { } + public static String toJson(WorkOrder workOrder) { + + String jsonString = JSONValue.toJSONString(workOrder); + return jsonString; + } + @Override public long getDelay(TimeUnit unit) {