diff options
Diffstat (limited to 'src')
-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()) |