|
|
@ -1,3 +1,11 @@ |
|
|
|
|
|
|
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
|
|
|
|
|
|
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
|
|
|
|
|
|
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
|
|
|
|
|
|
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
|
|
|
|
|
|
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
|
|
|
|
|
|
|
// Magicbane Emulator Project © 2013 - 2022
|
|
|
|
|
|
|
|
// www.magicbane.com
|
|
|
|
|
|
|
|
|
|
|
|
package engine.gameManager; |
|
|
|
package engine.gameManager; |
|
|
|
|
|
|
|
|
|
|
|
import engine.loot.WorkOrder; |
|
|
|
import engine.loot.WorkOrder; |
|
|
@ -14,11 +22,33 @@ public enum ForgeManager implements Runnable { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
while (true) { |
|
|
|
WorkOrder workOrder = workQueue.take(); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WorkOrder workOrder = workQueue.take(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
workOrder.itemCount = workOrder.itemCount - 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Create workOrder item
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (workOrder.itemCount == 0) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
workOrder.runCompleted = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Remove this workOrder from any slots on vendor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Resubmit workOrder
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
workOrder.completionTime = System.currentTimeMillis() + 10000; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (InterruptedException e) { |
|
|
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} catch (InterruptedException e) { |
|
|
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|