Core/Pets: Do not force pets to follow their charmer when possessed by player
Port From (https://github.com/TrinityCore/TrinityCore/commit/8f02596162715b273b1a830425ae783bd00561c9)
This commit is contained in:
@@ -633,7 +633,7 @@ namespace Game.AI
|
||||
|
||||
public override void OnCharmed(bool isNew)
|
||||
{
|
||||
if (me.IsCharmed())
|
||||
if (!me.IsPossessedByPlayer() && me.IsCharmed())
|
||||
me.GetMotionMaster().MoveFollow(me.GetCharmer(), SharedConst.PetFollowDist, me.GetFollowAngle());
|
||||
|
||||
base.OnCharmed(isNew);
|
||||
|
||||
@@ -1239,6 +1239,11 @@ namespace Game.Entities
|
||||
return;
|
||||
}
|
||||
|
||||
public bool IsPossessedByPlayer()
|
||||
{
|
||||
return HasUnitState(UnitState.Possessed) && GetCharmerGUID().IsPlayer();
|
||||
}
|
||||
|
||||
public bool IsPossessing()
|
||||
{
|
||||
Unit u = GetCharmed();
|
||||
|
||||
Reference in New Issue
Block a user