diff options
author | Treeston <treeston.mmoc@gmail.com> | 2019-07-03 21:01:13 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-14 00:07:37 +0100 |
commit | 513b35ea2f7f679585e34a490685327c449e574b (patch) | |
tree | 3016a8c334ef9860e85fb1f1716a22a7934d7139 | |
parent | e0f3255f9001f69169b559b956057a6768048841 (diff) |
Entities/Unit: Properly unset engaged flag for creates that cannot have a threat list on combat exit. Fixes #23518.
(cherry picked from commit f44539b64247ff626c53dc899c4ac3023bf9aa80)
-rw-r--r-- | src/server/game/Combat/CombatManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Combat/CombatManager.cpp b/src/server/game/Combat/CombatManager.cpp index 67ebb233fa4..d6f7a55665b 100644 --- a/src/server/game/Combat/CombatManager.cpp +++ b/src/server/game/Combat/CombatManager.cpp @@ -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(); } |