Core/SAI: Fix the respawn event for GameObjects (#23112)

Closes #22612

(cherry picked from commit 75a8639242c9d28deaa0565aba138d2e05b12db9)
This commit is contained in:
Killyana
2021-11-24 22:15:52 +01:00
committed by Shauren
parent 2b53b4e9af
commit da1166db98
@@ -998,6 +998,9 @@ void SmartGameObjectAI::UpdateAI(uint32 diff)
void SmartGameObjectAI::InitializeAI()
{
GetScript()->OnInitialize(me);
// do not call respawn event if go is not spawned
if (me->isSpawned())
GetScript()->ProcessEventsFor(SMART_EVENT_RESPAWN);
//Reset();
}