From c2199e703025d82dffdee5e39e68b82038038387 Mon Sep 17 00:00:00 2001 From: TOM_RUS Date: Thu, 2 Jun 2011 05:13:32 +0400 Subject: [PATCH] Added account flags enum. --- src/realmd/AuthSocket.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/realmd/AuthSocket.cpp b/src/realmd/AuthSocket.cpp index 97b3d910b..8932a07ca 100644 --- a/src/realmd/AuthSocket.cpp +++ b/src/realmd/AuthSocket.cpp @@ -44,6 +44,13 @@ enum eStatus STATUS_AUTHED }; +enum AccountFlags +{ + ACCOUNT_FLAG_GM = 0x00000001, + ACCOUNT_FLAG_TRIAL = 0x00000008, + ACCOUNT_FLAG_PROPASS = 0x00800000, +}; + // GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push,N), also any gcc version not support it at some paltform #if defined( __GNUC__ ) #pragma pack(1) @@ -110,9 +117,9 @@ typedef struct AUTH_LOGON_PROOF_S uint8 cmd; uint8 error; uint8 M2[20]; - uint32 unk1; // AccountFlags (trial 0x08, ProPass 0x800000, gm 0x01) - uint32 unk2; // SurveyId - uint16 unk3; // some flags (AccountMsgAvailable = 0x01) + uint32 accountFlags; // see enum AccountFlags + uint32 surveyId; // SurveyId + uint16 unkFlags; // some flags (AccountMsgAvailable = 0x01) } sAuthLogonProof_S; typedef struct AUTH_LOGON_PROOF_S_BUILD_6005 @@ -298,9 +305,9 @@ void AuthSocket::SendProof(Sha1Hash sha) memcpy(proof.M2, sha.GetDigest(), 20); proof.cmd = CMD_AUTH_LOGON_PROOF; proof.error = 0; - proof.unk1 = 0x00800000; - proof.unk2 = 0x00; - proof.unk3 = 0x00; + proof.accountFlags = ACCOUNT_FLAG_PROPASS; + proof.surveyId = 0x00000000; + proof.unkFlags = 0x0000; send((char *)&proof, sizeof(proof)); break;