mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 05:55:07 +00:00
fix(Core/AI): fix OnSpellFailed crash on TempSummon despawn (#25036)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3733,11 +3733,6 @@ void Spell::cancel(bool bySelf)
|
||||
|
||||
sScriptMgr->OnSpellCastCancel(this, m_caster, m_spellInfo, bySelf);
|
||||
|
||||
// Call CreatureAI hook OnSpellFailed only for true interrupts/cancels, not prepare-time failures
|
||||
if (Creature* creatureCaster = m_caster->ToCreature())
|
||||
if (creatureCaster->IsAIEnabled)
|
||||
creatureCaster->AI()->OnSpellFailed(m_spellInfo);
|
||||
|
||||
finish(false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user