From 4624daac2c457d730be70f99a4b3ddaa08b0a888 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 8 Sep 2023 09:11:40 +0200 Subject: Fixed maxed pet exp progress bar is wrong for bingo pet. --- .../java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main/java/at') 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 + } } -- cgit