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);