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:
parent
b632aa9dd6
commit
33a438a585
8 changed files with 55 additions and 27 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue