Browse Source

More persist work

combat-2
MagicBot 8 months ago
parent
commit
963df074a4
  1. 20
      src/engine/gameManager/ForgeManager.java

20
src/engine/gameManager/ForgeManager.java

@ -302,22 +302,20 @@ public enum ForgeManager implements Runnable {
completed_item = DbManager.ItemQueries.PERSIST(workOrderItem); completed_item = DbManager.ItemQueries.PERSIST(workOrderItem);
workOrder.vendor.charItemManager.addItemToInventory(completed_item); workOrder.vendor.charItemManager.addItemToInventory(completed_item);
}
// Remove the fake negativeID item from all collections. // Remove the fake negativeID item from all collections.
// set the items as 'completed' // set the items as 'completed'
for (Item memoryItem : toRemove) { for (Item memoryItem : toRemove) {
workOrder.cooking.remove(memoryItem); workOrder.cooking.remove(memoryItem);
inMemoryItemLookup.remove(memoryItem.objectUUID); inMemoryItemLookup.remove(memoryItem.objectUUID);
vendorItemLookup.get(workOrder.vendor).remove(memoryItem); vendorItemLookup.get(workOrder.vendor).remove(memoryItem);
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);
ItemProductionMsg outMsg2 = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, memoryItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true);
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
}
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);
ItemProductionMsg outMsg2 = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, memoryItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true);
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
} }
} }

Loading…
Cancel
Save