From 1eb3749b3b376391c20f31377467aa858b2b9a99 Mon Sep 17 00:00:00 2001 From: Rocco Silipo <108557877+Rorschach91@users.noreply.github.com> Date: Tue, 21 Jul 2026 08:24:18 +0200 Subject: [PATCH] fix(Core/Script): Creatures will not interrupt channeling spells anymore on engage if the spell has attribute "Allow Actions During Channeling". (#26710) Co-authored-by: sogladev <46423958+sogladev@users.noreply.github.com> --- src/server/game/AI/SmartScripts/SmartAI.cpp | 9 ++++++++- src/server/game/Entities/Unit/Unit.cpp | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index b1dafb95c..18e3cbcfa 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -876,7 +876,14 @@ void SmartAI::JustEngagedWith(Unit* enemy) { // Xinef: Interrupt channeled spells if (IsAIControlled()) - me->InterruptSpell(CURRENT_CHANNELED_SPELL, true, true); + { + if (Spell* spell = me->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) + { + if (!spell->GetSpellInfo()->IsActionAllowedChannel()) + me->InterruptSpell(CURRENT_CHANNELED_SPELL, true, true); + } + } + GetScript()->ProcessEventsFor(SMART_EVENT_AGGRO, enemy); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 614632961..9af94cbb5 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4191,7 +4191,9 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell) if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL] && m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Id != 75) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); - AddUnitState(UNIT_STATE_CASTING); + + if (!pSpell->GetSpellInfo()->IsActionAllowedChannel()) + AddUnitState(UNIT_STATE_CASTING); break; }