aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt
index 79c447662..5ee7f0f20 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt
@@ -57,11 +57,11 @@ object MythologicalCreatureTracker {
override fun reset() {
count.clear()
- mobsSinceLastInquisitor = 0
+ creaturesSinceLastInquisitor = 0
}
@Expose
- var mobsSinceLastInquisitor: Int = 0
+ var creaturesSinceLastInquisitor: Int = 0
@Expose
var count: MutableMap<MythologicalCreatureType, Int> = mutableMapOf()
@@ -81,13 +81,12 @@ object MythologicalCreatureTracker {
MythologicalCreatureType.entries.forEach { creatureType ->
if (creatureType.pattern.matches(event.message)) {
BurrowAPI.lastBurrowRelatedChatMessage = SimpleTimeMark.now()
- tracker.modify { it.count.addOrPut(creatureType, 1) }
- when (creatureType) {
- MythologicalCreatureType.MINOS_INQUISITOR -> {
- tracker.modify { it.mobsSinceLastInquisitor = 0 }
- }
- else -> {
- tracker.modify { it.mobsSinceLastInquisitor += 1 }
+ tracker.modify {
+ it.count.addOrPut(creatureType, 1)
+ // TODO migrate to abstract feature in the future
+ it.creaturesSinceLastInquisitor = when (creatureType) {
+ MythologicalCreatureType.MINOS_INQUISITOR -> 0
+ else -> it.creaturesSinceLastInquisitor + 1
}
}
if (config.hideChat) {
@@ -110,7 +109,7 @@ object MythologicalCreatureTracker {
addAsSingletonList(" §7- §e${amount.addSeparators()} ${creatureType.displayName}$percentageSuffix")
}
addAsSingletonList(" §7- §e${total.addSeparators()} §7Total Mythological Creatures")
- addAsSingletonList(" §7- §e${data.mobsSinceLastInquisitor.addSeparators()} §7Mobs since last Minos Inquisitor")
+ addAsSingletonList(" §7- §e${data.creaturesSinceLastInquisitor.addSeparators()} §7Creatures since last Minos Inquisitor")
}
@SubscribeEvent