From 639f5cc75d9f63de5e63a197d1b0aed0ee659209 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 26 Dec 2021 19:57:05 -0500 Subject: [PATCH] Entities/Unit: Properly unset engaged flag for creates that cannot have a threat list on combat exit. Port From (https://github.com/TrinityCore/TrinityCore/commit/513b35ea2f7f679585e34a490685327c449e574b) --- Source/Game/Combat/CombatManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Game/Combat/CombatManager.cs b/Source/Game/Combat/CombatManager.cs index b4990b1dc..3a8d81ce8 100644 --- a/Source/Game/Combat/CombatManager.cs +++ b/Source/Game/Combat/CombatManager.cs @@ -284,7 +284,7 @@ namespace Game.Combat { _owner.RemoveUnitFlag(UnitFlags.InCombat); _owner.AtExitCombat(); - if (_owner.IsEngaged() && !(_owner.IsCreature() && _owner.ToCreature().IsAIEnabled())) + if (_owner.IsEngaged() && !(_owner.IsCreature() && _owner.CanHaveThreatList() && _owner.ToCreature().IsAIEnabled())) _owner.AtDisengage(); }