summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data/bazaar
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-09 20:46:52 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-09 20:46:52 +0200
commitf052dda969869365afcb2f1fc89c899a56545feb (patch)
treef6344d8ef8691108cb3ae206bc761860d2c2c611 /src/main/java/at/hannibal2/skyhanni/data/bazaar
parent1181b4a7bdb7cd46144d5550abcd56e2ba284b4d (diff)
downloadskyhanni-f052dda969869365afcb2f1fc89c899a56545feb.tar.gz
skyhanni-f052dda969869365afcb2f1fc89c899a56545feb.tar.bz2
skyhanni-f052dda969869365afcb2f1fc89c899a56545feb.zip
additional changes to editorconfig and random code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/bazaar')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt
index 6573cdb75..dfbb08164 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt
@@ -63,7 +63,7 @@ object HypixelBazaarFetcher {
private fun process(products: Map<String, BazaarProduct>) = products.mapNotNull { (key, product) ->
val internalName = NEUItems.transHypixelNameToInternalName(key)
val sellOfferPrice = product.buySummary.minOfOrNull { it.pricePerUnit } ?: 0.0
- val insantBuyPrice = product.sellSummary.maxOfOrNull { it.pricePerUnit } ?: 0.0
+ val instantBuyPrice = product.sellSummary.maxOfOrNull { it.pricePerUnit } ?: 0.0
if (product.quickStatus.isEmpty()) {
return@mapNotNull null
@@ -72,11 +72,10 @@ object HypixelBazaarFetcher {
if (internalName.getItemStackOrNull() == null) {
// Items that exist in Hypixel's Bazaar API, but not in NEU repo (not visible in the ingame bazaar).
// Should only include Enchants
- if (LorenzUtils.debug)
- println("Unknown bazaar product: $key/$internalName")
+ if (LorenzUtils.debug) println("Unknown bazaar product: $key/$internalName")
return@mapNotNull null
}
- internalName to BazaarData(internalName.itemName, sellOfferPrice, insantBuyPrice, product)
+ internalName to BazaarData(internalName.itemName, sellOfferPrice, instantBuyPrice, product)
}.toMap()
private fun BazaarQuickStatus.isEmpty(): Boolean = with(this) {
@@ -104,7 +103,7 @@ object HypixelBazaarFetcher {
userMessage,
"fetchType" to fetchType,
"failedAttepmts" to failedAttempts,
- "rawResponse" to rawResponse
+ "rawResponse" to rawResponse,
)
}
}