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:
@@ -568,12 +568,6 @@ namespace Game.AI
|
|||||||
|
|
||||||
me.SetVisible(true);
|
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
|
_followGuid.Clear();//do not reset follower on Reset(), we need it after combat evade
|
||||||
_followDist = 0;
|
_followDist = 0;
|
||||||
_followAngle = 0;
|
_followAngle = 0;
|
||||||
@@ -583,6 +577,15 @@ namespace Game.AI
|
|||||||
_followCreditType = 0;
|
_followCreditType = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void JustAppeared()
|
||||||
|
{
|
||||||
|
if (me.IsDead())
|
||||||
|
return;
|
||||||
|
|
||||||
|
GetScript().ProcessEventsFor(SmartEvents.Respawn);
|
||||||
|
GetScript().OnReset();
|
||||||
|
}
|
||||||
|
|
||||||
public override void JustReachedHome()
|
public override void JustReachedHome()
|
||||||
{
|
{
|
||||||
GetScript().OnReset();
|
GetScript().OnReset();
|
||||||
|
|||||||
Reference in New Issue
Block a user