|
|
@ -129,7 +129,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { |
|
|
|
|
|
|
|
|
|
|
|
private static void completeItem(int itemUUID, NPC vendor) { |
|
|
|
private static void completeItem(int itemUUID, NPC vendor) { |
|
|
|
|
|
|
|
|
|
|
|
Item virtualItem = ForgeManager.inMemoryItemLookup.get(itemUUID); |
|
|
|
Item virtualItem = Item.getFromCache(itemUUID); |
|
|
|
WorkOrder workOrder = ForgeManager.itemWorkOrderLookup.get(virtualItem); |
|
|
|
WorkOrder workOrder = ForgeManager.itemWorkOrderLookup.get(virtualItem); |
|
|
|
|
|
|
|
|
|
|
|
// Refresh the window. SetPrice is used only to force a window refresh.
|
|
|
|
// Refresh the window. SetPrice is used only to force a window refresh.
|
|
|
@ -142,6 +142,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { |
|
|
|
|
|
|
|
|
|
|
|
workOrder.cooking.remove(virtualItem); |
|
|
|
workOrder.cooking.remove(virtualItem); |
|
|
|
ForgeManager.itemWorkOrderLookup.remove(virtualItem); |
|
|
|
ForgeManager.itemWorkOrderLookup.remove(virtualItem); |
|
|
|
|
|
|
|
DbManager.removeFromCache(virtualItem); |
|
|
|
|
|
|
|
|
|
|
|
// WorkOrder exists until all items are completed or junked
|
|
|
|
// WorkOrder exists until all items are completed or junked
|
|
|
|
// this is to hold a reference to the virtual item for serialization (NPCMsgHandler)
|
|
|
|
// this is to hold a reference to the virtual item for serialization (NPCMsgHandler)
|
|
|
@ -364,7 +365,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
targetItem = ForgeManager.inMemoryItemLookup.get(itemUUID); |
|
|
|
targetItem = Item.getFromCache(itemUUID); |
|
|
|
|
|
|
|
|
|
|
|
PlayerCharacter player = origin.getPlayerCharacter(); |
|
|
|
PlayerCharacter player = origin.getPlayerCharacter(); |
|
|
|
|
|
|
|
|
|
|
@ -381,10 +382,9 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { |
|
|
|
if (vendor.getBuilding() == null) |
|
|
|
if (vendor.getBuilding() == null) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ForgeManager.inMemoryItemLookup.remove(targetItem.objectUUID); |
|
|
|
|
|
|
|
WorkOrder workOrder = ForgeManager.itemWorkOrderLookup.get(targetItem); |
|
|
|
WorkOrder workOrder = ForgeManager.itemWorkOrderLookup.get(targetItem); |
|
|
|
workOrder.cooking.remove(targetItem); |
|
|
|
workOrder.cooking.remove(targetItem); |
|
|
|
|
|
|
|
DbManager.removeFromCache(targetItem); |
|
|
|
|
|
|
|
|
|
|
|
// WorkOrder exists until all items are completed or junked
|
|
|
|
// WorkOrder exists until all items are completed or junked
|
|
|
|
// this is to hold a reference to the virtual item for serialization (NPCMsgHandler)
|
|
|
|
// this is to hold a reference to the virtual item for serialization (NPCMsgHandler)
|
|
|
|