Browse Source

Update to batch completion

combat-2
MagicBot 8 months ago
parent
commit
d7ba42f4da
  1. 11
      src/engine/gameManager/ForgeManager.java

11
src/engine/gameManager/ForgeManager.java

@ -307,10 +307,7 @@ public enum ForgeManager implements Runnable {
for (Item workOrderItem : workOrder.cooking) { for (Item workOrderItem : workOrder.cooking) {
// Remove the virtual items from the forge window // Persist item
ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, workOrderItem, mbEnums.ProductionActionType.CONFIRM_SETPRICE, true);
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
Item completedItem = DbManager.ItemQueries.PERSIST(workOrderItem); Item completedItem = DbManager.ItemQueries.PERSIST(workOrderItem);
@ -331,6 +328,12 @@ public enum ForgeManager implements Runnable {
// persisted when bought/taken from vendor. // persisted when bought/taken from vendor.
for (Item memoryItem : toRemove) { for (Item memoryItem : toRemove) {
// Remove the virtual items from the forge window
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(memoryItem); workOrder.cooking.remove(memoryItem);
vendorItemLookup.get(workOrder.vendor).remove(memoryItem); vendorItemLookup.get(workOrder.vendor).remove(memoryItem);
itemWorkOrderLookup.remove(memoryItem); itemWorkOrderLookup.remove(memoryItem);

Loading…
Cancel
Save