Browse Source

hard set mine windows

lakebane-master
FatBoy-DOTC 10 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 {
//pre-load all building sets //pre-load all building sets
ArrayList<Mine> serverMines = MineQueries.GET_ALL_MINES_FOR_SERVER(); 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)); ChinaMines.add(serverMines.get(0));
AmericaMines.add(serverMines.get(1)); AmericaMines.add(serverMines.get(1));
EuroMines.add(serverMines.get(2)); EuroMines.add(serverMines.get(2));
@ -248,6 +242,12 @@ public class Mine extends AbstractGameObject {
ChinaMines.add(serverMines.get(33)); ChinaMines.add(serverMines.get(33));
AmericaMines.add(serverMines.get(34)); AmericaMines.add(serverMines.get(34));
SetTimes(); SetTimes();
for (Mine mine : serverMines) {
Mine.mineMap.put(mine, mine.buildingID);
Mine.towerMap.put(mine.buildingID, mine);
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -303,6 +303,11 @@ public class Mine extends AbstractGameObject {
else else
mineOpenTime = guildMineTime; 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); writer.putLocalDateTime(mineOpenTime);

Loading…
Cancel
Save