Browse Source

Window refresh update

combat-2
MagicBot 8 months ago
parent
commit
c1939075cd
  1. 14
      src/engine/net/client/handlers/ItemProductionMsgHandler.java

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

@ -131,6 +131,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { @@ -131,6 +131,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
Item virtualItem = ForgeManager.inMemoryItemLookup.get(itemUUID);
WorkOrder workOrder = ForgeManager.itemWorkOrderLookup.get(virtualItem);
// Remove from collections
workOrder.cooking.remove(virtualItem);
ForgeManager.itemWorkOrderLookup.remove(virtualItem);
// Persist item and add to vendor inventory
Item completedItem = DbManager.ItemQueries.PERSIST(virtualItem);
@ -141,15 +146,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { @@ -141,15 +146,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
ItemProductionMsg outMsg2 = new ItemProductionMsg(vendor.building, vendor, completedItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true);
DispatchMessage.dispatchMsgToInterestArea(vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
// Remove from collections
ItemProductionMsg outMsg = new ItemProductionMsg(vendor.building, vendor, virtualItem, mbEnums.ProductionActionType.CONFIRM_SETPRICE, true);
DispatchMessage.dispatchMsgToInterestArea(vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
workOrder.cooking.remove(virtualItem);
ForgeManager.itemWorkOrderLookup.remove(virtualItem);
}
private static void setItemPrice(int itemUUID, int itemPrice, NPC vendor, ClientConnection origin) {

Loading…
Cancel
Save