Browse Source

More completion work

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

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

@ -107,7 +107,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { @@ -107,7 +107,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
break;
case COMPLETE:
completeItem(msg.itemUUID, vendor, origin);
completeItem(msg.itemUUID, vendor);
break;
case DEPOSIT:
depositItem(msg.itemUUID, vendor, origin);
@ -124,7 +124,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { @@ -124,7 +124,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
return true;
}
private static void completeItem(int itemUUID, NPC vendor, ClientConnection origin) {
private static void completeItem(int itemUUID, NPC vendor) {
Item virtualItem = ForgeManager.inMemoryItemLookup.get(itemUUID);
@ -143,8 +143,13 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { @@ -143,8 +143,13 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
vendor.charItemManager.addItemToInventory(virtualItem);
// Remove from collections
WorkOrder workOrder = ForgeManager.itemWorkOrderLookup.get(virtualItem);
workOrder.cooking.remove(virtualItem);
ForgeManager.vendorItemLookup.get(vendor).remove(virtualItem);
ForgeManager.itemWorkOrderLookup.remove(virtualItem);
}
private static void setItemPrice(int itemType, int itemUUID, int itemPrice, NPC vendor, ClientConnection origin) {

Loading…
Cancel
Save