hotzone duration config, non repeating hotzones

This commit is contained in:
FatBoy committed 2023-02-18 14:30:15 -06:00
1 parent ffe0ecd488
commit 38e25bf132
4 files changed
+14 -7

No files matched your search

+5 -3
View File
@@ -45,12 +45,14 @@ public class HourlyJobThread implements Runnable {
ZoneManager.generateAndSetRandomHotzone();
Zone hotzone = ZoneManager.getHotZone();
if (hotzone == null) {
Logger.error("Null hotzone returned from mapmanager");
} else {
Logger.info("new hotzone: " + hotzone.getName());
WorldServer.setLastHZChange(System.currentTimeMillis());
hotzone.hoursAsHotzone += 1;
if(hotzone.hoursAsHotzone >= Integer.valueOf(ConfigManager.MB_HOTZONE_DURATION.getValue())) {
Logger.info("new hotzone: " + hotzone.getName());
WorldServer.setLastHZChange(System.currentTimeMillis());
}
}
} catch (Exception e) {