diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-24 17:09:50 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-24 17:09:50 +0100 |
commit | fdb8fec242f5b87bbd464ed95708d72391fe6d9b (patch) | |
tree | 54b2e8e96fe8cdb4f011e00bd4be4245b2b05270 | |
parent | 640d2800eb97bce9f501ee93360c06fff700caf2 (diff) | |
download | skyhanni-fdb8fec242f5b87bbd464ed95708d72391fe6d9b.tar.gz skyhanni-fdb8fec242f5b87bbd464ed95708d72391fe6d9b.tar.bz2 skyhanni-fdb8fec242f5b87bbd464ed95708d72391fe6d9b.zip |
Fixed percent to tier broken icon in bestiary display when bestiary is maxed.
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt index b269e1df2..5a5ad06f7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt @@ -464,7 +464,8 @@ object BestiaryData { fun percentToMaxFormatted() = LorenzUtils.formatPercentage(percentToMax()) - fun percentToTier() = currentKillToNextLevel.toDouble() / killNeededForNextLevel + fun percentToTier() = + if (killNeededForNextLevel == 0L) 1.0 else currentKillToNextLevel.toDouble() / killNeededForNextLevel fun percentToTierFormatted() = LorenzUtils.formatPercentage(percentToTier()) |