diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-18 14:44:06 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-18 14:44:06 +0100 |
commit | f4831bff1bf50570898b0d07524d6d605d958283 (patch) | |
tree | 48d089f52377f2561b3e6c134d82d36419ce094f /src/main/java/at/hannibal2/skyhanni/data | |
parent | c7a7f70a22f22b80fa9c12619891592e5a83e7dc (diff) | |
download | skyhanni-f4831bff1bf50570898b0d07524d6d605d958283.tar.gz skyhanni-f4831bff1bf50570898b0d07524d6d605d958283.tar.bz2 skyhanni-f4831bff1bf50570898b0d07524d6d605d958283.zip |
Fixed dice roll profit counting as Mob Kill Coins in Slayer Tracker.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt index cb3b21031..0deb53164 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.PurseChangeCause import at.hannibal2.skyhanni.events.PurseChangeEvent import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber +import at.hannibal2.skyhanni.utils.NumberUtil.milion import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import net.minecraft.client.Minecraft import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -41,12 +42,16 @@ class PurseAPI { if (diff == 1.0) { return PurseChangeCause.GAIN_TALISMAN_OF_COINS } + + if (diff == 15.milion || diff == 100.milion) { + return PurseChangeCause.GAIN_DICE_ROLL + } + if (Minecraft.getMinecraft().currentScreen == null) { val timeDiff = System.currentTimeMillis() - inventoryCloseTime if (timeDiff > 2_000) { return PurseChangeCause.GAIN_MOB_KILL } - } return PurseChangeCause.GAIN_UNKNOWN } else { @@ -55,7 +60,11 @@ class PurseAPI { return PurseChangeCause.LOSE_SLAYER_QUEST_STARTED } + if (diff == -6_666_666.0 || diff == -666_666.0) { + return PurseChangeCause.LOSE_DICE_ROLL_COST + } + return PurseChangeCause.LOSE_UNKNOWN } } -}
\ No newline at end of file +} |