From 2a12411a2bac767e800303f07704174ed4e17494 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 1 Jun 2024 08:58:52 +0200 Subject: fix successfulCounter counting too quickly --- .../at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt index e2e323933..ad42aba24 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt @@ -28,6 +28,7 @@ class DianaFixChat { private var lastSpadeUse = SimpleTimeMark.farPast() private var lastErrorTime = SimpleTimeMark.farPast() + private var lastGuessPoint = SimpleTimeMark.farPast() private var foundGuess = false @SubscribeEvent @@ -123,7 +124,13 @@ class DianaFixChat { hasSetParticleQuality = false hasSetToggleMusic = false errorCounter = 0 - successfulCounter++ + + // This ensures we only count successes after new spade clicks, not the repeated moved guess locations + if (lastGuessPoint != lastSpadeUse) { + lastGuessPoint = lastSpadeUse + lastGuessPoint = SimpleTimeMark.now() + successfulCounter++ + } } @SubscribeEvent -- cgit