Core/Movement: ported most movement updates from master branch and corrected behavior of CREATURE_STATIC_FLAG_4_PREVENT_SWIM

This commit is contained in:
Ovahlord committed 2025-03-09 20:49:41 +01:00
1 parent 83958342d9
commit 2953efb7a3
22 files changed
+306 -314

No files matched your search

+2 -2
View File
@@ -368,14 +368,14 @@ bool CombatManager::UpdateOwnerCombatState() const
if (combatState)
{
_owner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
_owner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT | UNIT_FLAG_PET_IN_COMBAT);
_owner->AtEnterCombat();
if (_owner->GetTypeId() != TYPEID_UNIT)
_owner->AtEngage(GetAnyTarget());
}
else
{
_owner->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
_owner->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT | UNIT_FLAG_PET_IN_COMBAT);
_owner->AtExitCombat();
if (_owner->GetTypeId() != TYPEID_UNIT)
_owner->AtDisengage();