diff --git a/Server/src/main/core/game/global/action/EquipHandler.kt b/Server/src/main/core/game/global/action/EquipHandler.kt index dc0059990..ea8414b35 100644 --- a/Server/src/main/core/game/global/action/EquipHandler.kt +++ b/Server/src/main/core/game/global/action/EquipHandler.kt @@ -66,11 +66,16 @@ class EquipHandler : InteractionListener { /* TODO: Send different equip sound based on what is being equip.*/ player.audioManager.send(item.definition.getConfiguration(ItemConfigParser.EQUIP_AUDIO, 2244)) + if (player.properties.autocastSpell != null) { - player.properties.autocastSpell = null - val wif = player.getExtension(WeaponInterface::class.java) - wif.selectAutoSpell(-1, true) - wif.openAutocastSelect() + val itemEquipmentSlot = item.definition.getConfiguration(ItemConfigParser.EQUIP_SLOT, -1) + + if (itemEquipmentSlot == EquipmentContainer.SLOT_WEAPON) { + player.properties.autocastSpell = null + val wif = player.getExtension(WeaponInterface::class.java) + wif.selectAutoSpell(-1, true) + wif.openAutocastSelect() + } } if (SlayerEquipmentFlags.isSlayerEq(item.id)) {