aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/fishing
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-10-07 01:11:28 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-10-07 01:11:28 +0200
commit71f6d7e18627a04e5d80d8f5951cdb3b2bc5d44d (patch)
treea82d23c24572a348ac7028ebfc6f88fe9074b519 /src/main/java/at/hannibal2/skyhanni/features/fishing
parent8a1591748ac661c6f61776e25592ee879bbcdd72 (diff)
downloadskyhanni-71f6d7e18627a04e5d80d8f5951cdb3b2bc5d44d.tar.gz
skyhanni-71f6d7e18627a04e5d80d8f5951cdb3b2bc5d44d.tar.bz2
skyhanni-71f6d7e18627a04e5d80d8f5951cdb3b2bc5d44d.zip
reverted old removal
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing')
-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)