mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Entities/Unit: Properly unset engaged flag for creates that cannot have a threat list on combat exit. Fixes #23518.
This commit is contained in:
@@ -344,7 +344,7 @@ bool CombatManager::UpdateOwnerCombatState() const
|
||||
{
|
||||
_owner->RemoveFlag(UNIT_FIELD_FLAGS, 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