From 54e7a8fc7f4ec37130be9a224352139107291c80 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 11 Jun 2024 20:14:57 -0500 Subject: [PATCH] display mine times correctly --- src/engine/objects/Mine.java | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 5940d749..15371ce6 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -182,29 +182,12 @@ public class Mine extends AbstractGameObject { // Errant mines are currently open. Set time to now. - LocalDateTime mineOpenTime = LocalDateTime.now().withMinute(0).withSecond(0).withNano(0); + LocalDateTime mineOpenTime = LocalDateTime.now().withHour(mine.openHour).withMinute(mine.openMinute).withSecond(0).withNano(0); // Mine times are those of the nation not individual guild. Guild mineNatonGuild = mine.getOwningGuild().getNation(); - // Adjust the serialized mine time based upon whether - // the Guild's mine window has passed or not and if it was claimed. - // If a mine is active serialize current datetime irrespective - // of any claim. - - if (mineNatonGuild.isEmptyGuild() == false && mine.isActive == false) { - - int guildWOO = mineNatonGuild.getNation().getMineTime(); - LocalDateTime guildMineTime = mineOpenTime.withHour(guildWOO); - - if (mineOpenTime.isAfter(guildMineTime) || mine.wasClaimed == true) - mineOpenTime = guildMineTime.plusDays(1); - else - mineOpenTime = guildMineTime; - - } - writer.putLocalDateTime(mineOpenTime); writer.putLocalDateTime(mineOpenTime.plusHours(1)); writer.put(mine.isActive ? (byte) 0x01 : (byte) 0x00);