mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 05:29:43 -04:00
Core/AI: OnSpellCast, OnSpellFailed, OnSpellStart hooks (#27704)
(cherry picked from commit 3dca705acc)
This commit is contained in:
@@ -620,6 +620,21 @@ void SmartAI::SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo)
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SPELLHIT_TARGET, target->ToUnit(), 0, 0, false, spellInfo, target->ToGameObject());
|
||||
}
|
||||
|
||||
void SmartAI::OnSpellCast(SpellInfo const* spellInfo)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_ON_SPELL_CAST, nullptr, 0, 0, false, spellInfo);
|
||||
}
|
||||
|
||||
void SmartAI::OnSpellFailed(SpellInfo const* spellInfo)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_ON_SPELL_FAILED, nullptr, 0, 0, false, spellInfo);
|
||||
}
|
||||
|
||||
void SmartAI::OnSpellStart(SpellInfo const* spellInfo)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_ON_SPELL_START, nullptr, 0, 0, false, spellInfo);
|
||||
}
|
||||
|
||||
void SmartAI::DamageTaken(Unit* doneBy, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DAMAGED, doneBy, damage);
|
||||
|
||||
Reference in New Issue
Block a user