diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-30 16:37:48 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-30 16:37:48 +0100 |
commit | 1b91d9426aa9c17bf43b7ec76164855eeffa536d (patch) | |
tree | 7cd861e1a63fc98e86bc7d6721ed5345bac811c8 /src | |
parent | 2a189ed75dbe824a2aac904a95f9187e59cee57a (diff) | |
download | skyhanni-1b91d9426aa9c17bf43b7ec76164855eeffa536d.tar.gz skyhanni-1b91d9426aa9c17bf43b7ec76164855eeffa536d.tar.bz2 skyhanni-1b91d9426aa9c17bf43b7ec76164855eeffa536d.zip |
Made Livid Solver great again. Fixed Damage Indicator in Dungeons for some floors.
Diffstat (limited to 'src')
-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 +} |