Combat/Threat: Split ThreatManager::NotifyDisengaged off from ThreatManager::ClearAllThreat. NotifyDisengaged signifies intent to clear the engagement flag, and should only be called from AI.

Port From (https://github.com/TrinityCore/TrinityCore/commit/38d7c1530a65a7ff1bd10775c4a35269b2416538)
This commit is contained in:
hondacrx
2021-12-24 20:15:10 -05:00
parent 3c38758f09
commit 3cf7f6b831
8 changed files with 15 additions and 12 deletions
+2 -2
View File
@@ -48,15 +48,15 @@ namespace Game.AI
{
me.GetMotionMaster().MoveIdle();
me.CombatStop(true);
me.GetThreatManager().ClearAllThreat();
me.GetThreatManager().NotifyDisengaged();
return;
}
Log.outDebug(LogFilter.Unit, "Guard entry: {0} enters evade mode.", me.GetEntry());
me.RemoveAllAuras();
me.GetThreatManager().ClearAllThreat();
me.CombatStop(true);
me.GetThreatManager().NotifyDisengaged();
me.GetMotionMaster().MoveTargetedHome();
}