From 889e969c4464384dde606bbcb52c92c1cf34a7de Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 20 Jan 2023 08:06:14 -0500 Subject: [PATCH] Mine cycle is reset at 01:00hrs. --- src/engine/workthreads/HourlyJobThread.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/engine/workthreads/HourlyJobThread.java b/src/engine/workthreads/HourlyJobThread.java index d5d92c28..31505cf5 100644 --- a/src/engine/workthreads/HourlyJobThread.java +++ b/src/engine/workthreads/HourlyJobThread.java @@ -103,11 +103,18 @@ public class HourlyJobThread implements Runnable { for (Mine mine : mines) { try { - // Mines can only be claimed once a cycle + // Mines can only be claimed once a cycle. + // The cycle resets at 01:00hrs after the + // Last mine window closes. - if (mine.wasClaimed == true) - continue;; + if (mine.wasClaimed == true) { + if (LocalDateTime.now().getHour() == 01) + mine.wasClaimed = false; + + continue; + + } // Open Errant Mines if (mine.getOwningGuild().isErrant()) {