diff options
author | maximius <none@none> | 2009-09-16 12:53:53 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-09-16 12:53:53 -0700 |
commit | 3e7c851aaeebdd43211700f2902e4455586b677c (patch) | |
tree | 480c53628280b0ae6639f6e62277b0f9751a6ee4 /src | |
parent | 42e5eb6d357571d3231b140b55b7ec3ac454c1df (diff) |
*[FIX] New characters are flagged on non-PvP servers by XTElite1
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 11 | ||||
-rw-r--r-- | src/game/Player.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 4fbcb212f07..a110f64dc5a 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -585,8 +585,11 @@ bool Player::Create( uint32 guidlow, const std::string& name, uint8 race, uint8 SetUInt32Value(UNIT_FIELD_BYTES_0, ( RaceClassGender | ( powertype << 24 ) ) ); InitDisplayIds(); - SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP ); - SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE ); + if(sWorld.getConfig(CONFIG_GAME_TYPE) == REALM_TYPE_PVP || sWorld.getConfig(CONFIG_GAME_TYPE) == REALM_TYPE_RPPVP) + { + SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP ); + SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE ); + } SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER); SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f); // fix cast time showed in spell tooltip on client SetFloatValue(UNIT_FIELD_HOVERHEIGHT, 1.0f); // default for players in 3.0.3 @@ -18465,9 +18468,9 @@ void Player::UpdatePvPState(bool onlyFFA) } } -void Player::UpdatePvP(bool state, bool ovrride) +void Player::UpdatePvP(bool state, bool override) { - if(!state || ovrride) + if(!state || override) { SetPvP(state); pvpInfo.endTimer = 0; diff --git a/src/game/Player.h b/src/game/Player.h index ec58459bea0..43533743879 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1582,7 +1582,7 @@ class MANGOS_DLL_SPEC Player : public Unit for(ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr) (*itr)->SetPvP(state); } - void UpdatePvP(bool state, bool ovrride=false); + void UpdatePvP(bool state, bool override=false); void UpdateZone(uint32 newZone,uint32 newArea); void UpdateArea(uint32 newArea); |