diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-09-07 23:19:35 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-09-07 23:19:35 +0200 |
commit | 34e9edc6d74a82be1b7aff003e006ce1e5874e4f (patch) | |
tree | f9c5b2d9bf73bd0732fb425445dc73ac112fe8c3 | |
parent | f2bcdd4f50ef84e6d5a95349b70683c669571c2d (diff) | |
download | skyhanni-34e9edc6d74a82be1b7aff003e006ce1e5874e4f.tar.gz skyhanni-34e9edc6d74a82be1b7aff003e006ce1e5874e4f.tar.bz2 skyhanni-34e9edc6d74a82be1b7aff003e006ce1e5874e4f.zip |
fixed best bazaar sell method with enchanted book
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataGrabber.kt | 4 |
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_")) { |