|
|
@ -323,6 +323,8 @@ public enum ForgeManager implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
public static void completeWorkOrderBatch(WorkOrder workOrder) { |
|
|
|
public static void completeWorkOrderBatch(WorkOrder workOrder) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ArrayList<Item> toRemove = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
for (Item workOrderItem : workOrder.cooking) { |
|
|
|
for (Item workOrderItem : workOrder.cooking) { |
|
|
|
|
|
|
|
|
|
|
|
// Persist item
|
|
|
|
// Persist item
|
|
|
@ -338,13 +340,22 @@ public enum ForgeManager implements Runnable { |
|
|
|
ItemProductionMsg outMsg2 = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, completedItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true); |
|
|
|
ItemProductionMsg outMsg2 = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, completedItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true); |
|
|
|
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false); |
|
|
|
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
toRemove.add(workOrderItem); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Remove the negativeID virtual item from all collections
|
|
|
|
|
|
|
|
// other than the virtual item lookup map. Item will be
|
|
|
|
|
|
|
|
// persisted when bought/taken from vendor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Item memoryItem : toRemove) { |
|
|
|
|
|
|
|
|
|
|
|
// Remove the virtual items from the forge window
|
|
|
|
// Remove the virtual items from the forge window
|
|
|
|
|
|
|
|
|
|
|
|
ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, workOrderItem, mbEnums.ProductionActionType.CONFIRM_SETPRICE, true); |
|
|
|
ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, memoryItem, mbEnums.ProductionActionType.CONFIRM_SETPRICE, true); |
|
|
|
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); |
|
|
|
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); |
|
|
|
|
|
|
|
|
|
|
|
workOrder.cooking.remove(workOrderItem); |
|
|
|
workOrder.cooking.remove(memoryItem); |
|
|
|
itemWorkOrderLookup.remove(workOrderItem); |
|
|
|
itemWorkOrderLookup.remove(memoryItem); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|