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>
This commit is contained in:
Rocco Silipo
2026-07-21 08:24:18 +02:00
committed by GitHub
parent 8eb009fdfc
commit 1eb3749b3b
2 changed files with 11 additions and 2 deletions

View File

@@ -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);
}