|
|
|
@ -18,6 +18,7 @@ import engine.net.MessageDispatcher;
@@ -18,6 +18,7 @@ import engine.net.MessageDispatcher;
|
|
|
|
|
import engine.net.client.msg.chat.ChatSystemMsg; |
|
|
|
|
import engine.objects.*; |
|
|
|
|
import engine.server.world.WorldServer; |
|
|
|
|
import org.joda.time.DateTime; |
|
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
@ -279,10 +280,20 @@ public class HourlyJobThread implements Runnable {
@@ -279,10 +280,20 @@ public class HourlyJobThread implements Runnable {
|
|
|
|
|
Logger.error("missing city map"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
processBanes(); |
|
|
|
|
|
|
|
|
|
// Log metrics to console
|
|
|
|
|
Logger.info(WorldServer.getUptimeString()); |
|
|
|
|
Logger.info(SimulationManager.getPopulationString()); |
|
|
|
|
Logger.info(MessageDispatcher.getNetstatString()); |
|
|
|
|
Logger.info(PurgeOprhans.recordsDeleted.toString() + "orphaned items deleted"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void processBanes(){ |
|
|
|
|
//handle banes
|
|
|
|
|
for(Bane bane : Bane.banes.values()){ |
|
|
|
|
if(bane.getLiveDate() != null && DateTime.now().isAfter(bane.getLiveDate().minusMinutes(1)) && bane.isStarted == false) |
|
|
|
|
bane.startBane(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|