Core/SAI: Rename LeavingWorld to OnDespawn & use it in SAI (#28059)

(cherry picked from commit b9450bcdd0)
This commit is contained in:
offl
2022-06-26 21:48:41 +03:00
committed by Shauren
parent 496eba4e8d
commit b0164fb2b9
8 changed files with 18 additions and 5 deletions
@@ -676,6 +676,11 @@ void SmartAI::CorpseRemoved(uint32& respawnDelay)
GetScript()->ProcessEventsFor(SMART_EVENT_CORPSE_REMOVED, nullptr, respawnDelay);
}
void SmartAI::OnDespawn()
{
GetScript()->ProcessEventsFor(SMART_EVENT_ON_DESPAWN);
}
void SmartAI::PassengerBoarded(Unit* who, int8 seatId, bool apply)
{
GetScript()->ProcessEventsFor(apply ? SMART_EVENT_PASSENGER_BOARDED : SMART_EVENT_PASSENGER_REMOVED, who, uint32(seatId), 0, apply);