Browse Source

More window work

combat-2
MagicBot 8 months ago
parent
commit
b0c0c507e5
  1. 9
      src/engine/gameManager/ForgeManager.java
  2. 7
      src/engine/net/client/handlers/ItemProductionMsgHandler.java

9
src/engine/gameManager/ForgeManager.java

@ -300,12 +300,11 @@ public enum ForgeManager implements Runnable { @@ -300,12 +300,11 @@ public enum ForgeManager implements Runnable {
for (Item workOrderItem : workOrder.cooking) {
toRemove.add(workOrderItem);
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);
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);

7
src/engine/net/client/handlers/ItemProductionMsgHandler.java

@ -364,6 +364,13 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { @@ -364,6 +364,13 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
workOrder.cooking.remove(targetItem);
ForgeManager.vendorItemLookup.get(workOrder.vendor).remove(targetItem);
// Update workOrder to reflect canceled slot
workOrder.slots_used = workOrder.slots_used - 1;
if (workOrder.slots_used == 0)
workOrder.runCanceled = true;
// Refresh vendor's inventory to client
outMsg = new ManageNPCMsg(vendor);

Loading…
Cancel
Save