From afd676b9377b336ab3d0eafc6b37190001b69414 Mon Sep 17 00:00:00 2001 From: Ascynx <78341107+Ascynx@users.noreply.github.com> Date: Wed, 23 Aug 2023 20:29:24 +0200 Subject: Fix DungeonWin overlay consuming requeue message. (#807) --- .../io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java index 5b476c93..2cf09457 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java @@ -92,6 +92,8 @@ public class DungeonWin { public static List text = new ArrayList<>(); public static long startTime = 0; + private static boolean seenDungeonWinOverlayThisRun = false; + static { for (int i = 0; i < 10; i++) { text.add("{PLACEHOLDER DUNGEON STAT #" + i + "}"); @@ -211,6 +213,7 @@ public class DungeonWin { } SES.schedule(() -> NotEnoughUpdates.INSTANCE.sendChatMessage("/showextrastats"), 100L, TimeUnit.MILLISECONDS); + seenDungeonWinOverlayThisRun = false; } } } @@ -222,8 +225,9 @@ public class DungeonWin { e.setCanceled(true); hideChat = false; displayWin(); + seenDungeonWinOverlayThisRun = true; } else { - if (unformatted.trim().length() > 0) { + if (unformatted.trim().length() > 0 && !seenDungeonWinOverlayThisRun) { if (unformatted.contains("The Catacombs") || unformatted.contains("Master Mode Catacombs") || unformatted.contains("Team Score") || unformatted.contains("Defeated") || unformatted.contains( "Total Damage") @@ -241,7 +245,7 @@ public class DungeonWin { } } } else { - if (unformatted.contains("\u25AC")) { + if (unformatted.contains("\u25AC") && !seenDungeonWinOverlayThisRun) { hideChat = true; text.clear(); e.setCanceled(true); -- cgit