AI/SmartAI: Move SMART_EVENT_RESPAWN invocation from ::InitializeAI() to ::JustAppeared().

Port From (https://github.com/TrinityCore/TrinityCore/commit/e398bb16648b483c97a68b2a29b25173b2a71261)
This commit is contained in:
hondacrx
2021-12-23 20:24:47 -05:00
parent 2d87d0c75d
commit 3c38758f09
+9 -6
View File
@@ -568,12 +568,6 @@ namespace Game.AI
me.SetVisible(true);
if (!me.IsDead())
{
GetScript().ProcessEventsFor(SmartEvents.Respawn);
GetScript().OnReset();
}
_followGuid.Clear();//do not reset follower on Reset(), we need it after combat evade
_followDist = 0;
_followAngle = 0;
@@ -583,6 +577,15 @@ namespace Game.AI
_followCreditType = 0;
}
public override void JustAppeared()
{
if (me.IsDead())
return;
GetScript().ProcessEventsFor(SmartEvents.Respawn);
GetScript().OnReset();
}
public override void JustReachedHome()
{
GetScript().OnReset();