aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-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]!!
}