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:
@@ -396,6 +396,14 @@ namespace Game.Combat
|
||||
_myThreatListEntries.FirstOrDefault().Value.UnregisterAndFree();
|
||||
while (!_myThreatListEntries.Empty());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// THIS SHOULD ONLY BE CALLED FROM A CREATURE'S AI (typically in EnterEvadeMode)
|
||||
/// notify the unit that the AI has disengaged
|
||||
/// </summary>
|
||||
public void NotifyDisengaged()
|
||||
{
|
||||
// note: i don't really like having this here
|
||||
// (maybe engage flag should be in creature ai? it's inherently an AI property...)
|
||||
if (_owner.IsEngaged())
|
||||
|
||||
Reference in New Issue
Block a user