diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt | 15 |
1 files 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 +} |