aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/BazaarPriceStrategy.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-01-15 00:32:43 +0100
committerLinnea Gräf <nea@nea.moe>2024-01-17 21:10:51 +0100
commitac151c8ebc4c5546795cdbf5b0c179183e2c71d1 (patch)
tree52141110008ba6809d0dde5bc4456fc37e6a665a /src/main/kotlin/moe/nea/firmament/util/BazaarPriceStrategy.kt
parentc49b65835d37266508561e60782bda36275fb8ae (diff)
downloadFirmament-ac151c8ebc4c5546795cdbf5b0c179183e2c71d1.tar.gz
Firmament-ac151c8ebc4c5546795cdbf5b0c179183e2c71d1.tar.bz2
Firmament-ac151c8ebc4c5546795cdbf5b0c179183e2c71d1.zip
Add Pristine Profit Tracker
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/BazaarPriceStrategy.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/BazaarPriceStrategy.kt24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/BazaarPriceStrategy.kt b/src/main/kotlin/moe/nea/firmament/util/BazaarPriceStrategy.kt
new file mode 100644
index 0000000..8b746cc
--- /dev/null
+++ b/src/main/kotlin/moe/nea/firmament/util/BazaarPriceStrategy.kt
@@ -0,0 +1,24 @@
+/*
+ * SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe>
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+package moe.nea.firmament.util
+
+import moe.nea.firmament.repo.HypixelStaticData
+
+enum class BazaarPriceStrategy {
+ BUY_ORDER,
+ SELL_ORDER,
+ NPC_SELL;
+
+ fun getSellPrice(skyblockId: SkyblockId): Double {
+ val bazaarEntry = HypixelStaticData.bazaarData[skyblockId] ?: return 0.0
+ return when (this) {
+ BUY_ORDER -> bazaarEntry.quickStatus.sellPrice
+ SELL_ORDER -> bazaarEntry.quickStatus.buyPrice
+ NPC_SELL -> TODO()
+ }
+ }
+}