aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-28 19:11:40 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-28 19:11:40 +0200
commit7eb3e77e5ce50989af3cd4ab2b196fb0df76e168 (patch)
tree2036c9b99d2475f546481ad88ab48091ba59c249 /src/main/java/at/hannibal2/skyhanni/features/misc
parent76c81de8442ccf2726abeecb8a73c0c6cab054db (diff)
downloadskyhanni-7eb3e77e5ce50989af3cd4ab2b196fb0df76e168.tar.gz
skyhanni-7eb3e77e5ce50989af3cd4ab2b196fb0df76e168.tar.bz2
skyhanni-7eb3e77e5ce50989af3cd4ab2b196fb0df76e168.zip
Removing npc price from bazaar data and Fixed multiple bugs with garden visitor
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt
index 62cc85eae..9205b0154 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt
@@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.LorenzUtils.afterChange
import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy
+import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull
import at.hannibal2.skyhanni.utils.NEUItems.getPrice
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.NumberUtil.format
@@ -119,12 +120,13 @@ class EnderNodeTracker {
10_000.0
} else {
val internalName = key.internalName
- val bzData = internalName.getBazaarData()
- if (LorenzUtils.noTradeMode) {
- bzData?.npcPrice ?: georgePrice(key) ?: 0.0
+ val npcPrice = internalName.getNpcPriceOrNull()
+ val bazaarData = internalName.getBazaarData()
+ if (LorenzUtils.noTradeMode || bazaarData == null) {
+ npcPrice ?: georgePrice(key) ?: 0.0
} else {
- bzData?.npcPrice
- ?.coerceAtLeast(bzData.sellPrice)
+ npcPrice
+ ?.coerceAtLeast(bazaarData.sellPrice)
?.coerceAtLeast(georgePrice(key) ?: 0.0)
?: internalName.getPrice()
}