From 14e5096198aa524964e8e60e4fba5435d96aa262 Mon Sep 17 00:00:00 2001 From: test Date: Thu, 5 Sep 2024 03:03:38 +1000 Subject: [PATCH] Update WarDB.java --- src/main/java/link/locutus/discord/db/WarDB.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/link/locutus/discord/db/WarDB.java b/src/main/java/link/locutus/discord/db/WarDB.java index 584216a2..574c29c3 100644 --- a/src/main/java/link/locutus/discord/db/WarDB.java +++ b/src/main/java/link/locutus/discord/db/WarDB.java @@ -1869,7 +1869,8 @@ public boolean updateWars(List dbWars, Collection expectedIds, C for (DBWar war : dbWars) { DBWar existing = warsById.get(war); - if ((existing == null && !war.isActive()) || (existing != null && (war.getStatus() == existing.getStatus() || !existing.isActive()))) continue; + if ((existing == null && !war.isActive()) || (existing != null && (war.getStatus() == existing.getStatus() || + (!existing.isActive() && (existing.getStatus() != WarStatus.EXPIRED || existing.getTurnsLeft() <= 0))))) continue; prevWars.add(existing == null ? null : new DBWar(existing)); newWars.add(war);