Browse Source

Window refresh update

combat-2
MagicBot 8 months ago
parent
commit
0ec2b436de
  1. 17
      src/engine/gameManager/ForgeManager.java

17
src/engine/gameManager/ForgeManager.java

@ -323,6 +323,8 @@ public enum ForgeManager implements Runnable { @@ -323,6 +323,8 @@ public enum ForgeManager implements Runnable {
public static void completeWorkOrderBatch(WorkOrder workOrder) {
ArrayList<Item> toRemove = new ArrayList<>();
for (Item workOrderItem : workOrder.cooking) {
// Persist item
@ -338,13 +340,22 @@ public enum ForgeManager implements Runnable { @@ -338,13 +340,22 @@ public enum ForgeManager implements Runnable {
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);
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
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);
workOrder.cooking.remove(workOrderItem);
itemWorkOrderLookup.remove(workOrderItem);
workOrder.cooking.remove(memoryItem);
itemWorkOrderLookup.remove(memoryItem);
}
}

Loading…
Cancel
Save