diff options
Diffstat (limited to 'src/main')
-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()) } } |