Browse Source

hard set mine windows

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
d39137d900
  1. 17
      src/engine/objects/Mine.java

17
src/engine/objects/Mine.java

@ -206,12 +206,6 @@ public class Mine extends AbstractGameObject { @@ -206,12 +206,6 @@ public class Mine extends AbstractGameObject {
//pre-load all building sets
ArrayList<Mine> 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 { @@ -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 { @@ -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);

Loading…
Cancel
Save