Skip to content

Commit

Permalink
Fixed slayer profit tracker display and price problems with Wisp's Ic…
Browse files Browse the repository at this point in the history
…e Flavoured Water Potion.
  • Loading branch information
hannibal002 committed Dec 9, 2023
1 parent 19c5cd9 commit 533bd58
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ 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
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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 533bd58

Please sign in to comment.