aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-09-07 23:19:35 +0200
committerLorenz <lo.scherf@gmail.com>2022-09-07 23:19:35 +0200
commit34e9edc6d74a82be1b7aff003e006ce1e5874e4f (patch)
treef9c5b2d9bf73bd0732fb425445dc73ac112fe8c3 /src/main/java/at/hannibal2/skyhanni
parentf2bcdd4f50ef84e6d5a95349b70683c669571c2d (diff)
downloadskyhanni-34e9edc6d74a82be1b7aff003e006ce1e5874e4f.tar.gz
skyhanni-34e9edc6d74a82be1b7aff003e006ce1e5874e4f.tar.bz2
skyhanni-34e9edc6d74a82be1b7aff003e006ce1e5874e4f.zip
fixed best bazaar sell method with enchanted book
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataGrabber.kt4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt
index a8940028d..216855738 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.bazaar
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.GuiContainerEvent
+import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NumberUtil
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
@@ -48,7 +49,10 @@ class BazaarBestSellMethod {
if (slot.slotNumber == slot.slotIndex) continue
if (slot.stack == null) continue
val stack = slot.stack
- val displayName = stack.displayName
+ var displayName = stack.displayName
+ if (displayName.endsWith("Enchanted Book")) {
+ displayName = stack.getLore()[0]
+ }
if (BazaarApi.getCleanBazaarName(displayName) == name) {
having += stack.stackSize
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataGrabber.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataGrabber.kt
index 7318f1aa5..aea9a3981 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataGrabber.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataGrabber.kt
@@ -121,8 +121,8 @@ internal class BazaarDataGrabber(private var bazaarMap: MutableMap<String, Bazaa
itemNames[apiName] = itemName
itemName
} else {
- if (apiName.startsWith("ENCHANTMENT_ULTIMATE_")) {
- val enchantmentName = getEnchantmentRealName(apiName.split("_ULTIMATE_")[1])
+ if (apiName.startsWith("ENCHANTMENT_ULTIMATE_") && !apiName.contains("JERRY") && !apiName.contains("WISE")) {
+ val enchantmentName = getEnchantmentRealName(apiName.split("ENCHANTMENT_ULTIMATE_")[1])
itemNames[apiName] = enchantmentName
enchantmentName
} else if (apiName.startsWith("ENCHANTMENT_")) {