aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-01 08:58:52 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-01 08:58:52 +0200
commit2a12411a2bac767e800303f07704174ed4e17494 (patch)
treeff59fa6d534bb83c41a2a95a867965ce0a7f6ed4 /src/main
parent6c9457d8cab7d168a67ae4ca79b2f57620d0123f (diff)
downloadskyhanni-2a12411a2bac767e800303f07704174ed4e17494.tar.gz
skyhanni-2a12411a2bac767e800303f07704174ed4e17494.tar.bz2
skyhanni-2a12411a2bac767e800303f07704174ed4e17494.zip
fix successfulCounter counting too quickly
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt9
1 files changed, 8 insertions, 1 deletions
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