diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index f320a34beb..cfc25cbf0b 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2930,7 +2930,7 @@ void Creature::InitializeMovementCapabilities() SetDisableGravity(IsFloating()); SetControlled(IsSessile(), UNIT_STATE_ROOT); - if (IsSwimPrevented()) + if (CanOnlySwimIfTargetSwims()) { SetUnitFlag2(UNIT_FLAG2_AI_WILL_ONLY_SWIM_IF_TARGET_SWIMS); SetSwim(false); diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 8a6e6162a5..5015b0080d 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -154,10 +154,10 @@ class TC_GAME_API Creature : public Unit, public GridObject, public Ma bool IsSwimDisabled() const { return _staticFlags.HasFlag(CREATURE_STATIC_FLAG_3_CANT_SWIM); } // Returns true if CREATURE_STATIC_FLAG_4_AI_WILL_ONLY_SWIM_IF_TARGET_SWIMS is set which prevents 'Amphibious' creatures from swimming when engaged until the victim is no longer on the ocean floor - bool IsSwimPrevented() const { return _staticFlags.HasFlag(CREATURE_STATIC_FLAG_4_AI_WILL_ONLY_SWIM_IF_TARGET_SWIMS); } + bool CanOnlySwimIfTargetSwims() const { return _staticFlags.HasFlag(CREATURE_STATIC_FLAG_4_AI_WILL_ONLY_SWIM_IF_TARGET_SWIMS); } bool CanSwim() const override; - bool CanEnterWater() const override { return (CanSwim() || IsAmphibious()); }; + bool CanEnterWater() const override { return (CanSwim() || IsAmphibious()); } bool CanFly() const override { return (IsFlying() || HasUnitMovementFlag(MOVEMENTFLAG_CAN_FLY)); } MovementGeneratorType GetDefaultMovementType() const override;