|
|
@ -58,7 +58,9 @@ import java.io.IOException; |
|
|
|
import java.net.InetAddress; |
|
|
|
import java.net.InetAddress; |
|
|
|
import java.nio.file.Files; |
|
|
|
import java.nio.file.Files; |
|
|
|
import java.nio.file.Paths; |
|
|
|
import java.nio.file.Paths; |
|
|
|
|
|
|
|
import java.time.Instant; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
|
|
|
import java.time.ZoneId; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
@ -70,7 +72,7 @@ import static java.lang.System.exit; |
|
|
|
public class WorldServer { |
|
|
|
public class WorldServer { |
|
|
|
|
|
|
|
|
|
|
|
private static LocalDateTime bootTime = LocalDateTime.now(); |
|
|
|
private static LocalDateTime bootTime = LocalDateTime.now(); |
|
|
|
private static long lastHZChange = System.currentTimeMillis(); |
|
|
|
public static Instant hotZoneLastUpdate; |
|
|
|
public boolean isRunning = false; |
|
|
|
public boolean isRunning = false; |
|
|
|
|
|
|
|
|
|
|
|
// Member variable declaration
|
|
|
|
// 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) { |
|
|
|
public static void trainerInfo(TrainerInfoMsg msg, ClientConnection origin) { |
|
|
|
|
|
|
|
|
|
|
|
NPC npc = NPC.getFromCache(msg.getObjectID()); |
|
|
|
NPC npc = NPC.getFromCache(msg.getObjectID()); |
|
|
@ -430,13 +424,9 @@ public class WorldServer { |
|
|
|
Logger.info("Running Heraldry Audit for Deleted Players"); |
|
|
|
Logger.info("Running Heraldry Audit for Deleted Players"); |
|
|
|
Heraldry.AuditHeraldry(); |
|
|
|
Heraldry.AuditHeraldry(); |
|
|
|
|
|
|
|
|
|
|
|
if (ZoneManager.hotZone != null) |
|
|
|
|
|
|
|
WorldServer.setLastHZChange(System.currentTimeMillis()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Logger.info("Starting Mobile AI FSM"); |
|
|
|
Logger.info("Starting Mobile AI FSM"); |
|
|
|
MobileFSMManager.getInstance(); |
|
|
|
MobileFSMManager.getInstance(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Zone zone : ZoneManager.getAllZones()) { |
|
|
|
for (Zone zone : ZoneManager.getAllZones()) { |
|
|
|
if (zone.getHeightMap() != null) { |
|
|
|
if (zone.getHeightMap() != null) { |
|
|
|
if (zone.getHeightMap().getBucketWidthX() == 0) { |
|
|
|
if (zone.getHeightMap().getBucketWidthX() == 0) { |
|
|
|