summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
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/utils
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/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
index b706bfb68..bf97892bb 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.utils
import at.hannibal2.skyhanni.config.ConfigManager
+import at.hannibal2.skyhanni.features.bazaar.BazaarDataHolder
import at.hannibal2.skyhanni.test.command.CopyErrorCommand
import at.hannibal2.skyhanni.utils.ItemBlink.checkBlinkItem
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
@@ -138,11 +139,16 @@ object NEUItems {
fun NEUInternalName.getPriceOrNull(useSellingPrice: Boolean = false): Double? {
val price = getPrice(useSellingPrice)
if (price == -1.0) {
+ getNpcPrice()
return null
}
return price
}
+ fun NEUInternalName.getNpcPrice() = getNpcPriceOrNull() ?: -1.0
+
+ fun NEUInternalName.getNpcPriceOrNull() = BazaarDataHolder.getNpcPrice(this)
+
fun transHypixelNameToInternalName(hypixelId: String) =
manager.auctionManager.transformHypixelBazaarToNEUItemId(hypixelId).asInternalName()