diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-26 23:29:50 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-26 23:29:50 +0200 |
commit | eef49c780202dc5c64c943269f00973e70010dec (patch) | |
tree | 3eab3bcd3497062293ffdad359f7524b18983281 /src/main/java/at | |
parent | 81cc1816d49d12a8880a4ee795c4410f2dd41b4c (diff) | |
download | skyhanni-eef49c780202dc5c64c943269f00973e70010dec.tar.gz skyhanni-eef49c780202dc5c64c943269f00973e70010dec.tar.bz2 skyhanni-eef49c780202dc5c64c943269f00973e70010dec.zip |
using skyhanni romanToDecimal
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt index 4457d5aef..f02e23512 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt @@ -29,6 +29,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.LorenzUtils.clickableChat import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber +import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal import at.hannibal2.skyhanni.utils.NumberUtil.roundToPrecision import at.hannibal2.skyhanni.utils.OSUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems @@ -431,7 +432,9 @@ object GhostCounter { if (inventoryName != "Bestiary ➜ Deep Caverns") return val stacks = event.inventoryItems val ghostStack = stacks[13] ?: return - val bestiaryNextLevel = if (ghostStack.displayName == "§cGhost") 1 else Utils.parseIntOrRomanNumeral(ghostStack.displayName.substring(8)) + 1 + val bestiaryNextLevel = if (ghostStack.displayName == "§cGhost") 1 else { + ghostStack.displayName.substring(8).romanToDecimal() + 1 + } hidden?.bestiaryNextLevel = bestiaryNextLevel.toDouble() for (line in ghostStack.getLore()) { ghostXPPattern.matchMatcher(line.removeColor().trim()) { |