diff --git a/Server/src/main/content/minigame/mta/EnchantSpell.kt b/Server/src/main/content/minigame/mta/EnchantSpell.kt index fc8878a27..07cebf2a6 100644 --- a/Server/src/main/content/minigame/mta/EnchantSpell.kt +++ b/Server/src/main/content/minigame/mta/EnchantSpell.kt @@ -14,6 +14,7 @@ import core.game.world.update.flag.context.Animation import core.game.world.update.flag.context.Graphics import core.plugin.Plugin import org.rs09.consts.Items +import core.api.* /** * Represents the enchant spells. @@ -46,11 +47,12 @@ class EnchantSpell : MagicSpell { if (target !is Item || entity !is Player) { return false } - entity.interfaceManager.setViewedTab(6) + //entity.interfaceManager.setViewedTab(6) val enchanted = jewellery?.getOrDefault(target.id,null) if (enchanted == null) { entity.packetDispatch.sendMessage("You can't use this spell on this item.") + entity.interfaceManager.setViewedTab(6) return false } if (!meetsRequirements(entity, true, true)) { @@ -89,6 +91,13 @@ class EnchantSpell : MagicSpell { content.minigame.mta.impl.EnchantingZone.ZONE.incrementPoints(entity, MTAType.ENCHANTERS.ordinal, pizazz) } } + + // Snowscape: if there are more items to enchant, run the spell again + if (entity.inventory.containsAtLeastOneItem(target)) { + runTask(entity, 2){ + castSpell(entity as Player, super.book, super.spellId, target) + } + } return true }