diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-08 09:11:40 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-08 09:11:40 +0200 |
commit | 4624daac2c457d730be70f99a4b3ddaa08b0a888 (patch) | |
tree | b5949cd1e18dd17eeef2c59cbc2861484e510692 /src/main | |
parent | 234bee21fcf43d15d4e6b80ce0d30fc12896cecb (diff) | |
download | skyhanni-4624daac2c457d730be70f99a4b3ddaa08b0a888.tar.gz skyhanni-4624daac2c457d730be70f99a4b3ddaa08b0a888.tar.bz2 skyhanni-4624daac2c457d730be70f99a4b3ddaa08b0a888.zip |
Fixed maxed pet exp progress bar is wrong for bingo pet.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt index 7b54d9d95..3ba76f238 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt @@ -34,7 +34,7 @@ class PetExpTooltip { ) ?: return val maxLevel = ItemUtils.maxPetLevel(name) - val maxXp = if (maxLevel == 200) 210255385 else 25353230L + val maxXp = maxPetExp(name) // lvl 100 legendary val percentage = petExperience / maxXp val percentageFormat = LorenzUtils.formatPercentage(percentage) @@ -48,4 +48,11 @@ class PetExpTooltip { event.toolTip.add(index, "§7Progress to Level $maxLevel: §e$percentageFormat") } } + + private fun maxPetExp(petName: String) = when { + petName.contains("Golden Dragon") -> 210_255_385 // lvl 200 legendary + petName.contains("Bingo") -> 5_624_785 // lvl 100 common + + else -> 25_353_230 // lvl 100 legendary + } } |