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)
|
public override void OnCharmed(bool isNew)
|
||||||
{
|
{
|
||||||
if (me.IsCharmed())
|
if (!me.IsPossessedByPlayer() && me.IsCharmed())
|
||||||
me.GetMotionMaster().MoveFollow(me.GetCharmer(), SharedConst.PetFollowDist, me.GetFollowAngle());
|
me.GetMotionMaster().MoveFollow(me.GetCharmer(), SharedConst.PetFollowDist, me.GetFollowAngle());
|
||||||
|
|
||||||
base.OnCharmed(isNew);
|
base.OnCharmed(isNew);
|
||||||
|
|||||||
@@ -1239,6 +1239,11 @@ namespace Game.Entities
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsPossessedByPlayer()
|
||||||
|
{
|
||||||
|
return HasUnitState(UnitState.Possessed) && GetCharmerGUID().IsPlayer();
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsPossessing()
|
public bool IsPossessing()
|
||||||
{
|
{
|
||||||
Unit u = GetCharmed();
|
Unit u = GetCharmed();
|
||||||
|
|||||||
Reference in New Issue
Block a user