From 1b91d9426aa9c17bf43b7ec76164855eeffa536d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 30 Oct 2023 16:37:48 +0100 Subject: Made Livid Solver great again. Fixed Damage Indicator in Dungeons for some floors. --- .../at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt index e15f5408c..8bbf2a015 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt @@ -49,21 +49,20 @@ class DungeonAPI { fun inDungeon() = dungeonFloor != null - fun isOneOf(vararg floors: String) = dungeonFloor?.equalsOneOf(floors) == true + fun isOneOf(vararg floors: String) = dungeonFloor?.equalsOneOf(*floors) == true fun handleBossMessage(rawMessage: String) { if (!inDungeon()) return val message = rawMessage.removeColor() val bossName = message.substringAfter("[BOSS] ").substringBefore(":").trim() - if (bossName != "The Watcher" && dungeonFloor != null && checkBossName(dungeonFloor!!, bossName) && - !inBossRoom) { - DungeonBossRoomEnterEvent().postAndCatch() - inBossRoom = true + if ((bossName != "The Watcher") && dungeonFloor != null && checkBossName(bossName) && !inBossRoom) { + DungeonBossRoomEnterEvent().postAndCatch() + inBossRoom = true } } - private fun checkBossName(floor: String, bossName: String): Boolean { - val correctBoss = when (floor) { + private fun checkBossName(bossName: String): Boolean { + val correctBoss = when (dungeonFloor!!) { "E" -> "The Watcher" "F1", "M1" -> "Bonzo" "F2", "M2" -> "Scarf" @@ -243,4 +242,4 @@ class DungeonAPI { MAGE("Mage"), TANK("Tank") } -} \ No newline at end of file +} -- cgit