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 {
// If a mine is active serialize current datetime irrespective // If a mine is active serialize current datetime irrespective
// of any claim. // of any claim.
if (mineNatonGuild.isEmptyGuild() == false && mine.isActive == false) { 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);
int guildWOO = mine.liveTime;//mineNatonGuild.getNation().getMineTime(); else
LocalDateTime guildMineTime = mineOpenTime.withHour(guildWOO); mineOpenTime = LocalDateTime.now().withHour(mine.liveTime).withMinute(0).withSecond(0).withNano(0);
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);
}
writer.putLocalDateTime(mineOpenTime); writer.putLocalDateTime(mineOpenTime);
writer.putLocalDateTime(mineOpenTime.plusHours(1)); writer.putLocalDateTime(mineOpenTime.plusHours(1));

Loading…
Cancel
Save