SMSG_BATTLEFIELD_LIST fix

This commit is contained in:
Olion17 2017-07-19 17:13:55 +03:00 committed by Antz
parent dee29f95d4
commit 572d7cae6b
2 changed files with 7 additions and 11 deletions

View File

@ -1257,26 +1257,22 @@ void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket* data, ObjectGuid
*data << uint32(mapId); // battleground id *data << uint32(mapId); // battleground id
*data << uint8(0x00); // unk *data << uint8(0x00); // unk
size_t count_pos = data->wpos();
//uint32 count = 0;
*data << uint32(0); // number of bg instances
// battleground // battleground
{ {
*data << uint8(0x00); // unk //*data << uint8(0x00); // [-ZERO] unk
size_t count_pos = data->wpos(); //size_t count_pos = data->wpos();
uint32 count = 0; //uint32 count = 0;
*data << uint32(0); // number of bg instances
uint32 bracket_id = plr->GetBattleGroundBracketIdFromLevel(bgTypeId); uint32 bracket_id = plr->GetBattleGroundBracketIdFromLevel(bgTypeId);
ClientBattleGroundIdSet const& ids = m_ClientBattleGroundIds[bgTypeId][bracket_id]; ClientBattleGroundIdSet const& ids = m_ClientBattleGroundIds[bgTypeId][bracket_id];
*data << uint32(ids.size()); // number of bg instances
for (std::set<uint32>::const_iterator itr = ids.begin(); itr != ids.end(); ++itr) for (std::set<uint32>::const_iterator itr = ids.begin(); itr != ids.end(); ++itr)
{ {
*data << uint32(*itr); *data << uint32(*itr);
++count; //++count;
} }
data->put<uint32>(count_pos , count); //data->put<uint32>(count_pos , count);
} }
} }

View File

@ -631,7 +631,7 @@ void Opcodes::BuildOpcodeList()
/*0x23A*/ StoreOpcode(CMSG_GET_MAIL_LIST, "CMSG_GET_MAIL_LIST", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleGetMailList); /*0x23A*/ StoreOpcode(CMSG_GET_MAIL_LIST, "CMSG_GET_MAIL_LIST", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleGetMailList);
/*0x23B*/ StoreOpcode(SMSG_MAIL_LIST_RESULT, "SMSG_MAIL_LIST_RESULT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide); /*0x23B*/ StoreOpcode(SMSG_MAIL_LIST_RESULT, "SMSG_MAIL_LIST_RESULT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide);
/*[-ZERO] Need check */ /*0x23C*/ StoreOpcode(CMSG_BATTLEFIELD_LIST, "CMSG_BATTLEFIELD_LIST", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlefieldListOpcode); /*[-ZERO] Need check */ /*0x23C*/ StoreOpcode(CMSG_BATTLEFIELD_LIST, "CMSG_BATTLEFIELD_LIST", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlefieldListOpcode);
/*[-ZERO] Need check */ /*0x23D*/ StoreOpcode(SMSG_BATTLEFIELD_LIST, "SMSG_BATTLEFIELD_LIST", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide); /*0x23D*/ StoreOpcode(SMSG_BATTLEFIELD_LIST, "SMSG_BATTLEFIELD_LIST", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide);
/*0x23E*/ StoreOpcode(CMSG_BATTLEFIELD_JOIN, "CMSG_BATTLEFIELD_JOIN", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL); /*0x23E*/ StoreOpcode(CMSG_BATTLEFIELD_JOIN, "CMSG_BATTLEFIELD_JOIN", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL);
/*0x23F*/ StoreOpcode(SMSG_BATTLEFIELD_WIN_OBSOLETE, "SMSG_BATTLEFIELD_WIN_OBSOLETE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide); /*0x23F*/ StoreOpcode(SMSG_BATTLEFIELD_WIN_OBSOLETE, "SMSG_BATTLEFIELD_WIN_OBSOLETE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide);
/*0x240*/ StoreOpcode(SMSG_BATTLEFIELD_LOSE_OBSOLETE, "SMSG_BATTLEFIELD_LOSE_OBSOLETE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide); /*0x240*/ StoreOpcode(SMSG_BATTLEFIELD_LOSE_OBSOLETE, "SMSG_BATTLEFIELD_LOSE_OBSOLETE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide);