aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/slayer
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/slayer
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/slayer')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt
index e5f846252..c402becdb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt
@@ -15,6 +15,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector
import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc
+import at.hannibal2.skyhanni.utils.NEUItems.getNpcPrice
import at.hannibal2.skyhanni.utils.NEUItems.getPrice
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems
@@ -299,13 +300,13 @@ object SlayerItemProfitTracker {
}
private fun getPrice(internalName: NEUInternalName) =
- internalName.getBazaarData()?.let { getPrice(it) } ?: internalName.getPrice()
+ internalName.getBazaarData()?.let { getPrice(internalName, it) } ?: internalName.getPrice()
- private fun getPrice(bazaarData: BazaarData) = when (config.priceFrom) {
+ private fun getPrice(internalName: NEUInternalName, bazaarData: BazaarData) = when (config.priceFrom) {
0 -> bazaarData.sellPrice
1 -> bazaarData.buyPrice
- else -> bazaarData.npcPrice
+ else -> internalName.getNpcPrice()
}
@SubscribeEvent