diff --git a/Server/src/main/content/region/misthalin/lumbridge/handlers/CulinomancerShop.kt b/Server/src/main/content/region/misthalin/lumbridge/handlers/CulinomancerShop.kt index e82bcce41..727743512 100644 --- a/Server/src/main/content/region/misthalin/lumbridge/handlers/CulinomancerShop.kt +++ b/Server/src/main/content/region/misthalin/lumbridge/handlers/CulinomancerShop.kt @@ -14,9 +14,9 @@ import kotlin.collections.HashMap class CulinomancerShop : LoginListener { //Enable the chest if the player has 18 quest points or more override fun login(player: Player) { - if(player.questRepository.points >= 18){ + if(player.questRepository.points >= 10){ setVarbit(player, 1850, 5) - setAttribute(player, "culino-tier", player.questRepository.points / 18) //Set this, so we can check if the player has gained a tier during server runtime + setAttribute(player, "culino-tier", player.questRepository.points / 10) //Set this, so we can check if the player has gained a tier during server runtime //Restock pulse for this player (yes, this means the chest will only restock if the player has logged in. Shop system needs work in order to do otherwise.) val restockPulse = object : Pulse(100){ //Run once a minute @@ -49,7 +49,7 @@ class CulinomancerShop : LoginListener { fun getShop(player: Player, food: Boolean): Shop { val uid = player.details.uid val points = player.questRepository.points - val tier = (points / 18) + val tier = (points / 10) if (tier != getAttribute(player, "culino-tier", 0)) //If player tier has changed { foodShops.remove(uid) //Clear the previous shops, so they can regenerate with the new tier @@ -69,7 +69,7 @@ class CulinomancerShop : LoginListener { //Generate default food stock based on an amount of total QP. private fun generateFoodStock(points: Int): Array { val stock = Array(foodStock.size) { ShopItem(0, 0) } - val maxQty = when (val qpTier = (points / 18) - 1) { + val maxQty = when (val qpTier = (points / 10) - 1) { 0, 1, 2, 3, 4 -> 1 + qpTier else -> qpTier + (qpTier + (qpTier - 5)) //5 = 10, 6 = 13, 7 = 15, etc } @@ -83,14 +83,14 @@ class CulinomancerShop : LoginListener { //Generate default gear stock based on an amount of total QP. private fun generateGearStock(points: Int): Array { val stock = Array(gearStock.size) { ShopItem(0, 0) } - val qpTier = (points / 18) + val qpTier = (points / 10) for ((index, item) in stock.withIndex()) item.itemId = gearStock[index] for (i in 0 until min(qpTier, 10)) { stock[i].amount = 30 stock[i + 10].amount = 5 } - stock[9].amount = 1 + //stock[9].amount = 1 return stock }