diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-28 19:11:40 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-28 19:11:40 +0200 |
commit | 7eb3e77e5ce50989af3cd4ab2b196fb0df76e168 (patch) | |
tree | 2036c9b99d2475f546481ad88ab48091ba59c249 /src/main/java/at/hannibal2/skyhanni/features/bazaar | |
parent | 76c81de8442ccf2726abeecb8a73c0c6cab054db (diff) | |
download | skyhanni-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/bazaar')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarData.kt | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt | 24 |
2 files changed, 3 insertions, 22 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarData.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarData.kt index 3562be68a..daed03152 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarData.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarData.kt @@ -4,5 +4,4 @@ data class BazaarData( val displayName: String, val sellPrice: Double, val buyPrice: Double, - val npcPrice: Double, )
\ No newline at end of file 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 039b57540..61f19a630 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt @@ -18,6 +18,8 @@ class BazaarDataHolder { companion object { private val bazaarData = mutableMapOf<NEUInternalName, BazaarData>() private var npcPrices = mapOf<NEUInternalName, Double>() + + fun getNpcPrice(internalName: NEUInternalName) = npcPrices[internalName] } private fun loadNpcPrices(): MutableMap<NEUInternalName, Double> { @@ -66,29 +68,9 @@ class BazaarDataHolder { val displayName = stack.name!!.removeColor() val sellPrice = internalName.getPrice(true) val buyPrice = internalName.getPrice(false) - val npcPrice = npcPrices[internalName].let { - if (it == null) { - if (!ignoreNoNpcPrice(internalName)) { - LorenzUtils.debug("NPC price not found for '$internalName'") - } - 0.0 - } else it - } - val data = BazaarData(displayName, sellPrice, buyPrice, npcPrice) + val data = BazaarData(displayName, sellPrice, buyPrice) bazaarData[internalName] = data return data } - - private fun ignoreNoNpcPrice(internalName: NEUInternalName): Boolean { - if (internalName.startsWith("TURBO_")) 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 - - return false - } }
\ No newline at end of file |