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 7e6f17a701cf8aaff092b17e544f1d13556913af)
This commit is contained in:
Jinnaix
2022-02-04 12:19:36 +01:00
committed by Shauren
parent 4051ccd1bd
commit 6830d883ad
+2
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();
}
}