Skip to content

Commit

Permalink
Fix DungeonWin overlay consuming requeue message. (#807)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ascynx authored Aug 23, 2023
1 parent e56431f commit afd676b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public Confetti(float x, float y, float xVel, float yVel) {
public static List<String> 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 + "}");
Expand Down Expand Up @@ -211,6 +213,7 @@ public static void onChatMessage(ClientChatReceivedEvent e) {
}

SES.schedule(() -> NotEnoughUpdates.INSTANCE.sendChatMessage("/showextrastats"), 100L, TimeUnit.MILLISECONDS);
seenDungeonWinOverlayThisRun = false;
}
}
}
Expand All @@ -222,8 +225,9 @@ public static void onChatMessage(ClientChatReceivedEvent e) {
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")
Expand All @@ -241,7 +245,7 @@ public static void onChatMessage(ClientChatReceivedEvent e) {
}
}
} else {
if (unformatted.contains("\u25AC")) {
if (unformatted.contains("\u25AC") && !seenDungeonWinOverlayThisRun) {
hideChat = true;
text.clear();
e.setCanceled(true);
Expand Down

0 comments on commit afd676b

Please sign in to comment.