aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/rift
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-16 13:10:40 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-16 13:10:40 +0100
commite44edc3789f6610efa8eab07bc91b3aecc0bf7a6 (patch)
tree3d87450b63a9caa9578c76dc6452fc93ffa5fd87 /src/main/java/at/hannibal2/skyhanni/features/rift
parentbdbfcdc609a770f765f37d67c9d1e9757c83b7d4 (diff)
downloadskyhanni-e44edc3789f6610efa8eab07bc91b3aecc0bf7a6.tar.gz
skyhanni-e44edc3789f6610efa8eab07bc91b3aecc0bf7a6.tar.bz2
skyhanni-e44edc3789f6610efa8eab07bc91b3aecc0bf7a6.zip
Only modifying the total session when opening Vermin Bin.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt
index 02644a370..1f2b38122 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt
@@ -53,7 +53,8 @@ object VerminTracker {
fun onChat(event: LorenzChatEvent) {
VerminType.entries.forEach { verminType ->
if (verminType.pattern.matches(event.message)) {
- addVermin(verminType)
+ tracker.modify { it.count.addOrPut(verminType, 1) }
+
if (config.hideChat) {
event.blockedReason = "vermin_vacuumed"
}
@@ -106,11 +107,11 @@ object VerminTracker {
}
private fun addVermin(vermin: VerminType, count: Int = 1) {
- tracker.modify { it.count.addOrPut(vermin, count) }
+ tracker.modify(SkyHanniTracker.DisplayMode.TOTAL) { it.count.addOrPut(vermin, count) }
}
private fun setVermin(vermin: VerminType, count: Int) {
- tracker.modify { it.count[vermin] = count }
+ tracker.modify(SkyHanniTracker.DisplayMode.TOTAL) { it.count[vermin] = count }
}
private fun drawDisplay(data: Data): List<List<Any>> = buildList {