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

This commit is contained in:
offl
2022-06-26 21:48:41 +03:00
committed by GitHub
parent f0d2418e5f
commit b9450bcdd0
8 changed files with 18 additions and 5 deletions

View File

@@ -123,7 +123,7 @@ struct npc_pet_gen_soul_trader : public ScriptedAI
{
npc_pet_gen_soul_trader(Creature* creature) : ScriptedAI(creature) { }
void LeavingWorld() override
void OnDespawn() override
{
if (Unit* owner = me->GetOwner())
DoCast(owner, SPELL_ETHEREAL_PET_REMOVE_AURA);
@@ -149,7 +149,7 @@ struct npc_pet_lich : public ScriptedAI
{
npc_pet_lich(Creature* creature) : ScriptedAI(creature) { }
void LeavingWorld() override
void OnDespawn() override
{
if (Unit* owner = me->GetOwner())
DoCast(owner, SPELL_LICH_REMOVE_AURA);