feat(Core/SmartScripts): SMART_EVENT_SUMMONED_UNIT_EVADE (#18018)

* feat(Core/SmartScripts): SMART_EVENT_SUMMONED_UNIT_EVADE

* .
This commit is contained in:
avarishd
2023-12-15 14:43:24 +02:00
committed by GitHub
parent 9df2c485fc
commit 03d06da87b
8 changed files with 49 additions and 6 deletions

View File

@@ -817,6 +817,11 @@ void SmartAI::SummonedCreatureDies(Creature* summon, Unit* /*killer*/)
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT_DIES, summon);
}
void SmartAI::SummonedCreatureEvade(Creature* summon)
{
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT_EVADE, summon);
}
void SmartAI::AttackStart(Unit* who)
{
// xinef: dont allow charmed npcs to act on their own
@@ -1136,6 +1141,11 @@ void SmartGameObjectAI::SummonedCreatureDies(Creature* summon, Unit* /*killer*/)
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT_DIES, summon);
}
void SmartGameObjectAI::SummonedCreatureEvade(Creature* summon)
{
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT_EVADE, summon);
}
void SmartGameObjectAI::UpdateAI(uint32 diff)
{
GetScript()->OnUpdate(diff);