Entities/Unit: Properly unset engaged flag for creates that cannot have a threat list on combat exit. Fixes #23518.
(cherry picked from commit f44539b64247ff626c53dc899c4ac3023bf9aa80)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user