*[FIX] New characters are flagged on non-PvP servers by XTElite1
--HG-- branch : trunk
This commit is contained in:
+7
-4
@@ -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;
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user