From 6a17f93e419180c36266eb8bca359dae067b2afd Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 24 Apr 2024 13:13:48 -0400 Subject: [PATCH] Setting containertype. --- src/engine/gameManager/ForgeManager.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index edc3c1c0..b720280b 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -284,19 +284,22 @@ public enum ForgeManager implements Runnable { // Identify completed items virutalItem.flags.add(mbEnums.ItemFlags.Identified); + virutalItem.containerType = mbEnums.ItemContainerType.INVENTORY; // Persist item Item completedItem = DbManager.ItemQueries.PERSIST(virutalItem); - // Apply Item effects for Prefix and Suffix tokens + // Copy Prefix and Suffix tokens from virtual item. completedItem.prefixToken = virutalItem.prefixToken; completedItem.suffixToken = virutalItem.suffixToken; + // Add effects to these tokens. Writes to disk. + ItemManager.applyItemEffects(completedItem); - // add to the vendor inventory + // Add to the vendor inventory workOrder.vendor.charItemManager.addItemToInventory(completedItem); @@ -308,7 +311,7 @@ public enum ForgeManager implements Runnable { toRemove.add(virutalItem); } - // Remove the negativeID virtual item from all collections + // Remove the virtual item from all collections for (Item virtualItem : toRemove) {