aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-07 22:53:20 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-07 22:53:20 +0200
commit92465ab7d607f2bf0a73114c43c9c27ba14e9aec (patch)
tree5de16dbbe7ba4ffe729e6bd1a9ed37ed97d9e779 /src/main/java/at/hannibal2
parent82f102bd9f4d57fbcbcb70a08c2d3008ae8ee0ec (diff)
downloadskyhanni-92465ab7d607f2bf0a73114c43c9c27ba14e9aec.tar.gz
skyhanni-92465ab7d607f2bf0a73114c43c9c27ba14e9aec.tar.bz2
skyhanni-92465ab7d607f2bf0a73114c43c9c27ba14e9aec.zip
fixed regex in GhostCounter
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt11
1 files changed, 5 insertions, 6 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 d301fdf6f..a87e88de7 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
@@ -54,8 +54,8 @@ object GhostCounter {
val hidden get() = ProfileStorageData.profileSpecific?.ghostCounter
private var display = emptyList<List<Any>>()
var ghostCounterV3File = File("." + File.separator + "config" + File.separator + "ChatTriggers" + File.separator + "modules" + File.separator + "GhostCounterV3" + File.separator + ".persistantData.json")
- private val skillXPPattern = "[+](?<gained>[0-9,.]+) \\((?<current>[0-9,.]+)(?:\\/(?<total>[0-9,.]+))?\\)".toPattern()
- private val combatSectionPattern = ".*[+](?<gained>[0-9,.]+) (?<skillName>[A-Za-z]+) \\((?<progress>(?:(?:(?:(?<current>[0-9.,]+)\\/(?<total>[0-9.,]+))|(?:(?<percent>[0-9.]+)%))))\\).*".toPattern()
+ private val skillXPPattern = "[+](?<gained>[0-9,.]+) \\((?<current>[0-9,.]+)(?:/(?<total>[0-9,.]+))?\\)".toPattern()
+ private val combatSectionPattern = ".*[+](?<gained>[0-9,.]+) (?<skillName>[A-Za-z]+) \\((?<progress>(?<current>[0-9.,]+)/(?<total>[0-9.,]+)|(?<percent>[0-9.]+)%)\\).*".toPattern()
private val killComboExpiredPattern = "§cYour Kill Combo has expired! You reached a (?<combo>.*) Kill Combo!".toPattern()
private val ghostXPPattern = "(?<current>\\d+(?:\\.\\d+)?(?:,\\d+)?[kK]?)\\/(?<total>\\d+(?:\\.\\d+)?(?:,\\d+)?[kKmM]?)".toPattern()
private val bestiaryPattern = ".*(?:§\\d|§\\w)+BESTIARY (?:§\\d|§\\w)+Ghost (?:§\\d|§\\w)(?<previousLevel>\\d+)➜(?:§\\d|§\\w)(?<nextLevel>\\d+).*".toPattern() // &3&lBESTIARY &b&lGhost &89➜&b10
@@ -110,14 +110,13 @@ object GhostCounter {
}
val xpHourFormatting = config.textFormatting.xpHourFormatting
- val xp: String
val xpInterp: Float
- if (xpGainHourLast == xpGainHour && xpGainHour <= 0) {
- xp = xpHourFormatting.noData
+ val xp = if (xpGainHourLast == xpGainHour && xpGainHour <= 0) {
+ xpHourFormatting.noData
} else {
xpInterp = interp(xpGainHour, xpGainHourLast, lastUpdate)
val part = "([0-9]{3,}[^,]+)".toRegex().find(format.format(xpInterp))?.groupValues?.get(1) ?: "N/A"
- xp = "$part ${if (isKilling) "" else xpHourFormatting.paused}"
+ "$part ${if (isKilling) "" else xpHourFormatting.paused}"
}
val killHourFormatting = config.textFormatting.killHourFormatting