Browse Source

Mine windows are set by the nation's WOO.

master
MagicBot 2 years ago
parent
commit
bc1fc5748c
  1. 3
      src/engine/objects/Mine.java
  2. 2
      src/engine/workthreads/HourlyJobThread.java

3
src/engine/objects/Mine.java

@ -285,7 +285,7 @@ public class Mine extends AbstractGameObject { @@ -285,7 +285,7 @@ public class Mine extends AbstractGameObject {
if (mineOwnerGuild.isErrant() == false && mine.isActive == false) {
int guildWOO = mineOwnerGuild.getMineTime();
int guildWOO = mineOwnerGuild.getNation().getMineTime();
LocalDateTime guildMineTime = mineOpenTime.withHour(guildWOO);
if (mineOpenTime.isAfter(guildMineTime))
@ -295,7 +295,6 @@ public class Mine extends AbstractGameObject { @@ -295,7 +295,6 @@ public class Mine extends AbstractGameObject {
}
writer.putLocalDateTime(mineOpenTime);
writer.putLocalDateTime(mineOpenTime.plusHours(1));
writer.put(mine.isActive ? (byte) 0x01 : (byte) 0x00);

2
src/engine/workthreads/HourlyJobThread.java

@ -113,7 +113,7 @@ public class HourlyJobThread implements Runnable { @@ -113,7 +113,7 @@ public class HourlyJobThread implements Runnable {
// Open Mines with a current guild hour
if (mine.getOwningGuild().getMineTime() ==
if (mine.getOwningGuild().getNation().getMineTime() ==
LocalDateTime.now().getHour()) {
mine.handleStartMineWindow();
Mine.setLastChange(System.currentTimeMillis());

Loading…
Cancel
Save