From d39137d900e67162bb9aff94701c80e8678028c4 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 29 Feb 2024 21:27:26 -0600 Subject: [PATCH] hard set mine windows --- src/engine/objects/Mine.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 5d4819ca..8b1e925d 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -206,12 +206,6 @@ public class Mine extends AbstractGameObject { //pre-load all building sets ArrayList serverMines = MineQueries.GET_ALL_MINES_FOR_SERVER(); - - for (Mine mine : serverMines) { - Mine.mineMap.put(mine, mine.buildingID); - Mine.towerMap.put(mine.buildingID, mine); - - } ChinaMines.add(serverMines.get(0)); AmericaMines.add(serverMines.get(1)); EuroMines.add(serverMines.get(2)); @@ -248,6 +242,12 @@ public class Mine extends AbstractGameObject { ChinaMines.add(serverMines.get(33)); AmericaMines.add(serverMines.get(34)); SetTimes(); + + for (Mine mine : serverMines) { + Mine.mineMap.put(mine, mine.buildingID); + Mine.towerMap.put(mine.buildingID, mine); + + } } catch (Exception e) { e.printStackTrace(); } @@ -303,6 +303,11 @@ public class Mine extends AbstractGameObject { else mineOpenTime = guildMineTime; + } else{ + if (mineOpenTime.isAfter(LocalDateTime.now().withHour(mine.liveTime).withMinute(0).withSecond(0).withNano(0)) || mine.wasClaimed == true) + mineOpenTime = LocalDateTime.now().withHour(mine.liveTime).withMinute(0).withSecond(0).withNano(0).plusDays(1); + else + mineOpenTime = LocalDateTime.now().withHour(mine.liveTime).withMinute(0).withSecond(0).withNano(0); } writer.putLocalDateTime(mineOpenTime);