Core/Networking: PoC changes to the way packets are handled
This is a rewrite of the way we send SMSG opcodes, the reasoning behind this is to make fixing packets sent in multiple places easier, and allow for clearer documentation of the packet fields. Included SMSG_AUTH_RESPONSE and SMSG_AUCTION_COMMAND_RESULT as two examples.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "WorldSocket.h"
|
||||
#include "Packet.h"
|
||||
#include <zlib.h>
|
||||
#include "Config.h"
|
||||
#include "Common.h"
|
||||
@@ -684,30 +685,6 @@ void WorldSession::Handle_Deprecated(WorldPacket& recvPacket)
|
||||
, GetOpcodeNameForLogging(static_cast<OpcodeClient>(recvPacket.GetOpcode())).c_str(), GetPlayerInfo().c_str());
|
||||
}
|
||||
|
||||
void WorldSession::SendAuthWaitQue(uint32 position)
|
||||
{
|
||||
if (position == 0)
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 2);
|
||||
packet << uint8(AUTH_OK);
|
||||
packet.WriteBit(0); // has account info
|
||||
packet.WriteBit(0); // has queue info
|
||||
packet.FlushBits();
|
||||
SendPacket(&packet);
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 6);
|
||||
packet << uint8(AUTH_WAIT_QUEUE);
|
||||
packet.WriteBit(0); // has account info
|
||||
packet.WriteBit(1); // has queue info
|
||||
packet << uint32(position);
|
||||
packet.WriteBit(0); // unk queue bool
|
||||
packet.FlushBits();
|
||||
SendPacket(&packet);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::LoadGlobalAccountData()
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_DATA);
|
||||
|
||||
Reference in New Issue
Block a user