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 {
for (Item workOrderItem : workOrder.cooking) { for (Item workOrderItem : workOrder.cooking) {
toRemove.add(workOrderItem); toRemove.add(workOrderItem);
workOrderItem.containerType = mbEnums.ItemContainerType.INVENTORY;
// ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, workOrderItem, mbEnums.ProductionActionType.CONFIRM_SETPRICE, true); 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); 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); 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); DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
completed_item = DbManager.ItemQueries.PERSIST(workOrderItem); completed_item = DbManager.ItemQueries.PERSIST(workOrderItem);

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

@ -364,6 +364,13 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
workOrder.cooking.remove(targetItem); workOrder.cooking.remove(targetItem);
ForgeManager.vendorItemLookup.get(workOrder.vendor).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 // Refresh vendor's inventory to client
outMsg = new ManageNPCMsg(vendor); outMsg = new ManageNPCMsg(vendor);

Loading…
Cancel
Save