Fix bulk buying gems

This commit is contained in:
Phillip Thelen 2020-09-03 16:18:00 +02:00
parent 8c61fa7950
commit f34ec2724f

View file

@ -69,7 +69,7 @@ open class ShopItem : RealmObject() {
get() = "pets" == purchaseType || "mounts" == purchaseType
val canPurchaseBulk: Boolean
get() = "eggs" == purchaseType || "hatchingPotions" == purchaseType || "food" == purchaseType
get() = "eggs" == purchaseType || "hatchingPotions" == purchaseType || "food" == purchaseType || "gems" == purchaseType
fun canAfford(user: User?, quantity: Int): Boolean = when(currency) {
"gold" -> (value * quantity) <= user?.stats?.gp ?: 0.0