initialize lastRaidTime in war

This commit is contained in:
Aubri Seebauer committed 2023-04-18 12:32:54 -04:00
1 parent 874fc734a0
commit bfeaf1bd0d
2 files changed
+3 -2

No files matched your search

@@ -22,7 +22,7 @@ public class War {
// References
private ArrayList<Siege> sieges = new ArrayList<Siege>();
private ArrayList<Raid> raids = new ArrayList<Raid>();
private Long lastRaidTime;
private Long lastRaidTime = 0L;
/**
* War Constructor
@@ -228,8 +228,9 @@ public class RaidData {
return -1;
}
Long lastRaidTime = war.getLastRaidTime();
//6 hour raid cooldown for war
if ((System.currentTimeMillis() / 1000) - war.getLastRaidTime() <= 21600) {
if ((System.currentTimeMillis() / 1000) - lastRaidTime <= 21600) {
return 0;
}