mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-25 07:59:42 -04:00
Core/AI: OnSpellCast, OnSpellFailed, OnSpellStart hooks (#27704)
(cherry picked from commit 3dca705acc)
This commit is contained in:
@@ -3164,6 +3164,20 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_ON_SPELL_CAST:
|
||||
case SMART_EVENT_ON_SPELL_FAILED:
|
||||
case SMART_EVENT_ON_SPELL_START:
|
||||
{
|
||||
if (!spell)
|
||||
return;
|
||||
|
||||
if (spell->Id != e.event.spellCast.spell)
|
||||
return;
|
||||
|
||||
RecalcTimer(e, e.event.spellCast.cooldownMin, e.event.spellCast.cooldownMax);
|
||||
ProcessAction(e, nullptr, 0, 0, bvar, spell);
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_OOC_LOS:
|
||||
{
|
||||
if (!me || me->IsEngaged())
|
||||
|
||||
Reference in New Issue
Block a user