aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-15 14:10:10 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-15 14:10:10 +0200
commite96ecc590c490009975299a73bfb6a081c4da915 (patch)
treefb387247448a26c930d65746afe5e54bb7a11961 /src
parent1167a3367ad6a8c7b4fb0c8582025430dc85370f (diff)
downloadskyhanni-e96ecc590c490009975299a73bfb6a081c4da915.tar.gz
skyhanni-e96ecc590c490009975299a73bfb6a081c4da915.tar.bz2
skyhanni-e96ecc590c490009975299a73bfb6a081c4da915.zip
Fixed turbo books price not getting detected in visitor rewards.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
index e1115355f..fd2ca66e1 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
@@ -210,7 +210,12 @@ object ItemUtils {
private val itemAmountCache = mutableMapOf<String, Pair<String, Int>>()
- fun readItemAmount(input: String): Pair<String, Int>? {
+ fun readItemAmount(originalInput: String): Pair<String, Int>? {
+ // This workaround fixes 'Tubto Cacti I Book'
+ val input = if (originalInput.endsWith(" Book")) {
+ originalInput.replace(" Book", "")
+ } else originalInput
+
if (itemAmountCache.containsKey(input)) {
return itemAmountCache[input]!!
}