diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-15 14:10:10 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-15 14:10:10 +0200 |
commit | e96ecc590c490009975299a73bfb6a081c4da915 (patch) | |
tree | fb387247448a26c930d65746afe5e54bb7a11961 /src | |
parent | 1167a3367ad6a8c7b4fb0c8582025430dc85370f (diff) | |
download | skyhanni-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.kt | 7 |
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]!! } |