Core/AI: Remove EnterEvadeMode calls from Guardian/Summon spell handlers. Add follow logic to CreatureAI::JustAppeared.
Port From (https://github.com/TrinityCore/TrinityCore/commit/9f7d3ebd6a474c2e325698b1665ab2939926cab6)
This commit is contained in:
@@ -149,6 +149,20 @@ namespace Game.AI
|
||||
me.GetMotionMaster().MoveDistract(5 * Time.InMilliseconds, me.GetAbsoluteAngle(who));
|
||||
}
|
||||
|
||||
// Called when creature appears in the world (spawn, respawn, grid load etc...)
|
||||
public virtual void JustAppeared()
|
||||
{
|
||||
if (me.GetVehicle() == null)
|
||||
{
|
||||
Unit owner = me.GetCharmerOrOwner();
|
||||
if (owner != null)
|
||||
{
|
||||
me.GetMotionMaster().Clear();
|
||||
me.GetMotionMaster().MoveFollow(owner, SharedConst.PetFollowDist, me.GetFollowAngle());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Called for reaction at stopping attack at no attackers or targets
|
||||
public virtual void EnterEvadeMode(EvadeReason why = EvadeReason.Other)
|
||||
{
|
||||
@@ -393,9 +407,6 @@ namespace Game.AI
|
||||
|
||||
public virtual bool IsEscorted() { return false; }
|
||||
|
||||
// Called when creature appears in the world (spawn, respawn, grid load etc...)
|
||||
public virtual void JustAppeared() { }
|
||||
|
||||
public virtual void MovementInform(MovementGeneratorType type, uint id) { }
|
||||
|
||||
// Called when a spell cast gets interrupted
|
||||
|
||||
Reference in New Issue
Block a user