Bump old opendate during reboot to current +1 when mine window has passed.
This commit is contained in:
1 parent
3ec985e3d9
commit
4b8e0cb041
1 file changed
+6
-1
@@ -147,7 +147,12 @@ public class Mine extends AbstractGameObject {
|
||||
|
||||
if (mineOpenDateTime != null)
|
||||
this.openDate = mineOpenDateTime.toLocalDateTime();
|
||||
|
||||
|
||||
// Set opendate to tomorrow if window has passed
|
||||
|
||||
if (LocalDateTime.now().isAfter(this.openDate.plusHours(1)))
|
||||
this.openDate = LocalDateTime.now().plusDays(1).withHour(this.openDate.getHour()).withMinute(0).withSecond(0).withNano(0);
|
||||
|
||||
}
|
||||
|
||||
public static void SendMineAttackMessage(Building mine){
|
||||
|
||||
Reference in new issue
Block a user