Core/Unit: send npcs home after fear runs out (#25347)

* Core/Unit: send npcs home after fear runs out

* Whoops, wrong

(cherry picked from commit 7e6f17a701)
This commit is contained in:
Jinnaix
2020-08-29 14:31:58 +02:00
committed by Shauren
parent 4051ccd1bd
commit 6830d883ad

View File

@@ -10921,6 +10921,8 @@ void Unit::SetFeared(bool apply)
GetMotionMaster()->Remove(FLEEING_MOTION_TYPE);
if (GetVictim())
SetTarget(EnsureVictim()->GetGUID());
if (!IsPlayer() && !IsInCombat())
GetMotionMaster()->MoveTargetedHome();
}
}