Updated AuthResult enum.

This commit is contained in:
tomrus88 2010-04-04 10:04:48 +04:00
parent 73f6bf1783
commit 6ee7875d2b
2 changed files with 30 additions and 27 deletions

View file

@ -23,28 +23,31 @@
#ifndef _AUTHCODES_H #ifndef _AUTHCODES_H
#define _AUTHCODES_H #define _AUTHCODES_H
enum eAuthResults enum AuthResult
{ {
REALM_AUTH_SUCCESS = 0x00, WOW_SUCCESS = 0x00,
REALM_AUTH_FAILURE = 0x01, ///< Unable to connect WOW_FAIL_UNKNOWN0 = 0x01, ///< ? Unable to connect
REALM_AUTH_UNKNOWN1 = 0x02, ///< Unable to connect WOW_FAIL_UNKNOWN1 = 0x02, ///< ? Unable to connect
REALM_AUTH_ACCOUNT_BANNED = 0x03, ///< This <game> account has been closed and is no longer available for use. Please go to <site>/banned.html for further information. WOW_FAIL_BANNED = 0x03, ///< This <game> account has been closed and is no longer available for use. Please go to <site>/banned.html for further information.
REALM_AUTH_NO_MATCH = 0x04, ///< The information you have entered is not valid. Please check the spelling of the account name and password. If you need help in retrieving a lost or stolen password, see <site> for more information WOW_FAIL_UNKNOWN_ACCOUNT = 0x04, ///< The information you have entered is not valid. Please check the spelling of the account name and password. If you need help in retrieving a lost or stolen password, see <site> for more information
REALM_AUTH_UNKNOWN2 = 0x05, ///< The information you have entered is not valid. Please check the spelling of the account name and password. If you need help in retrieving a lost or stolen password, see <site> for more information WOW_FAIL_INCORRECT_PASSWORD = 0x05, ///< The information you have entered is not valid. Please check the spelling of the account name and password. If you need help in retrieving a lost or stolen password, see <site> for more information
REALM_AUTH_ACCOUNT_IN_USE = 0x06, ///< This account is already logged into <game>. Please check the spelling and try again. WOW_FAIL_ALREADY_ONLINE = 0x06, ///< This account is already logged into <game>. Please check the spelling and try again.
REALM_AUTH_PREPAID_TIME_LIMIT = 0x07, ///< You have used up your prepaid time for this account. Please purchase more to continue playing WOW_FAIL_NO_TIME = 0x07, ///< You have used up your prepaid time for this account. Please purchase more to continue playing
REALM_AUTH_SERVER_FULL = 0x08, ///< Could not log in to <game> at this time. Please try again later. WOW_FAIL_DB_BUSY = 0x08, ///< Could not log in to <game> at this time. Please try again later.
REALM_AUTH_WRONG_BUILD_NUMBER = 0x09, ///< Unable to validate game version. This may be caused by file corruption or interference of another program. Please visit <site> for more information and possible solutions to this issue. WOW_FAIL_VERSION_INVALID = 0x09, ///< Unable to validate game version. This may be caused by file corruption or interference of another program. Please visit <site> for more information and possible solutions to this issue.
REALM_AUTH_UPDATE_CLIENT = 0x0a, ///< Downloading WOW_FAIL_VERSION_UPDATE = 0x0A, ///< Downloading
REALM_AUTH_UNKNOWN3 = 0x0b, ///< Unable to connect WOW_FAIL_INVALID_SERVER = 0x0B, ///< Unable to connect
REALM_AUTH_ACCOUNT_FREEZED = 0x0c, ///< This <game> account has been temporarily suspended. Please go to <site>/banned.html for further information WOW_FAIL_SUSPENDED = 0x0C, ///< This <game> account has been temporarily suspended. Please go to <site>/banned.html for further information
REALM_AUTH_UNKNOWN4 = 0x0d, ///< Unable to connect WOW_FAIL_FAIL_NOACCESS = 0x0D, ///< Unable to connect
REALM_AUTH_UNKNOWN5 = 0x0e, ///< Connected. WOW_SUCCESS_SURVEY = 0x0E, ///< Connected.
REALM_AUTH_PARENTAL_CONTROL = 0x0f ///< Access to this account has been blocked by parental controls. Your settings may be changed in your account preferences at <site> WOW_FAIL_PARENTCONTROL = 0x0F, ///< Access to this account has been blocked by parental controls. Your settings may be changed in your account preferences at <site>
WOW_FAIL_LOCKED_ENFORCED = 0x10, ///< You have applied a lock to your account. You can change your locked status by calling your account lock phone number.
WOW_FAIL_TRIAL_ENDED = 0x11, ///< Your trial subscription has expired. Please visit <site> to upgrade your account.
WOW_FAIL_USE_BATTLENET = 0x12, ///< WOW_FAIL_OTHER This account is now attached to a Battle.net account. Please login with your Battle.net account email address and password.
}; };
// will only support WoW 1.12.1/1.12.2 , WoW:TBC 2.4.3 and official release for WoW:WotLK and later, client builds 10505, 8606, 6005, 5875 // will only support WoW 1.12.1/1.12.2 , WoW:TBC 2.4.3 and official release for WoW:WotLK and later, client builds 10505, 8606, 6005, 5875
// if you need more from old build then add it in cases in relamd sources code // if you need more from old build then add it in cases in realmd sources code
// list sorted from high to low build and first build used as low bound for accepted by default range (any > it will accepted by realmd at least) // list sorted from high to low build and first build used as low bound for accepted by default range (any > it will accepted by realmd at least)
#define EXPECTED_REALMD_CLIENT_BUILD \ #define EXPECTED_REALMD_CLIENT_BUILD \

