mirror of
https://github.com/mangosfour/server.git
synced 2026-02-03 07:37:10 +00:00
SMSG_AUTH_CHALLENGE/RESPONSE 5.4.8 18414
This commit is contained in:
parent
a3f970a055
commit
d899cceeaa
4 changed files with 36 additions and 9 deletions
|
|
@ -42,9 +42,9 @@
|
|||
enum Opcodes
|
||||
{
|
||||
MSG_WOW_CONNECTION = 0x4F57, // 4.3.4 15595
|
||||
SMSG_AUTH_CHALLENGE = 0x0221, // 5.3.0 17055
|
||||
SMSG_AUTH_CHALLENGE = 0x0949, // 5.4.8 18414
|
||||
CMSG_AUTH_SESSION = 0x14DA, // 5.4.1 17538
|
||||
SMSG_AUTH_RESPONSE = 0x15A0, // 5.4.7 18019
|
||||
SMSG_AUTH_RESPONSE = 0x0ABA, // 5.4.8 18414
|
||||
MSG_NULL_ACTION = 0x1001,
|
||||
CMSG_BOOTME = 0x1002,
|
||||
CMSG_DBLOOKUP = 0x1003,
|
||||
|
|
|
|||
|
|
@ -847,18 +847,20 @@ void WorldSession::SendAuthWaitQue(uint32 position)
|
|||
if (position == 0)
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
|
||||
packet.WriteBit(false); // no account data
|
||||
packet.WriteBit(false); // no queue
|
||||
packet.WriteBit(0);
|
||||
packet.WriteBit(0);
|
||||
packet << uint8(AUTH_OK);
|
||||
packet.FlushBits();
|
||||
SendPacket(&packet);
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 6);
|
||||
packet.WriteBit(false); // has account data
|
||||
packet.WriteBit(true); // has queue
|
||||
packet.WriteBit(false); // unk queue-related
|
||||
packet.WriteBit(0);
|
||||
packet.WriteBit(1);
|
||||
packet.WriteBit(0);
|
||||
packet << uint8(AUTH_WAIT_QUEUE);
|
||||
packet.FlushBits();
|
||||
packet << uint32(position);
|
||||
SendPacket(&packet);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,7 +308,31 @@ int WorldSocket::HandleWowConnection(WorldPacket& recvPacket)
|
|||
{
|
||||
std::string ClientToServerMsg;
|
||||
recvPacket >> ClientToServerMsg;
|
||||
return 0;
|
||||
|
||||
DEBUG_LOG("Received MSG_WOW_CONNECTION FROM %s", m_Session ? m_Session->GetRemoteAddress().c_str() : "<unk>");
|
||||
if (strcmp(ClientToServerMsg.c_str(), "D OF WARCRAFT CONNECTION - CLIENT TO SERVER") != 0)
|
||||
{
|
||||
sLog.outError("WorldSocket::ProcessIncoming: received wrong data in MSG_WOW_CONNECTION.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return SendAuthChallenge();
|
||||
}
|
||||
|
||||
int WorldSocket::SendAuthChallenge()
|
||||
{
|
||||
DEBUG_LOG("Sending SMSG_AUTH_CHALLENGE");
|
||||
WorldPacket packet(SMSG_AUTH_CHALLENGE, 37);
|
||||
packet << uint16(0);
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
packet << uint32(0);
|
||||
|
||||
packet << uint8(1);
|
||||
packet << uint32(m_Seed);
|
||||
|
||||
return SendPacket(packet);
|
||||
|
||||
}
|
||||
|
||||
int WorldSocket::close(int)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ typedef ACE_Acceptor< WorldSocket, ACE_SOCK_ACCEPTOR > WorldAcceptor;
|
|||
* a queue where it stores packet if there is no place on
|
||||
* the queue. The reason this is done, is because the server
|
||||
* does really a lot of small-size writes to it, and it doesn't
|
||||
* Scale well to allocate memory for every. When something is
|
||||
* scale well to allocate memory for every. When something is
|
||||
* written to the output buffer the socket is not immediately
|
||||
* activated for output (again for the same reason), there
|
||||
* is 10ms celling (thats why there is Update() override method).
|
||||
|
|
@ -136,6 +136,7 @@ class WorldSocket : protected WorldHandler
|
|||
|
||||
/// Called on open ,the void* is the acceptor.
|
||||
int HandleWowConnection(WorldPacket& recvPacket);
|
||||
int SendAuthChallenge();
|
||||
|
||||
virtual int open(void*) override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue