diff --git a/src/engine/loot/WorkOrder.java b/src/engine/loot/WorkOrder.java index 1c54ad7d..8f8d6ae6 100644 --- a/src/engine/loot/WorkOrder.java +++ b/src/engine/loot/WorkOrder.java @@ -9,6 +9,7 @@ package engine.loot; import engine.gameManager.ForgeManager; +import engine.objects.NPC; import org.jetbrains.annotations.NotNull; import java.util.concurrent.Delayed; @@ -19,11 +20,13 @@ import static java.lang.Math.toIntExact; public class WorkOrder implements Delayed { public int workOrder; - public int npcUUID; + public NPC vendor; public int slotCount; public int itemCount; - public String prefix; - public String suffix; + public int itemBase; + public int prefixToken; + public int suffixToken; + public boolean isRandom; public long completionTime; public boolean runCompleted; diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index 3134f939..17531936 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -16,6 +16,7 @@ import engine.Enum.ItemType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; +import engine.loot.WorkOrder; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -455,9 +456,17 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { switch (msg.getActionType()) { case ACTION_PRODUCE: - boolean isRandom = false; - if (msg.getUnknown03() != 0 && msg.getpToken() == 0 && msg.getsToken() == 0) - isRandom = true; + + boolean isRandom = msg.getUnknown03() != 0 && msg.getpToken() == 0 && msg.getsToken() == 0; + + WorkOrder workOrder = new WorkOrder(); + workOrder.vendor = vendorNPC; + workOrder.isRandom = isRandom; + workOrder.itemBase = msg.getItemUUID(); + workOrder.itemCount = msg.getTotalProduction(); + workOrder.prefixToken = msg.getpToken(); + workOrder.suffixToken = msg.getsToken(); + //Create Multiple Item Function.. Fill all empty slots if (msg.isMultiple()) { int emptySlots = vendorNPC.getRank() - vendorNPC.getRolling().size();