use item.value instead of item.maxValue as base shop price

This fixes the issue of all shop prices being 5% more than they are supposed to (like dlong/d skimmy being 105k insread of 100k, and even spirit shards being 26 ea instead of 25 ea).
This commit is contained in:
vk 2021-09-25 13:25:48 -07:00
parent c1192c2331
commit 030476c244

View file

@ -708,7 +708,7 @@ open class Shop @JvmOverloads constructor(
open fun getBuyPrice(item: Item, player: Player): Int {
var item = item
item = Item(item.id, 1)
var price = item.definition.maxValue
var price = item.definition.value
val sellVal = getSellingValue(item, player)
if (price < sellVal) {
price = getSellingValue(player, 0, item) + sellVal - (sellVal - item.definition.maxValue)