From a5eb1ea9298cb2a1660943171f8a2b68ad139cfe Mon Sep 17 00:00:00 2001 From: randy Date: Mon, 17 Mar 2025 10:42:24 -0600 Subject: [PATCH] Elemental Battlestaves can optionally be crafted with a Dramen staff instead of a Battlestaff --- .../content/global/skill/crafting/BattlestaffListener.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Server/src/main/content/global/skill/crafting/BattlestaffListener.kt b/Server/src/main/content/global/skill/crafting/BattlestaffListener.kt index 54a82b557..bb31a0689 100644 --- a/Server/src/main/content/global/skill/crafting/BattlestaffListener.kt +++ b/Server/src/main/content/global/skill/crafting/BattlestaffListener.kt @@ -10,11 +10,11 @@ import kotlin.math.min class BattlestaffListener : InteractionListener { - private val battlestaff = Items.BATTLESTAFF_1391 + private val battlestaff = intArrayOf(Items.BATTLESTAFF_1391, Items.DRAMEN_STAFF_772) val orbs = BattlestaffProduct.values().map { it.requiredOrbItemId }.toIntArray() override fun defineListeners() { - onUseWith(IntType.ITEM, orbs, battlestaff) { player, used, with -> + onUseWith(IntType.ITEM, orbs, *battlestaff) { player, used, with -> val product = BattlestaffProduct.productMap[used.id] ?: return@onUseWith true if (!hasLevelDyn(player, Skills.CRAFTING, product.minimumLevel)) { @@ -25,7 +25,7 @@ class BattlestaffListener : InteractionListener { // Avoids sending dialogue if only one can be created if (amountInInventory(player, used.id) == 1 || amountInInventory(player, with.id) == 1) { - if (removeItem(player, product.requiredOrbItemId) && removeItem(player, Items.BATTLESTAFF_1391)) { + if (removeItem(player, product.requiredOrbItemId) && removeItem(player, with.id)) { addItem(player, product.producedItemId, product.amountProduced) rewardXP(player, Skills.CRAFTING, product.experience) } @@ -44,7 +44,7 @@ class BattlestaffListener : InteractionListener { runTask(player, 2, amount) { if (amount < 1) return@runTask - if (removeItem(player, product.requiredOrbItemId) && removeItem(player, Items.BATTLESTAFF_1391)) { + if (removeItem(player, product.requiredOrbItemId) && removeItem(player, with.id)) { addItem(player, product.producedItemId, product.amountProduced) rewardXP(player, Skills.CRAFTING, product.experience) }