mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 10:37:06 +00:00
SMSG_AUTH_RESPONSE 5.4.7 18019
This commit is contained in:
parent
ea613df8af
commit
668c0cc22b
3 changed files with 99 additions and 7 deletions
|
|
@ -44,7 +44,7 @@ enum Opcodes
|
|||
MSG_WOW_CONNECTION = 0x4F57, // 4.3.4 15595
|
||||
SMSG_AUTH_CHALLENGE = 0x0221, // 5.3.0 17055
|
||||
CMSG_AUTH_SESSION = 0x14DA, // 5.4.1 17538
|
||||
SMSG_AUTH_RESPONSE = 0x0890, // 5.3.0 17055
|
||||
SMSG_AUTH_RESPONSE = 0x15A0, // 5.4.7 18019
|
||||
MSG_NULL_ACTION = 0x1001,
|
||||
CMSG_BOOTME = 0x1002,
|
||||
CMSG_DBLOOKUP = 0x1003,
|
||||
|
|
|
|||
|
|
@ -846,24 +846,115 @@ void WorldSession::SendAuthWaitQue(uint32 position)
|
|||
{
|
||||
if (position == 0)
|
||||
{
|
||||
WorldPacket packet( SMSG_AUTH_RESPONSE, 2 );
|
||||
packet.WriteBit(false);
|
||||
packet.WriteBit(false);
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
|
||||
packet.WriteBit(false); // no account data
|
||||
packet.WriteBit(false); // no queue
|
||||
packet << uint8(AUTH_OK);
|
||||
SendPacket(&packet);
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldPacket packet( SMSG_AUTH_RESPONSE, 1+4+1 );
|
||||
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(false); // has account info
|
||||
packet << uint8(AUTH_WAIT_QUEUE);
|
||||
packet << uint32(position);
|
||||
SendPacket(&packet);
|
||||
}
|
||||
}
|
||||
|
||||
struct ExpansionInfoStrunct
|
||||
{
|
||||
uint8 raceOrClass;
|
||||
uint8 expansion;
|
||||
};
|
||||
|
||||
ExpansionInfoStrunct classExpansionInfo[MAX_CLASSES - 1] =
|
||||
{
|
||||
{ 1, 0 },
|
||||
{ 2, 0 },
|
||||
{ 3, 0 },
|
||||
{ 4, 0 },
|
||||
{ 5, 0 },
|
||||
{ 6, 2 },
|
||||
{ 7, 0 },
|
||||
{ 8, 0 },
|
||||
{ 9, 0 },
|
||||
{ 10, 4 },
|
||||
{ 11, 0 }
|
||||
};
|
||||
|
||||
ExpansionInfoStrunct raceExpansionInfo[MAX_PLAYABLE_RACES] =
|
||||
{
|
||||
{ 1, 0 },
|
||||
{ 2, 0 },
|
||||
{ 3, 0 },
|
||||
{ 4, 0 },
|
||||
{ 5, 0 },
|
||||
{ 6, 0 },
|
||||
{ 7, 0 },
|
||||
{ 8, 0 },
|
||||
{ 9, 3 },
|
||||
{ 10, 1 },
|
||||
{ 11, 1 },
|
||||
{ 22, 3 },
|
||||
{ 24, 4 },
|
||||
{ 25, 4 },
|
||||
{ 26, 4 }
|
||||
};
|
||||
|
||||
void WorldSession::SendAuthResponse(uint8 code, bool queued, uint32 queuePos)
|
||||
{
|
||||
bool hasAccountData = true;
|
||||
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1 /*bits*/ + 4 + 1 + 4 + 1 + 4 + 1 + 1 + (queued ? 4 : 0));
|
||||
packet << uint8(code);
|
||||
packet.WriteBit(queued); // IsInQueue
|
||||
if (queued)
|
||||
packet.WriteBit(1); // unk
|
||||
|
||||
packet.WriteBit(hasAccountData);
|
||||
if (hasAccountData)
|
||||
{
|
||||
packet.WriteBit(0);
|
||||
packet.WriteBits(0, 21);
|
||||
packet.WriteBits(0, 21);
|
||||
packet.WriteBits(MAX_PLAYABLE_RACES, 23);
|
||||
packet.WriteBit(0);
|
||||
packet.WriteBit(0);
|
||||
packet.WriteBit(0);
|
||||
packet.WriteBits(MAX_CLASSES - 1, 23);
|
||||
|
||||
packet << uint32(0);
|
||||
packet << uint32(0);
|
||||
packet << uint8(5); //TODO: FIXME uint8(Expansion()); // Unknown, these two show the same
|
||||
|
||||
for (uint8 i = 0; i < MAX_PLAYABLE_RACES; ++i)
|
||||
{
|
||||
packet << uint8(raceExpansionInfo[i].expansion);
|
||||
packet << uint8(raceExpansionInfo[i].raceOrClass);
|
||||
}
|
||||
|
||||
packet << uint8(5); //TODO: FIXME uint8(Expansion()); // Unknown, these two show the same
|
||||
packet << uint32(0);
|
||||
|
||||
for (uint8 i = 0; i < MAX_CLASSES - 1; ++i)
|
||||
{
|
||||
packet << uint8(classExpansionInfo[i].raceOrClass);
|
||||
packet << uint8(classExpansionInfo[i].expansion);
|
||||
}
|
||||
|
||||
packet << uint32(0);
|
||||
packet << uint32(0);
|
||||
}
|
||||
|
||||
if (queued)
|
||||
packet << uint32(queuePos);
|
||||
|
||||
SendPacket(&packet);
|
||||
}
|
||||
|
||||
void WorldSession::LoadGlobalAccountData()
|
||||
{
|
||||
LoadAccountData(
|
||||
|
|
|
|||
|
|
@ -349,6 +349,7 @@ class WorldSession
|
|||
void SendNameQueryOpcode(Player* p);
|
||||
void SendNameQueryOpcodeFromDB(ObjectGuid guid);
|
||||
static void SendNameQueryOpcodeFromDBCallBack(QueryResult* result, uint32 accountId);
|
||||
void SendAuthResponse(uint8 code, bool queued, uint32 queuePos = 0);
|
||||
|
||||
void SendTrainerList(ObjectGuid guid);
|
||||
void SendTrainerList(ObjectGuid guid, const std::string& strTitle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue