Jump to content
  • 0

well

Question

Posted

Hello,

I have problem with "SMSG_AUTH_RESPONSE" It don't count any Class/Race and don't apper expansion...

Here what is the auth response code:

    bool hasAccountData = true;

   QueryResult* allwoedClasses = LoginDatabase.PQuery("SELECT class, expansion FROM realm_classes WHERE realmId = %u", realmID);
   QueryResult* allowedRaces = LoginDatabase.PQuery("SELECT race, expansion FROM realm_races WHERE realmId = %u", realmID);

   if (!allwoedClasses || !allowedRaces)
   {
       sLog.outError("Unable to retrieve class or race data.");
       return;
   }

   WorldPacket packet(SMSG_AUTH_RESPONSE, 80);

   packet.WriteBit(hasAccountData);

   if (hasAccountData)
   {
       packet.WriteBits(0, 21);     // Send realmID

       packet.WriteBits(allwoedClasses->GetRowCount(), 23);
       packet.WriteBits(0, 21);
       packet.WriteBit(0);
       packet.WriteBit(0);
       packet.WriteBit(0);
       packet.WriteBit(0);
       packet.WriteBits(allowedRaces->GetRowCount(), 23);
       packet.WriteBit(0);

       packet.WriteBit(queued);

       if (queued)
           packet.WriteBit(1);

       if (queued)
           packet << uint32(queuePos);

       do
       {
           Field* fields = allowedRaces->Fetch();

           packet << fields[1].GetUInt8();
           packet << fields[0].GetUInt8();
       }
       while (allowedRaces->NextRow());

       do
       {
           Field* fields = allwoedClasses->Fetch();

           packet << fields[1].GetUInt8();
           packet << fields[0].GetUInt8();
       }
       while (allwoedClasses->NextRow());

       packet << uint32(0);
       packet << uint8(Expansion());
       packet << uint32(Expansion());
       packet << uint32(0);
       packet << uint8(Expansion());
       packet << uint32(0);
       packet << uint32(0);
       packet << uint32(0);
   }

   packet << uint8(code);

   SendPacket(&packet);

And here is sniff what's going on the server:

ServerToClient: SMSG_AUTH_RESPONSE (0x0ABA) Length: 91 ConnectionIndex: 0 Time: 08/22/2015 12:43:40.000 Number: 1
Has Account Data: 1
Unk 2: 0
Class Activation Count: 0
Unk: 176
Race Activation Count: 0
Is In Queue: 0
Unk 5: 0 (0x00)
Player Expansion: 120 (120) (0x0078)
Unk 8: 33554688 (0x02000100)
Unk 9: 67109632 (0x04000300)
Unk 10: 100795648 (0x06020500)
Account Expansion: WorldOfWarcraft (0) (0x0000)
Auth Code: CSTATUS_CONNECTING (7) (0x0007)
Packet not fully read! Current position is 26, length is 91, and diff is 65.
|-------------------------------------------------|---------------------------------|
| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0 1 2 3 4 5 6 7 8 9 A B C D E F |
|-------------------------------------------------|---------------------------------|
| 80 00 00 00 00 58 00 00 00 00 00 78 00 01 00 02 | . . . . . X . . . . . x . . . . |
| 00 03 00 04 00 05 02 06 00 07 00 08 00 09 04 0A | . . . . . . . . . . . . . . . . |
| 00 0B 00 01 00 02 00 03 00 04 00 05 00 06 00 07 | . . . . . . . . . . . . . . . . |
| 00 08 03 09 01 0A 01 0B 03 16 04 18 04 19 04 1A | . . . . . . . . . . . . . . . . |
| 00 00 00 00 04 04 00 00 00 00 00 00 00 04 00 00 | . . . . . . . . . . . . . . . . |
| 00 00 00 00 00 00 00 00 00 00 0C                | . . . . . . . . . . .           |
|-------------------------------------------------|---------------------------------|

idk what is wrong and what not ... help me with that.

PS> Yes i know i have to implement realm query, but with that struct have to login to the character select screen but don't work ...

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use