diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/models/shops/ShopItem.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/models/shops/ShopItem.kt index 23a5b8cc44..996bd5d73b 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/models/shops/ShopItem.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/models/shops/ShopItem.kt @@ -74,6 +74,7 @@ open class ShopItem : RealmObject(), BaseObject { fun canAfford(user: User?, quantity: Int): Boolean = when (currency) { "gold" -> (value * quantity) <= (user?.stats?.gp ?: 0.0) "gems" -> (value * quantity) <= (user?.gemCount ?: 0) + "hourglasses" -> (value * quantity) <= (user?.hourglassCount ?: 0) else -> true }