aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-08-31 20:46:57 +0200
committerGitHub <noreply@github.com>2024-08-31 20:46:57 +0200
commit025073ba4d380d696530c28536a0667478c3ebb6 (patch)
tree66b63ab4e90027b154761f821711d6925ba96e54 /src/main/java
parent33790178a21363c8efb07a068f9d2ad095d2f9ef (diff)
downloadskyhanni-025073ba4d380d696530c28536a0667478c3ebb6.tar.gz
skyhanni-025073ba4d380d696530c28536a0667478c3ebb6.tar.bz2
skyhanni-025073ba4d380d696530c28536a0667478c3ebb6.zip
Fix: Powder for 10 Level (#2422)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/PowderPerHotmPerk.kt5
1 files changed, 2 insertions, 3 deletions
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)
}