View file

@ -429,7 +429,7 @@ bool AuthSocket::_HandleLogonChallenge()
"(unbandate = bandate OR unbandate > UNIX_TIMESTAMP()) AND ip = '%s'", address.c_str()); "(unbandate = bandate OR unbandate > UNIX_TIMESTAMP()) AND ip = '%s'", address.c_str());
if (result) if (result)
{ {
pkt << (uint8)REALM_AUTH_ACCOUNT_BANNED; pkt << (uint8)WOW_FAIL_BANNED;
sLog.outBasic("[AuthChallenge] Banned ip %s tries to login!", GetRemoteAddress().c_str()); sLog.outBasic("[AuthChallenge] Banned ip %s tries to login!", GetRemoteAddress().c_str());
delete result; delete result;
} }
@ -450,7 +450,7 @@ bool AuthSocket::_HandleLogonChallenge()
if ( strcmp((*result)[3].GetString(),GetRemoteAddress().c_str()) ) if ( strcmp((*result)[3].GetString(),GetRemoteAddress().c_str()) )
{ {
DEBUG_LOG("[AuthChallenge] Account IP differs"); DEBUG_LOG("[AuthChallenge] Account IP differs");
pkt << (uint8) REALM_AUTH_ACCOUNT_FREEZED; pkt << (uint8) WOW_FAIL_SUSPENDED;
locked=true; locked=true;
} }
else else
@ -472,12 +472,12 @@ bool AuthSocket::_HandleLogonChallenge()
{ {
if((*banresult)[0].GetUInt64() != (*banresult)[1].GetUInt64()) if((*banresult)[0].GetUInt64() != (*banresult)[1].GetUInt64())
{ {
pkt << (uint8) REALM_AUTH_ACCOUNT_BANNED; pkt << (uint8) WOW_FAIL_BANNED;
sLog.outBasic("[AuthChallenge] Banned account %s tries to login!",_login.c_str ()); sLog.outBasic("[AuthChallenge] Banned account %s tries to login!",_login.c_str ());
} }
else else
{ {
pkt << (uint8) REALM_AUTH_ACCOUNT_FREEZED; pkt << (uint8) WOW_FAIL_SUSPENDED;
sLog.outBasic("[AuthChallenge] Temporarily banned account %s tries to login!",_login.c_str ()); sLog.outBasic("[AuthChallenge] Temporarily banned account %s tries to login!",_login.c_str ());
} }
@ -513,7 +513,7 @@ bool AuthSocket::_HandleLogonChallenge()
unk3.SetRand(16 * 8); unk3.SetRand(16 * 8);
///- Fill the response packet with the result ///- Fill the response packet with the result
pkt << uint8(REALM_AUTH_SUCCESS); pkt << uint8(WOW_SUCCESS);
// B may be calculated < 32B so we force minimal length to 32B // B may be calculated < 32B so we force minimal length to 32B
pkt.append(B.AsByteArray(32), 32); // 32 bytes pkt.append(B.AsByteArray(32), 32); // 32 bytes
@ -560,7 +560,7 @@ bool AuthSocket::_HandleLogonChallenge()
} }
else // no account else // no account
{ {
pkt<< (uint8) REALM_AUTH_NO_MATCH; pkt<< (uint8) WOW_FAIL_UNKNOWN_ACCOUNT;
} }
} }
SendBuf((char const*)pkt.contents(), pkt.size()); SendBuf((char const*)pkt.contents(), pkt.size());
@ -612,7 +612,7 @@ bool AuthSocket::_HandleLogonProof()
ByteBuffer pkt; ByteBuffer pkt;
pkt << (uint8) AUTH_LOGON_CHALLENGE; pkt << (uint8) AUTH_LOGON_CHALLENGE;
pkt << (uint8) 0x00; pkt << (uint8) 0x00;
pkt << (uint8) REALM_AUTH_WRONG_BUILD_NUMBER; pkt << (uint8) WOW_FAIL_VERSION_INVALID;
DEBUG_LOG("[AuthChallenge] %u is not a valid client version!", _build); DEBUG_LOG("[AuthChallenge] %u is not a valid client version!", _build);
DEBUG_LOG("[AuthChallenge] Patch %s not found", tmp); DEBUG_LOG("[AuthChallenge] Patch %s not found", tmp);
SendBuf((char const*)pkt.contents(), pkt.size()); SendBuf((char const*)pkt.contents(), pkt.size());
@ -636,7 +636,7 @@ bool AuthSocket::_HandleLogonProof()
} }
///- Send a packet to the client with the file length and MD5 hash ///- Send a packet to the client with the file length and MD5 hash
uint8 data[2] = { AUTH_LOGON_PROOF, REALM_AUTH_UPDATE_CLIENT }; uint8 data[2] = { AUTH_LOGON_PROOF, WOW_FAIL_VERSION_UPDATE };
SendBuf((const char*)data, sizeof(data)); SendBuf((const char*)data, sizeof(data));
memcpy(&xferh, "0\x05Patch", 7); memcpy(&xferh, "0\x05Patch", 7);
@ -747,7 +747,7 @@ bool AuthSocket::_HandleLogonProof()
} }
else else
{ {
char data[4]= { AUTH_LOGON_PROOF, REALM_AUTH_NO_MATCH, 3, 0}; char data[4]= { AUTH_LOGON_PROOF, WOW_FAIL_UNKNOWN_ACCOUNT, 3, 0};
SendBuf(data, sizeof(data)); SendBuf(data, sizeof(data));
sLog.outBasic("[AuthChallenge] account %s tried to login with wrong password!",_login.c_str ()); sLog.outBasic("[AuthChallenge] account %s tried to login with wrong password!",_login.c_str ());