* Update realm login to 3.3.2a (Thanks to BThallid)
* minor GCC fix
This commit is contained in:
parent
f73a13f91a
commit
1a9e5588d5
@ -1,3 +1,4 @@
|
|||||||
|
#define _DEBUG 1
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#include "Auth/Sha1.h"
|
#include "Auth/Sha1.h"
|
||||||
@ -182,7 +183,7 @@ void WorldSession::HandleWorldPacket(WorldPacket *packet)
|
|||||||
|
|
||||||
bool known = false;
|
bool known = false;
|
||||||
uint16 hpos;
|
uint16 hpos;
|
||||||
|
logdebug("Handling packet with opcode %u",packet->GetOpcode());
|
||||||
for (hpos = 0; table[hpos].handler != NULL; hpos++)
|
for (hpos = 0; table[hpos].handler != NULL; hpos++)
|
||||||
{
|
{
|
||||||
if (table[hpos].opcode == packet->GetOpcode())
|
if (table[hpos].opcode == packet->GetOpcode())
|
||||||
@ -521,12 +522,16 @@ std::string WorldSession::GetOrRequestPlayerName(uint64 guid)
|
|||||||
void WorldSession::_HandleAuthChallengeOpcode(WorldPacket& recvPacket)
|
void WorldSession::_HandleAuthChallengeOpcode(WorldPacket& recvPacket)
|
||||||
{
|
{
|
||||||
std::string acc = stringToUpper(GetInstance()->GetConf()->accname);
|
std::string acc = stringToUpper(GetInstance()->GetConf()->accname);
|
||||||
|
uint32 sp;
|
||||||
|
recvPacket >> sp;
|
||||||
uint32 serverseed;
|
uint32 serverseed;
|
||||||
recvPacket >> serverseed;
|
recvPacket >> serverseed;
|
||||||
|
|
||||||
logdebug("Auth: serverseed=0x%X",serverseed);
|
logdebug("Auth: serverseed=0x%X",serverseed);
|
||||||
Sha1Hash digest;
|
Sha1Hash digest;
|
||||||
digest.UpdateData(acc);
|
digest.UpdateData(acc);
|
||||||
uint32 unk=0;
|
uint32 unk=0;
|
||||||
|
uint64 unk4=0;
|
||||||
digest.UpdateData((uint8*)&unk,sizeof(uint32));
|
digest.UpdateData((uint8*)&unk,sizeof(uint32));
|
||||||
BigNumber clientseed;
|
BigNumber clientseed;
|
||||||
clientseed.SetRand(8*4);
|
clientseed.SetRand(8*4);
|
||||||
@ -536,7 +541,7 @@ void WorldSession::_HandleAuthChallengeOpcode(WorldPacket& recvPacket)
|
|||||||
digest.UpdateBigNumbers(GetInstance()->GetSessionKey(),NULL);
|
digest.UpdateBigNumbers(GetInstance()->GetSessionKey(),NULL);
|
||||||
digest.Finalize();
|
digest.Finalize();
|
||||||
WorldPacket auth;
|
WorldPacket auth;
|
||||||
auth<<(uint32)(GetInstance()->GetConf()->clientbuild)<<unk<<acc<<unk<<clientseed_uint32;
|
auth<<(uint32)(GetInstance()->GetConf()->clientbuild)<<unk<<acc<<unk<<clientseed_uint32<<unk4;
|
||||||
auth.append(digest.GetDigest(),20);
|
auth.append(digest.GetDigest(),20);
|
||||||
auth << (uint32)0; // TODO: this is not correct value, expected: 160 bytes of addon_data
|
auth << (uint32)0; // TODO: this is not correct value, expected: 160 bytes of addon_data
|
||||||
|
|
||||||
@ -557,7 +562,6 @@ void WorldSession::_HandleAuthResponseOpcode(WorldPacket& recvPacket)
|
|||||||
recvPacket >> errcode;
|
recvPacket >> errcode;
|
||||||
recvPacket >> dummy32 >> dummy8 >> dummy32;
|
recvPacket >> dummy32 >> dummy8 >> dummy32;
|
||||||
recvPacket >> expansion;
|
recvPacket >> expansion;
|
||||||
|
|
||||||
// TODO: add data to generic_text.scp and use the strings here
|
// TODO: add data to generic_text.scp and use the strings here
|
||||||
if(errcode == AUTH_OK)
|
if(errcode == AUTH_OK)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#if defined( __GNUC__ ) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)>=40300
|
#if defined( __GNUC__ ) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)>=40300
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class ByteBufferException
|
class ByteBufferException
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user