mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Merge commit 'origin/master' into 320
Conflicts: src/game/CharacterHandler.cpp src/game/DuelHandler.cpp src/game/ItemHandler.cpp src/game/Mail.cpp src/game/MiscHandler.cpp src/game/MovementHandler.cpp src/game/TaxiHandler.cpp src/game/WorldSession.h src/game/WorldSocket.cpp
This commit is contained in:
commit
f553cf2887
38 changed files with 181 additions and 755 deletions
|
|
@ -178,16 +178,11 @@ void WorldSession::HandleCharEnumOpcode( WorldPacket & /*recv_data*/ )
|
|||
|
||||
void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 1+1+1+1+1+1+1+1+1+1);
|
||||
|
||||
std::string name;
|
||||
uint8 race_, class_;
|
||||
|
||||
recv_data >> name;
|
||||
|
||||
// recheck with known string size
|
||||
CHECK_PACKET_SIZE(recv_data, (name.size()+1)+1+1+1+1+1+1+1+1+1);
|
||||
|
||||
recv_data >> race_;
|
||||
recv_data >> class_;
|
||||
|
||||
|
|
@ -472,8 +467,6 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
|
|||
|
||||
void WorldSession::HandleCharDeleteOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8);
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
|
|
@ -534,8 +527,6 @@ void WorldSession::HandleCharDeleteOpcode( WorldPacket & recv_data )
|
|||
|
||||
void WorldSession::HandlePlayerLoginOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8);
|
||||
|
||||
if(PlayerLoading() || GetPlayer() != NULL)
|
||||
{
|
||||
sLog.outError("Player tryes to login again, AccountId = %d", GetAccountId());
|
||||
|
|
@ -794,8 +785,6 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder *holder)
|
|||
|
||||
void WorldSession::HandleSetFactionAtWar( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4+1);
|
||||
|
||||
DEBUG_LOG( "WORLD: Received CMSG_SET_FACTION_ATWAR" );
|
||||
|
||||
uint32 repListID;
|
||||
|
|
@ -810,8 +799,6 @@ void WorldSession::HandleSetFactionAtWar( WorldPacket & recv_data )
|
|||
//I think this function is never used :/ I dunno, but i guess this opcode not exists
|
||||
void WorldSession::HandleSetFactionCheat( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
//CHECK_PACKET_SIZE(recv_data,4+4);
|
||||
|
||||
sLog.outError("WORLD SESSION: HandleSetFactionCheat, not expected call, please report.");
|
||||
/*
|
||||
uint32 FactionID;
|
||||
|
|
@ -844,8 +831,6 @@ void WorldSession::HandleMeetingStoneInfo( WorldPacket & /*recv_data*/ )
|
|||
|
||||
void WorldSession::HandleTutorialFlag( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4);
|
||||
|
||||
uint32 iFlag;
|
||||
recv_data >> iFlag;
|
||||
|
||||
|
|
@ -878,8 +863,6 @@ void WorldSession::HandleTutorialReset( WorldPacket & /*recv_data*/ )
|
|||
|
||||
void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4);
|
||||
|
||||
DEBUG_LOG("WORLD: Received CMSG_SET_WATCHED_FACTION");
|
||||
uint32 fact;
|
||||
recv_data >> fact;
|
||||
|
|
@ -888,8 +871,6 @@ void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recv_data)
|
|||
|
||||
void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4+1);
|
||||
|
||||
DEBUG_LOG("WORLD: Received CMSG_SET_FACTION_INACTIVE");
|
||||
uint32 replistid;
|
||||
uint8 inactive;
|
||||
|
|
@ -912,8 +893,6 @@ void WorldSession::HandleShowingCloakOpcode( WorldPacket & /*recv_data*/ )
|
|||
|
||||
void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8+1);
|
||||
|
||||
uint64 guid;
|
||||
std::string newname;
|
||||
|
||||
|
|
@ -998,7 +977,6 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
|
|||
{
|
||||
uint64 guid;
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, 8);
|
||||
recv_data >> guid;
|
||||
|
||||
// not accept declined names for unsupported languages
|
||||
|
|
@ -1034,7 +1012,6 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
|
|||
std::string name2;
|
||||
DeclinedName declinedname;
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, recv_data.rpos() + 1);
|
||||
recv_data >> name2;
|
||||
|
||||
if(name2 != name) // character have different name
|
||||
|
|
@ -1048,7 +1025,6 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
|
|||
|
||||
for(int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, recv_data.rpos() + 1);
|
||||
recv_data >> declinedname.name[i];
|
||||
if(!normalizePlayerName(declinedname.name[i]))
|
||||
{
|
||||
|
|
@ -1088,8 +1064,6 @@ void WorldSession::HandleAlterAppearance( WorldPacket & recv_data )
|
|||
{
|
||||
sLog.outDebug("CMSG_ALTER_APPEARANCE");
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, 4+4+4);
|
||||
|
||||
uint32 Hair, Color, FacialHair;
|
||||
recv_data >> Hair >> Color >> FacialHair;
|
||||
|
||||
|
|
@ -1136,8 +1110,6 @@ void WorldSession::HandleAlterAppearance( WorldPacket & recv_data )
|
|||
|
||||
void WorldSession::HandleRemoveGlyph( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4);
|
||||
|
||||
uint32 slot;
|
||||
recv_data >> slot;
|
||||
|
||||
|
|
@ -1160,16 +1132,12 @@ void WorldSession::HandleRemoveGlyph( WorldPacket & recv_data )
|
|||
|
||||
void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8+1);
|
||||
|
||||
uint64 guid;
|
||||
std::string newname;
|
||||
|
||||
recv_data >> guid;
|
||||
recv_data >> newname;
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+1+1+1+1+1+1);
|
||||
|
||||
uint8 gender, skin, face, hairStyle, hairColor, facialHair;
|
||||
recv_data >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face;
|
||||
|
||||
|
|
@ -1262,18 +1230,14 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
|
|||
if(!recv_data.readPackGUID(setGuid))
|
||||
return;
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, recv_data.rpos() + 4);
|
||||
|
||||
uint32 index;
|
||||
recv_data >> index;
|
||||
if(index >= MAX_EQUIPMENT_SET_INDEX) // client set slots amount
|
||||
return;
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, recv_data.rpos() + 1);
|
||||
std::string name;
|
||||
recv_data >> name;
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, recv_data.rpos() + 1);
|
||||
std::string iconName;
|
||||
recv_data >> iconName;
|
||||
|
||||
|
|
@ -1326,8 +1290,6 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
|
|||
if(!recv_data.readPackGUID(itemGuid))
|
||||
return;
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+1+1);
|
||||
|
||||
uint8 srcbag, srcslot;
|
||||
recv_data >> srcbag >> srcslot;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue