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