Browse Source

Message sent early

combat-2
MagicBot 7 months ago
parent
commit
b80b3a81b5
  1. 14
      src/engine/gameManager/ForgeManager.java

14
src/engine/gameManager/ForgeManager.java

@ -299,6 +299,12 @@ public enum ForgeManager implements Runnable {
toRemove.add(workOrderItem); toRemove.add(workOrderItem);
workOrderItem.containerType = mbEnums.ItemContainerType.INVENTORY; workOrderItem.containerType = mbEnums.ItemContainerType.INVENTORY;
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);
ItemProductionMsg outMsg2 = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, workOrderItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true);
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
completed_item = DbManager.ItemQueries.PERSIST(workOrderItem); completed_item = DbManager.ItemQueries.PERSIST(workOrderItem);
workOrder.vendor.charItemManager.addItemToInventory(completed_item); workOrder.vendor.charItemManager.addItemToInventory(completed_item);
@ -307,14 +313,8 @@ public enum ForgeManager implements Runnable {
// set the items as 'completed' // set the items as 'completed'
for (Item memoryItem : toRemove) { for (Item memoryItem : toRemove) {
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);
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);
} }

Loading…
Cancel
Save