Browse Source

mines open during a reboot time frame now open correctly

lakebane-new
FatBoy-DOTC 7 months ago
parent
commit
231feef7fe
  1. 9
      src/engine/workthreads/HalfHourlyJobThread.java

9
src/engine/workthreads/HalfHourlyJobThread.java

@ -43,7 +43,14 @@ public class HalfHourlyJobThread implements Runnable { @@ -43,7 +43,14 @@ public class HalfHourlyJobThread implements Runnable {
for (Mine mine : mines) {
try {
// Open Mines owned by nations having their WOO
//handle mines opening on server reboot weird time interval
if(LocalDateTime.now().isAfter(LocalDateTime.now().withHour(mine.openHour).withMinute(mine.openMinute))) {
if (LocalDateTime.now().isBefore(LocalDateTime.now().withHour(mine.openHour).withMinute(mine.openMinute).plusMinutes(30))) {
HalfHourlyJobThread.mineWindowOpen(mine);
continue;
}
}
// set to the current mine window.
if (mine.openHour == LocalDateTime.now().getHour() && mine.openMinute == LocalDateTime.now().getMinute() && !mine.wasClaimed) {

Loading…
Cancel
Save