feat(Core/AI): port OnSpellStart/OnSpellCast/OnSpellFailed/OnChannelF… (#25026)

Co-authored-by: offl <11556157+offl@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Andrew 2026-03-07 18:02:58 -03:00 committed by GitHub
parent b632aa9dd6
commit 33a438a585
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 55 additions and 27 deletions

View file

@ -1250,10 +1250,10 @@ bool SmartAI::IsMainSpellPrevented(SpellInfo const* spellInfo) const
return false;
}
void SmartAI::OnSpellCastFinished(SpellInfo const* spell, SpellFinishReason reason)
void SmartAI::OnSpellFailed(SpellInfo const* spell)
{
CreatureAI::OnSpellCastFinished(spell, reason);
if (reason == SPELL_FINISHED_CANCELED && _mainSpellId == spell->Id)
CreatureAI::OnSpellFailed(spell);
if (_mainSpellId == spell->Id)
if (_currentRangeMode && IsMainSpellPrevented(spell))
SetCurrentRangeMode(false);
}