Use of Instant to track hotzone refresh times.

This commit is contained in:
2023-02-22 17:25:48 -05:00
parent 8ae973f5f4
commit dc23755081
6 changed files with 24 additions and 24 deletions
+3 -13
View File
@@ -58,7 +58,9 @@ import java.io.IOException;
import java.net.InetAddress;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -70,7 +72,7 @@ import static java.lang.System.exit;
public class WorldServer {
private static LocalDateTime bootTime = LocalDateTime.now();
private static long lastHZChange = System.currentTimeMillis();
public static Instant hotZoneLastUpdate;
public boolean isRunning = false;
// Member variable declaration
@@ -121,14 +123,6 @@ public class WorldServer {
}
}
public static long getLastHZChange() {
return lastHZChange;
}
public static void setLastHZChange(long lastChange) {
lastHZChange = lastChange;
}
public static void trainerInfo(TrainerInfoMsg msg, ClientConnection origin) {
NPC npc = NPC.getFromCache(msg.getObjectID());
@@ -430,13 +424,9 @@ public class WorldServer {
Logger.info("Running Heraldry Audit for Deleted Players");
Heraldry.AuditHeraldry();
if (ZoneManager.hotZone != null)
WorldServer.setLastHZChange(System.currentTimeMillis());
Logger.info("Starting Mobile AI FSM");
MobileFSMManager.getInstance();
for (Zone zone : ZoneManager.getAllZones()) {
if (zone.getHeightMap() != null) {
if (zone.getHeightMap().getBucketWidthX() == 0) {