diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt index 3694bf672..8a2c511b3 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigFileType +import at.hannibal2.skyhanni.config.features.inventory.SackDisplayConfig.PriceFrom import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.LorenzChatEvent @@ -89,9 +90,10 @@ object SackAPI { } private fun NEUInternalName.sackPrice(stored: String) = when (sackDisplayConfig.priceFrom) { - 0 -> (getPrice(true) * stored.formatNumber()).toLong().let { if (it < 0) 0L else it } + PriceFrom.BAZAAR -> (getPrice(true) * stored.formatNumber()).toLong() + .let { if (it < 0) 0L else it } - 1 -> try { + PriceFrom.NPC -> try { val npcPrice = getNpcPriceOrNull() ?: 0.0 (npcPrice * stored.formatNumber()).toLong() } catch (e: Exception) { |
