diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-01 15:23:36 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-01 15:23:36 +0200 |
commit | bbb9221f457ae1407595ff1575727229b8c40f1e (patch) | |
tree | 78bfcd7fe6440595ac0397a3d6c43421863bef4f /src | |
parent | 4289e8a2148555e06fcef695a8d89d386067264e (diff) | |
download | skyhanni-bbb9221f457ae1407595ff1575727229b8c40f1e.tar.gz skyhanni-bbb9221f457ae1407595ff1575727229b8c40f1e.tar.bz2 skyhanni-bbb9221f457ae1407595ff1575727229b8c40f1e.zip |
Fixed discord dynamic text error with dungeon.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt index a60ddbbba..6e0f6acf0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt @@ -353,14 +353,18 @@ enum class DiscordStatus(private val displayMessageSupplier: Supplier<String>?) }), DUNGEONS({ - val boss = DungeonAPI.getCurrentBoss() - if (boss == null) { - "Unknown boss" + if (!DungeonAPI.inDungeon()) { + AutoStatus.DUNGEONS.placeholderText } else { - val floor = DungeonAPI.dungeonFloor ?: AutoStatus.DUNGEONS.placeholderText - val amountKills = DungeonAPI.bossStorage?.get(boss)?.addSeparators() ?: "Unknown" - val time = DungeonAPI.getTime() - "$floor Kills: $amountKills ($time)" + val boss = DungeonAPI.getCurrentBoss() + if (boss == null) { + "Unknown dungeon boss" + } else { + val floor = DungeonAPI.dungeonFloor ?: AutoStatus.DUNGEONS.placeholderText + val amountKills = DungeonAPI.bossStorage?.get(boss)?.addSeparators() ?: "Unknown" + val time = DungeonAPI.getTime() + "$floor Kills: $amountKills ($time)" + } } }) ; |