|
|
@ -78,7 +78,7 @@ public enum ForgeManager implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
// Create new set of in-memory only virtual items
|
|
|
|
// Create new set of in-memory only virtual items
|
|
|
|
|
|
|
|
|
|
|
|
forgeWorkerOrderBatch(workOrder); |
|
|
|
forgeWorkOrderBatch(workOrder); |
|
|
|
|
|
|
|
|
|
|
|
// enQueue this workOrder again; back into the oven
|
|
|
|
// enQueue this workOrder again; back into the oven
|
|
|
|
// until all items for this workOrder are completed.
|
|
|
|
// until all items for this workOrder are completed.
|
|
|
@ -146,7 +146,7 @@ public enum ForgeManager implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
// Create in-memory items and add to collections
|
|
|
|
// Create in-memory items and add to collections
|
|
|
|
|
|
|
|
|
|
|
|
forgeWorkerOrderBatch(workOrder); |
|
|
|
forgeWorkOrderBatch(workOrder); |
|
|
|
|
|
|
|
|
|
|
|
Logger.info(workOrder.toString()); |
|
|
|
Logger.info(workOrder.toString()); |
|
|
|
forge.add(workOrder); |
|
|
|
forge.add(workOrder); |
|
|
@ -260,20 +260,6 @@ public enum ForgeManager implements Runnable { |
|
|
|
return forgedItem; |
|
|
|
return forgedItem; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void applyItemEffects(Item forgedItem) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (forgedItem.prefixToken != 0) { |
|
|
|
|
|
|
|
EffectsBase prefix = PowersManager.getEffectByToken(forgedItem.prefixToken); |
|
|
|
|
|
|
|
forgedItem.addPermanentEnchantment(prefix.getIDString(), 0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (forgedItem.suffixToken != 0) { |
|
|
|
|
|
|
|
EffectsBase suffix = PowersManager.getEffectByToken(forgedItem.suffixToken); |
|
|
|
|
|
|
|
forgedItem.addPermanentEnchantment(suffix.getIDString(), 0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void completeWorkOrderBatch(WorkOrder workOrder) { |
|
|
|
public static void completeWorkOrderBatch(WorkOrder workOrder) { |
|
|
|
|
|
|
|
|
|
|
|
ArrayList<Item> toRemove = new ArrayList<>(); |
|
|
|
ArrayList<Item> toRemove = new ArrayList<>(); |
|
|
@ -293,7 +279,7 @@ public enum ForgeManager implements Runnable { |
|
|
|
completedItem.prefixToken = workOrderItem.prefixToken; |
|
|
|
completedItem.prefixToken = workOrderItem.prefixToken; |
|
|
|
completedItem.suffixToken = workOrderItem.suffixToken; |
|
|
|
completedItem.suffixToken = workOrderItem.suffixToken; |
|
|
|
|
|
|
|
|
|
|
|
applyItemEffects(completedItem); |
|
|
|
ItemManager.applyItemEffects(completedItem); |
|
|
|
|
|
|
|
|
|
|
|
// add to the vendor inventory
|
|
|
|
// add to the vendor inventory
|
|
|
|
|
|
|
|
|
|
|
@ -323,7 +309,7 @@ public enum ForgeManager implements Runnable { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void forgeWorkerOrderBatch(WorkOrder workOrder) { |
|
|
|
public static void forgeWorkOrderBatch(WorkOrder workOrder) { |
|
|
|
|
|
|
|
|
|
|
|
// New completion time for this batch
|
|
|
|
// New completion time for this batch
|
|
|
|
|
|
|
|
|
|
|
|