aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKillyana <Killyana@users.noreply.github.com>2019-03-13 23:24:51 +0100
committerGitHub <noreply@github.com>2019-03-13 23:24:51 +0100
commit75a8639242c9d28deaa0565aba138d2e05b12db9 (patch)
tree6dfd663a772aedbb8b6cca6ece74a7f22286d10a /src
parentfa8c0dd534723a573268ccd8bb40c0846cb35936 (diff)
Core/SAI: Fix the respawn event for GameObjects (#23112)
Closes #22612
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index f876c1b2d73..3f9502a9ddc 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -996,6 +996,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();
}