forked from MagicBane/Server
Junk or completion removes slot from workOrder
This commit is contained in:
@@ -46,11 +46,6 @@ public enum ForgeManager implements Runnable {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
// Do not process null workOrders
|
||||
|
||||
if (workOrder == null)
|
||||
continue;
|
||||
|
||||
if (workOrder.total_produced >= workOrder.total_to_produce) {
|
||||
|
||||
// Complete this workOrder.
|
||||
|
||||
@@ -146,6 +146,8 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
ForgeManager.itemWorkOrderLookup.remove(virtualItem);
|
||||
DbManager.removeFromCache(virtualItem);
|
||||
|
||||
workOrder.slots_used = workOrder.slots_used - 1;
|
||||
|
||||
// If this is the last item then remove the workOrder from the game
|
||||
|
||||
if (workOrder.cooking.isEmpty())
|
||||
@@ -395,6 +397,8 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
DbManager.removeFromCache(virtualItem);
|
||||
ForgeManager.itemWorkOrderLookup.remove(virtualItem);
|
||||
|
||||
workOrder.slots_used = workOrder.slots_used - 1;
|
||||
|
||||
// If this is the last item then remove the workOrder from the game
|
||||
|
||||
if (workOrder.cooking.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user