Skip to content

Commit

Permalink
Clear PVP option flag on logout
Browse files Browse the repository at this point in the history
Client no longer thinks that PvP flag is on when it clearly isn't.
The flag itself is not used properly yet, to be improved in the future.

(based on cmangos/mangos-wotlk@2da5b4387)

Signed-off-by: Xfurry <xfurry.cmangos@outlook.com>
  • Loading branch information
Warlockbugs authored and xfurry committed Jan 2, 2018
1 parent 9a34bd9 commit 85a13f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/Player.cpp
Expand Up @@ -2918,7 +2918,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER); // must be set

// cleanup player flags (will be re-applied if need at aura load), to avoid have ghost flag without ghost aura, for example.
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK | PLAYER_FLAGS_DND | PLAYER_FLAGS_GM | PLAYER_FLAGS_GHOST);
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK | PLAYER_FLAGS_DND | PLAYER_FLAGS_GM | PLAYER_FLAGS_GHOST | PLAYER_FLAGS_IN_PVP);

RemoveStandFlags(UNIT_STAND_FLAGS_ALL); // one form stealth modified bytes
RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
Expand Down

0 comments on commit 85a13f1

Please sign in to comment.