From ccbe4fba04fd905d3ad1b9e64024d2b485af70a4 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 8 Jul 2024 21:42:39 -0500 Subject: [PATCH] stronghold guardian fix --- src/engine/gameManager/StrongholdManager.java | 6 +----- src/engine/workthreads/HalfHourlyJobThread.java | 5 ++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/engine/gameManager/StrongholdManager.java b/src/engine/gameManager/StrongholdManager.java index 33c72121..2461af8d 100644 --- a/src/engine/gameManager/StrongholdManager.java +++ b/src/engine/gameManager/StrongholdManager.java @@ -14,12 +14,8 @@ import java.util.concurrent.ThreadLocalRandom; public class StrongholdManager { public static void processStrongholds() { - //end all current stronghold activities ArrayList mines = Mine.getMines(); - for(Mine mine : mines){ - if (mine.isStronghold) - StrongholdManager.EndStronghold(mine); - } + //process strongholds selecting 2 randomly to become active int count = 0; diff --git a/src/engine/workthreads/HalfHourlyJobThread.java b/src/engine/workthreads/HalfHourlyJobThread.java index e3bb4e75..ca03cf37 100644 --- a/src/engine/workthreads/HalfHourlyJobThread.java +++ b/src/engine/workthreads/HalfHourlyJobThread.java @@ -41,7 +41,10 @@ public class HalfHourlyJobThread implements Runnable { try { ArrayList mines = Mine.getMines(); - + for(Mine mine : mines){ + if (mine.isStronghold) + StrongholdManager.EndStronghold(mine); + } for (Mine mine : mines) { try { //handle mines opening on server reboot weird time interval