Browse Source

Reset is handled when picking new hotZone.

master
MagicBot 2 years ago
parent
commit
f0f91325ba
  1. 8
      src/engine/gameManager/ZoneManager.java
  2. 5
      src/engine/workthreads/HourlyJobThread.java

8
src/engine/gameManager/ZoneManager.java

@ -216,7 +216,7 @@ public enum ZoneManager { @@ -216,7 +216,7 @@ public enum ZoneManager {
public static final void generateAndSetRandomHotzone() {
Zone hotzone;
Zone hotZone;
ArrayList<Integer> zoneArray = new ArrayList<>();
if (ZoneManager.macroZones.isEmpty())
@ -233,14 +233,14 @@ public enum ZoneManager { @@ -233,14 +233,14 @@ public enum ZoneManager {
int entryIndex = ThreadLocalRandom.current().nextInt(zoneArray.size());
hotzone = ZoneManager.getZoneByUUID(zoneArray.get(entryIndex));
hotZone = ZoneManager.getZoneByUUID(zoneArray.get(entryIndex));
if (hotzone == null) {
if (hotZone == null) {
Logger.error("Hotzone is null");
return;
}
ZoneManager.setHotZone(hotzone);
ZoneManager.setHotZone(hotZone);
}

5
src/engine/workthreads/HourlyJobThread.java

@ -191,11 +191,6 @@ public class HourlyJobThread implements Runnable { @@ -191,11 +191,6 @@ public class HourlyJobThread implements Runnable {
try {
// Reset zone availability at 1am
if (LocalDateTime.now().getHour() == 01)
ZoneManager.resetHotZones();
// Use the same hotZone this hour up and until
// the HotZone_Duration from the ConfigManager

Loading…
Cancel
Save