diff --git a/sql/wotlk_updates/1_mangos_creature_equip_template.sql b/sql/wotlk_updates/1_mangos_creature_equip_template.sql index f844f50af..fc64c1d9d 100644 --- a/sql/wotlk_updates/1_mangos_creature_equip_template.sql +++ b/sql/wotlk_updates/1_mangos_creature_equip_template.sql @@ -1,3 +1,5 @@ +TRUNCATE creature_equip_template; + alter table `creature_equip_template` drop column `equipinfo1`, drop column `equipinfo2`, diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index db4e2d8b6..42c4beb8b 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -4339,7 +4339,7 @@ static bool HandleResetStatsOrLevelHelper(Player* player) // set UNIT_FIELD_BYTES_1 to init state but preserve m_form value player->SetUInt32Value(UNIT_FIELD_BYTES_1, unitfield); - player->SetByteValue(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_UNK3 | UNIT_BYTE2_FLAG_UNK5 ); + player->SetByteValue(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP ); player->SetByteValue(UNIT_FIELD_BYTES_2, 3, player->m_form); player->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index 1e8861718..68b5dce0b 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -545,7 +545,7 @@ void WorldSession::HandleTogglePvP( WorldPacket & recv_data ) bool newPvPStatus; recv_data >> newPvPStatus; GetPlayer()->ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP, newPvPStatus); - GetPlayer()->ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_PVP, newPvPStatus); + GetPlayer()->ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_PVP, !newPvPStatus); } else { @@ -1135,7 +1135,8 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data) uint32 size = adata->Data.size(); - ByteBuffer dest(size); + ByteBuffer dest; + dest.resize(size); uLongf destSize = size; if(compress(const_cast(dest.contents()), &destSize, (uint8*)adata->Data.c_str(), size) != Z_OK) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index b4053002c..a4804d914 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -557,7 +557,7 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_, SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) ); SetUInt32Value(UNIT_FIELD_BYTES_1, unitfield); - SetByteValue(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_UNK3 | UNIT_BYTE2_FLAG_UNK5 ); + SetByteValue(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP ); SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE ); SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f); // fix cast time showed in spell tooltip on client