hotzone duration config, non repeating hotzones

This commit is contained in:
2023-02-18 14:30:15 -06:00
parent ffe0ecd488
commit 38e25bf132
4 changed files with 14 additions and 7 deletions
+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) {