aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-31 21:12:08 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-31 21:12:08 +0200
commite6bcc8f902e410c348ff720ab73de14e5cf04280 (patch)
treed59d38203c396da9c9f8d04b3992f7e30d1dd121 /src/main/java
parent58eccf5c7bf37c6279e15cd9e107b1fafd6e4509 (diff)
downloadskyhanni-e6bcc8f902e410c348ff720ab73de14e5cf04280.tar.gz
skyhanni-e6bcc8f902e410c348ff720ab73de14e5cf04280.tar.bz2
skyhanni-e6bcc8f902e410c348ff720ab73de14e5cf04280.zip
Fixed bug
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
index cf0192ca4..43799dc50 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
@@ -150,17 +150,24 @@ object ItemUtils {
var matcher = patternInFront.matcher(input)
if (matcher.matches()) {
val itemName = matcher.group("name")
- val amount = matcher.group("amount")?.replace(",", "")?.toInt() ?: 1
- val pair = Pair(itemName, amount)
- itemAmountCache[input] = pair
- return pair
+ if (!itemName.contains("ยง8x")) {
+ val amount = matcher.group("amount")?.replace(",", "")?.toInt() ?: 1
+ val pair = Pair(itemName, amount)
+ itemAmountCache[input] = pair
+ return pair
+ }
}
var string = input.trim()
val color = string.substring(0, 2)
string = string.substring(2)
matcher = patternBehind.matcher(string)
- if (!matcher.matches()) return Pair(null, 0)
+ if (!matcher.matches()) {
+ println("")
+ println("input: '$input'")
+ println("string: '$string'")
+ return Pair(null, 0)
+ }
val itemName = color + matcher.group("name").trim()
val amount = matcher.group("amount")?.replace(",", "")?.toInt() ?: 1