Core/AI: Added CreatureAI hook that is getting triggered when a spell cast has been successfully finished.

This commit is contained in:
hondacrx
2018-04-12 18:14:14 -04:00
parent d72ab68d4a
commit 70fb5c6fd8
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -2954,6 +2954,12 @@ namespace Game.Spells
hitMask |= ProcFlagsHit.Normal;
m_originalCaster.ProcSkillsAndAuras(null, procAttacker, ProcFlags.None, ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.Cast, hitMask, this, null, null);
// Call CreatureAI hook OnSuccessfulSpellCast
Creature caster = m_originalCaster.ToCreature();
if (caster)
if (caster.IsAIEnabled)
caster.GetAI().OnSuccessfulSpellCast(GetSpellInfo());
}
void handle_immediate()