mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-04 13:57:52 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user