From 5607930d95e526c529dac318d8e958b7b4de052b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 9 Aug 2023 14:21:22 +0200 Subject: Using NEUInternalName in more classes --- .../hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt | 12 ++++++------ .../skyhanni/features/slayer/SlayerItemProfitTracker.kt | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt index 76e4b3f77..039b57540 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt @@ -68,7 +68,7 @@ class BazaarDataHolder { val buyPrice = internalName.getPrice(false) val npcPrice = npcPrices[internalName].let { if (it == null) { - if (!ignoreNoNpcPrice(internalName.asString())) { + if (!ignoreNoNpcPrice(internalName)) { LorenzUtils.debug("NPC price not found for '$internalName'") } 0.0 @@ -80,12 +80,12 @@ class BazaarDataHolder { return data } - private fun ignoreNoNpcPrice(internalName: String): Boolean { + private fun ignoreNoNpcPrice(internalName: NEUInternalName): Boolean { if (internalName.startsWith("TURBO_")) return true - if (internalName == "PURPLE_CANDY") return true - if (internalName == "JACOBS_TICKET") return true - if (internalName == "RAW_SOULFLOW") return true - if (internalName == "DERELICT_ASHE") return true + if (internalName.equals("PURPLE_CANDY")) return true + if (internalName.equals("JACOBS_TICKET")) return true + if (internalName.equals("RAW_SOULFLOW")) return true + if (internalName.equals("DERELICT_ASHE")) return true if (internalName.contains(";")) return true 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 57a7a5621..e5f846252 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt @@ -180,7 +180,7 @@ object SlayerItemProfitTracker { val price = (getPrice(internalName) * amount).toLong() - val cleanName = SlayerAPI.getNameWithEnchantmentFor(internalName) ?: internalName.asString() + val cleanName = SlayerAPI.getNameWithEnchantmentFor(internalName) var name = cleanName val priceFormat = NumberUtil.format(price) val hidden = itemProfit.hidden -- cgit