From 77d61f6fa5530f1a8fbb8f28ffac48a77017810b Mon Sep 17 00:00:00 2001 From: appable Date: Mon, 7 Aug 2023 02:09:23 -0700 Subject: Merge pull request #362 * fix "null%" in golden fish info tooltip --- .../at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishInfo.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishInfo.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishInfo.kt index 8fd402fee..984f9c9dd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishInfo.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishInfo.kt @@ -22,8 +22,9 @@ data class TrophyFishInfo( // Credit to NotEnoughUpdates (Trophy Fish profile viewer page) for the format. fun getTooltip(counts: Map): ChatStyle { val bestFishObtained = counts.keys.maxOrNull() ?: TrophyRarity.BRONZE + val rateString = if (rate != null) "§8[§7$rate%§8]" else "" val display = """ - |$displayName §8[§7$rate%§8] + |$displayName $rateString |${description.splitLines(150)} | |${TrophyRarity.DIAMOND.formattedString}: ${formatCount(counts, TrophyRarity.DIAMOND)} -- cgit