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)
This commit is contained in:
hondacrx
2021-12-26 19:57:05 -05:00
parent a3f2e9f372
commit 639f5cc75d
+1 -1
View File
@@ -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();
}