diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-03-21 16:43:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 16:43:17 +0100 |
commit | d67ebf595c7a7f62ae103a384c90f9ca73f5e05e (patch) | |
tree | 456debfc1c9a9dfe7eb5755053bc49c86255230c /src/main/java/at/hannibal2/skyhanni | |
parent | ab5a856459afb7043b7784c0e67ddc6723969271 (diff) | |
download | skyhanni-d67ebf595c7a7f62ae103a384c90f9ca73f5e05e.tar.gz skyhanni-d67ebf595c7a7f62ae103a384c90f9ca73f5e05e.tar.bz2 skyhanni-d67ebf595c7a7f62ae103a384c90f9ca73f5e05e.zip |
Fix: Slayer cost from bank counting wrong (#1220)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt index 9a709e43b..c28441c33 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt @@ -84,6 +84,7 @@ object SlayerProfitTracker { private val ItemTrackerData.TrackedItem.timesDropped get() = timesGained private fun addSlayerCosts(price: Double) { + require(price < 0) {"slayer costs can not be positve"} getTracker()?.modify { it.slayerSpawnCost += price.toInt() } @@ -112,7 +113,7 @@ object SlayerProfitTracker { fun onChat(event: LorenzChatEvent) { if (!isEnabled()) return autoSlayerBankPattern.matchMatcher(event.message) { - addSlayerCosts(group("coins").formatDouble()) + addSlayerCosts(-group("coins").formatDouble()) } } |