Slot tracking update

This commit is contained in:
2024-04-22 00:25:16 -04:00
parent 98b73d978a
commit 2de1f78f22
2 changed files with 13 additions and 6 deletions
@@ -146,6 +146,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
ForgeManager.itemWorkOrderLookup.remove(virtualItem);
DbManager.removeFromCache(virtualItem);
// If this is the last item then remove the workOrder from the game
if (workOrder.cooking.isEmpty())
ForgeManager.vendorWorkOrderLookup.get(vendor).remove(workOrder);
// Persist item and add to vendor inventory
Item completedItem = DbManager.ItemQueries.PERSIST(virtualItem);
@@ -388,6 +393,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
DbManager.removeFromCache(virtualItem);
ForgeManager.itemWorkOrderLookup.remove(virtualItem);
// If this is the last item then remove the workOrder from the game
if (workOrder.cooking.isEmpty())
ForgeManager.vendorWorkOrderLookup.get(vendor).remove(workOrder);
// Refresh vendor's inventory to client
outMsg = new ManageNPCMsg(vendor);