Skip to content

Commit

Permalink
Rename deprecated flag UNIT_FLAG_DISABLE_MOVE
Browse files Browse the repository at this point in the history
cmangos/issues#1397

(based on cmangos/mangos-wotlk@2032cfb93)

Signed-off-by: Xfurry <xfurry.cmangos@outlook.com>
  • Loading branch information
Warlockbugs authored and xfurry committed Jan 3, 2018
1 parent 4905e65 commit 9e107e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/game/Entities/Player.cpp
Expand Up @@ -2911,7 +2911,7 @@ void Player::InitStatsForLevel(bool reapplyMods)

// cleanup unit flags (will be re-applied if need at aura load).
RemoveFlag(UNIT_FIELD_FLAGS,
UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_ATTACKABLE_1 |
UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NON_MOVING_DEPRECATED | UNIT_FLAG_NOT_ATTACKABLE_1 |
UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE | UNIT_FLAG_LOOTING |
UNIT_FLAG_PET_IN_COMBAT | UNIT_FLAG_SILENCED | UNIT_FLAG_PACIFIED |
UNIT_FLAG_STUNNED | UNIT_FLAG_IN_COMBAT | UNIT_FLAG_DISARMED |
Expand Down Expand Up @@ -18414,7 +18414,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
return false;
}

if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_MOVING_DEPRECATED))
return false;

// taximaster case
Expand Down
2 changes: 1 addition & 1 deletion src/game/Entities/Unit.h
Expand Up @@ -572,7 +572,7 @@ enum UnitFlags
{
UNIT_FLAG_UNK_0 = 0x00000001,
UNIT_FLAG_NON_ATTACKABLE = 0x00000002, // not attackable
UNIT_FLAG_DISABLE_MOVE = 0x00000004,
UNIT_FLAG_NON_MOVING_DEPRECATED = 0x00000004, // TODO: Needs research
UNIT_FLAG_PVP_ATTACKABLE = 0x00000008, // allow apply pvp rules to attackable state in addition to faction dependent state
UNIT_FLAG_RENAME = 0x00000010,
UNIT_FLAG_PREPARATION = 0x00000020, // don't take reagents for spells with SPELL_ATTR_EX5_NO_REAGENT_WHILE_PREP
Expand Down
4 changes: 2 additions & 2 deletions src/game/MotionGenerators/WaypointMovementGenerator.cpp
Expand Up @@ -382,7 +382,7 @@ void FlightPathMovementGenerator::Finalize(Player& player)
player.clearUnitState(UNIT_STAT_TAXI_FLIGHT);

player.Unmount();
player.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
player.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_MOVING_DEPRECATED | UNIT_FLAG_TAXI_FLIGHT);
player.SetClientControl(&player, 1);

if (player.m_taxi.empty())
Expand All @@ -409,7 +409,7 @@ void FlightPathMovementGenerator::Reset(Player& player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_TAXI_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_MOVING_DEPRECATED | UNIT_FLAG_TAXI_FLIGHT);
player.SetClientControl(&player, 0);

Movement::MoveSplineInit init(player);
Expand Down

0 comments on commit 9e107e6

Please sign in to comment.