|
|
|
@ -71,7 +71,7 @@ public enum ForgeManager implements Runnable {
@@ -71,7 +71,7 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
workOrder.runCompleted = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (workOrder.runCompleted == true) |
|
|
|
|
if (workOrder.runCompleted) |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
// Persist virtual items that were currently cooking
|
|
|
|
@ -95,7 +95,6 @@ public enum ForgeManager implements Runnable {
@@ -95,7 +95,6 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
|
|
|
|
|
Thread forgeManager; |
|
|
|
|
forgeManager = new Thread(FORGE_MANAGER); |
|
|
|
|
|
|
|
|
|
forgeManager.setName("Forge Manager"); |
|
|
|
|
forgeManager.start(); |
|
|
|
|
} |
|
|
|
@ -189,7 +188,7 @@ public enum ForgeManager implements Runnable {
@@ -189,7 +188,7 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
|
|
|
|
|
// Single item rolls are msg_size of 0;
|
|
|
|
|
|
|
|
|
|
if (availableSlots > 0 && workOrder.multiple_slot_request == false) |
|
|
|
|
if (availableSlots > 0 && !workOrder.multiple_slot_request) |
|
|
|
|
availableSlots = 1; |
|
|
|
|
|
|
|
|
|
return availableSlots; |
|
|
|
@ -321,7 +320,8 @@ public enum ForgeManager implements Runnable {
@@ -321,7 +320,8 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
completed_item = DbManager.ItemQueries.PERSIST(workOrderItem); |
|
|
|
|
workOrder.vendor.charItemManager.addItemToInventory(completed_item); |
|
|
|
|
} |
|
|
|
|
// Remove the fake negativeID virtual item from all collections.
|
|
|
|
|
|
|
|
|
|
// Remove the negativeID virtual item from all collections.
|
|
|
|
|
|
|
|
|
|
for (Item memoryItem : toRemove) { |
|
|
|
|
workOrder.cooking.remove(memoryItem); |
|
|
|
@ -329,8 +329,8 @@ public enum ForgeManager implements Runnable {
@@ -329,8 +329,8 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
vendorItemLookup.get(workOrder.vendor).remove(memoryItem); |
|
|
|
|
itemWorkOrderLookup.remove(memoryItem); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void forgeItems(WorkOrder workOrder) { |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < workOrder.slots_used; ++i) { |
|
|
|
@ -340,7 +340,6 @@ public enum ForgeManager implements Runnable {
@@ -340,7 +340,6 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
// Add virtual item to in-memory caches
|
|
|
|
|
|
|
|
|
|
workOrder.cooking.add(forged_item); |
|
|
|
|
|
|
|
|
|
inMemoryItemLookup.put(forged_item.objectUUID, forged_item); |
|
|
|
|
vendorItemLookup.computeIfAbsent(workOrder.vendor, k -> new ArrayList<>()); |
|
|
|
|
vendorItemLookup.get(workOrder.vendor).add(forged_item); |
|
|
|
|