Entities/Unit: Properly unset engaged flag for creates that cannot have a threat list on combat exit. Fixes #23518.

(cherry picked from commit f44539b642)
This commit is contained in:
Treeston
2019-07-03 21:01:13 +02:00
committed by Shauren
parent e0f3255f90
commit 513b35ea2f

View File

@@ -343,7 +343,7 @@ bool CombatManager::UpdateOwnerCombatState() const
{
_owner->RemoveUnitFlag(UNIT_FLAG_IN_COMBAT);
_owner->AtExitCombat();
if (_owner->IsEngaged() && !(_owner->ToCreature() && _owner->ToCreature()->IsAIEnabled()))
if (_owner->IsEngaged() && !(_owner->ToCreature() && _owner->CanHaveThreatList() && _owner->ToCreature()->IsAIEnabled()))
_owner->AtDisengage();
}