Browse Source

ForgeManager started at boot

combat-2
MagicBot 9 months ago
parent
commit
92402097d4
  1. 10
      src/engine/gameManager/ForgeManager.java
  2. 3
      src/engine/server/world/WorldServer.java

10
src/engine/gameManager/ForgeManager.java

@ -64,11 +64,21 @@ public enum ForgeManager implements Runnable { @@ -64,11 +64,21 @@ public enum ForgeManager implements Runnable {
}
}
public static void start() {
Thread messageDispatcher;
messageDispatcher = new Thread(FORGE_MANAGER);
messageDispatcher.setName("Forge Manager");
messageDispatcher.start();
}
public static void submit(WorkOrder workOrder) {
workOrder.workOrderID = wordOrderCounter.incrementAndGet();
workOrder.completionTime = System.currentTimeMillis() + 10000;
// 0 signifies single item roll. > 0 signifies multiple item roll.
workOrder.total_to_produce = Math.max(1, workOrder.total_to_produce);
workOrders.add(workOrder);

3
src/engine/server/world/WorldServer.java

@ -455,6 +455,9 @@ public class WorldServer { @@ -455,6 +455,9 @@ public class WorldServer {
Logger.info("Starting Mob Respawn Thread");
Respawner.start();
Logger.info("Starting ForgeManager thread");
ForgeManager.start();
// Run maintenance
MaintenanceManager.dailyMaintenance();

Loading…
Cancel
Save