mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-01 14:38:55 +00:00
initialize lastRaidTime in war
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user