From 025073ba4d380d696530c28536a0667478c3ebb6 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Sat, 31 Aug 2024 20:46:57 +0200 Subject: Fix: Powder for 10 Level (#2422) --- .../java/at/hannibal2/skyhanni/features/mining/PowderPerHotmPerk.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/PowderPerHotmPerk.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/PowderPerHotmPerk.kt index 702a24f67..58fa83753 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/PowderPerHotmPerk.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/PowderPerHotmPerk.kt @@ -40,7 +40,7 @@ object PowderPerHotmPerk { if (indexOfCost == -1) return val powderFor10Levels = - perk.calculateTotalCost(perk.rawLevel + 10) - perk.calculateTotalCost(perk.rawLevel) + perk.calculateTotalCost((perk.rawLevel + 10).coerceAtMost(perk.maxLevel)) - perk.calculateTotalCost(perk.rawLevel) event.toolTip.add(indexOfCost + 2, "§7Powder for 10 levels: §e${powderFor10Levels.addSeparators()}") } @@ -85,6 +85,5 @@ object PowderPerHotmPerk { override fun toString() = str } - private fun isEnabled() = LorenzUtils.inSkyBlock && HotmData.inInventory && - (config.powderSpent || config.powderFor10Levels) + private fun isEnabled() = LorenzUtils.inSkyBlock && HotmData.inInventory && (config.powderSpent || config.powderFor10Levels) } -- cgit