aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-09 11:56:24 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-09 11:56:24 +0100
commit533bd580df0b689e4a0c67d5a83f2aab2bf9eb91 (patch)
tree19360446ebb18f5a743f49bec13781bc4f9ad7ff /src
parent19c5cd978a55ecb7bc5f09230e57bbd82162b2fd (diff)
downloadskyhanni-533bd580df0b689e4a0c67d5a83f2aab2bf9eb91.tar.gz
skyhanni-533bd580df0b689e4a0c67d5a83f2aab2bf9eb91.tar.bz2
skyhanni-533bd580df0b689e4a0c67d5a83f2aab2bf9eb91.zip
Fixed slayer profit tracker display and price problems with Wisp's Ice Flavoured Water Potion.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt5
3 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
index f46b98a7d..0ade3f245 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
@@ -178,6 +178,7 @@ object EstimatedItemValue {
// Hides the rune item
if (internalName.contains("_RUNE;")) return listOf()
if (internalName.contains("UNIQUE_RUNE")) return listOf()
+ if (internalName.contains("WISP_POTION")) return listOf()
if (internalName.getItemStackOrNull() == null) {
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
index 7965a2ded..02c8dff54 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
@@ -145,7 +145,12 @@ object NEUItems {
fun NEUInternalName.getNpcPrice() = getNpcPriceOrNull() ?: -1.0
- fun NEUInternalName.getNpcPriceOrNull() = BazaarDataHolder.getNpcPrice(this)
+ fun NEUInternalName.getNpcPriceOrNull(): Double? {
+ if (equals("WISP_POTION")) {
+ return 20_000.0
+ }
+ return BazaarDataHolder.getNpcPrice(this)
+ }
fun transHypixelNameToInternalName(hypixelId: String) =
manager.auctionManager.transformHypixelBazaarToNEUItemId(hypixelId).asInternalName()
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt
index 2ca14d2cb..da238d01d 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt
@@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.utils.tracker
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.Storage
import at.hannibal2.skyhanni.test.PriceSource
-import at.hannibal2.skyhanni.utils.ItemUtils.nameWithEnchantment
+import at.hannibal2.skyhanni.utils.ItemUtils.getNameWithEnchantment
import at.hannibal2.skyhanni.utils.KeyboardManager
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
@@ -11,7 +11,6 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector
import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
-import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
import at.hannibal2.skyhanni.utils.NumberUtil
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
@@ -79,7 +78,7 @@ class SkyHanniItemTracker<Data : ItemTrackerData>(
val cleanName = if (internalName == SKYBLOCK_COIN) {
data.getCoinName(itemProfit)
} else {
- internalName.getItemStack().nameWithEnchantment ?: error("no name for $internalName")
+ internalName.getNameWithEnchantment()
}
val priceFormat = NumberUtil.format(price)