aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/SeaCreatureTracker.kt12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/SeaCreatureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/SeaCreatureTracker.kt
index 5ba50c2b7..ca8a73ce9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/SeaCreatureTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/SeaCreatureTracker.kt
@@ -79,8 +79,16 @@ object SeaCreatureTracker {
val realAmount = data.amount.filter { filter(it.key) }
val total = realAmount.sumAllValues()
- for ((displayName, amount) in realAmount.entries.sortedByDescending { it.value }) {
-
+ for ((name, amount) in realAmount.entries.sortedByDescending { it.value }) {
+ val displayName = SeaCreatureManager.allFishingMobs[name]?.displayName ?: run {
+ ErrorManager.logErrorStateWithData(
+ "Sea Creature Tracker can not display a name correctly",
+ "Could not find sea creature by name",
+ "SeaCreatureManager.allFishingMobs.keys" to SeaCreatureManager.allFishingMobs.keys,
+ "name" to name
+ )
+ name
+ }
val percentageSuffix = if (config.showPercentage.get()) {
val percentage = LorenzUtils.formatPercentage(amount.toDouble() / total)