diff options
| author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-07-02 09:00:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-02 09:00:36 +0200 |
| commit | 8d0758ecf3ccffef632a3d6e2c84fd705a0035b7 (patch) | |
| tree | 0a533a927f1834ac23ada7dfe77a5d1dea9b2109 /src/main/java/at/hannibal2/skyhanni/features/misc | |
| parent | 30b08ee4185f6924857762f0ece55598a2a24bea (diff) | |
| download | skyhanni-8d0758ecf3ccffef632a3d6e2c84fd705a0035b7.tar.gz skyhanni-8d0758ecf3ccffef632a3d6e2c84fd705a0035b7.tar.bz2 skyhanni-8d0758ecf3ccffef632a3d6e2c84fd705a0035b7.zip | |
Fix: Gillsplash in Estimated Item Value (#2173)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt index 05d53fa65..1d6b21d2e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt @@ -16,8 +16,10 @@ import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull +import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull import at.hannibal2.skyhanni.utils.NEUItems.getPrice import at.hannibal2.skyhanni.utils.NEUItems.getPriceOrNull +import at.hannibal2.skyhanni.utils.NEUItems.getRawCraftCostOrNull import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getAbilityScrolls @@ -538,6 +540,17 @@ object EstimatedItemValueCalculator { price = 0.0 } + // If craft cost price is greater than npc price, and there is no ah/bz price, use craft cost instead + internalName.getNpcPriceOrNull()?.let { npcPrice -> + if (price == npcPrice) { + internalName.getRawCraftCostOrNull()?.let { rawCraftPrice -> + if (rawCraftPrice > npcPrice) { + price = rawCraftPrice + } + } + } + } + val name = internalName.itemName if (internalName.startsWith("ENCHANTED_BOOK_BUNDLE_")) { list.add("ยง7Base item: $name") |
