mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Unit: send npcs home after fear runs out (#25347)
* Core/Unit: send npcs home after fear runs out * Whoops, wrong
This commit is contained in:
@@ -11391,6 +11391,8 @@ void Unit::SetFeared(bool apply)
|
||||
GetMotionMaster()->Remove(FLEEING_MOTION_TYPE);
|
||||
if (GetVictim())
|
||||
SetTarget(EnsureVictim()->GetGUID());
|
||||
if (!IsPlayer() && !IsInCombat())
|
||||
GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user