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

View File

@@ -124,7 +124,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);
@@ -150,7 +150,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);