Browse Source

Setting containertype.

combat-2
MagicBot 7 months ago
parent
commit
6a17f93e41
  1. 9
      src/engine/gameManager/ForgeManager.java

9
src/engine/gameManager/ForgeManager.java

@ -284,19 +284,22 @@ public enum ForgeManager implements Runnable {
// Identify completed items // Identify completed items
virutalItem.flags.add(mbEnums.ItemFlags.Identified); virutalItem.flags.add(mbEnums.ItemFlags.Identified);
virutalItem.containerType = mbEnums.ItemContainerType.INVENTORY;
// Persist item // Persist item
Item completedItem = DbManager.ItemQueries.PERSIST(virutalItem); 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.prefixToken = virutalItem.prefixToken;
completedItem.suffixToken = virutalItem.suffixToken; completedItem.suffixToken = virutalItem.suffixToken;
// Add effects to these tokens. Writes to disk.
ItemManager.applyItemEffects(completedItem); ItemManager.applyItemEffects(completedItem);
// add to the vendor inventory // Add to the vendor inventory
workOrder.vendor.charItemManager.addItemToInventory(completedItem); workOrder.vendor.charItemManager.addItemToInventory(completedItem);
@ -308,7 +311,7 @@ public enum ForgeManager implements Runnable {
toRemove.add(virutalItem); toRemove.add(virutalItem);
} }
// Remove the negativeID virtual item from all collections // Remove the virtual item from all collections
for (Item virtualItem : toRemove) { for (Item virtualItem : toRemove) {

Loading…
Cancel
Save