Browse Source

hard set mine windows

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
ab2b7092fd
  1. 20
      src/engine/objects/Mine.java

20
src/engine/objects/Mine.java

@ -293,22 +293,10 @@ public class Mine extends AbstractGameObject { @@ -293,22 +293,10 @@ public class Mine extends AbstractGameObject {
// If a mine is active serialize current datetime irrespective
// of any claim.
if (mineNatonGuild.isEmptyGuild() == false && mine.isActive == false) {
int guildWOO = mine.liveTime;//mineNatonGuild.getNation().getMineTime();
LocalDateTime guildMineTime = mineOpenTime.withHour(guildWOO);
if (mineOpenTime.isAfter(guildMineTime) || mine.wasClaimed == true)
mineOpenTime = guildMineTime.plusDays(1);
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);
}
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.plusHours(1));

Loading…
Cancel
Save