From a18785fb3de25c1d6f2e428cfbf46989af5dbc5b Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 13 Apr 2024 08:10:59 -0400 Subject: [PATCH] Begin work on forgeItem() --- src/engine/gameManager/ForgeManager.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 6499ce59..f3455dab 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -11,10 +11,7 @@ package engine.gameManager; import engine.loot.WorkOrder; import engine.mbEnums; import engine.net.client.msg.ErrorPopupMsg; -import engine.objects.Item; -import engine.objects.ItemTemplate; -import engine.objects.PlayerCharacter; -import engine.objects.Warehouse; +import engine.objects.*; import engine.powers.EffectsBase; import org.pmw.tinylog.Logger; @@ -269,4 +266,17 @@ public enum ForgeManager implements Runnable { return overflowMap; } + public static Item forgeItem(WorkOrder workOrder) { + + Item forgedItem = new Item(workOrder.templateID); + forgedItem.objectUUID = MobLoot.lastNegativeID.getAndDecrement(); + forgedItem.containerType = mbEnums.ItemContainerType.FORGE; + forgedItem.ownerID = workOrder.vendor.getObjectUUID(); + + // Forged items are unidentified until completed + + forgedItem.flags.remove(mbEnums.ItemFlags.Identified); + + return forgedItem; + } }