mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
*Do not allow chase/follow self.
--HG-- branch : trunk
This commit is contained in:
@@ -245,7 +245,7 @@ void
|
||||
MotionMaster::MoveChase(Unit* target, float dist, float angle)
|
||||
{
|
||||
// ignore movement request if target not exist
|
||||
if(!target)
|
||||
if(!target || target == i_owner)
|
||||
return;
|
||||
|
||||
i_owner->clearUnitState(UNIT_STAT_FOLLOW);
|
||||
@@ -271,7 +271,7 @@ void
|
||||
MotionMaster::MoveFollow(Unit* target, float dist, float angle)
|
||||
{
|
||||
// ignore movement request if target not exist
|
||||
if(!target)
|
||||
if(!target || target == i_owner)
|
||||
return;
|
||||
|
||||
i_owner->addUnitState(UNIT_STAT_FOLLOW);
|
||||
|
||||
Reference in New Issue
Block a user