avoid doing a login query if the account id is empty/zero
This commit is contained in:
parent
a8a6a14018
commit
b101f3809e
@ -496,15 +496,6 @@ void ProcessLoginRequest(TConnection *Connection){
|
||||
Connection->XTEA[2] = Buffer.Read32();
|
||||
Connection->XTEA[3] = Buffer.Read32();
|
||||
|
||||
if(TerminalType < 0 || TerminalType >= NARRAY(TERMINALVERSION)
|
||||
|| TERMINALVERSION[TerminalType] != TerminalVersion){
|
||||
SendLoginError(Connection,
|
||||
"Your terminal version is too old.\n"
|
||||
"Please get a new version at\n"
|
||||
"http://www.tibia.com.");
|
||||
return;
|
||||
}
|
||||
|
||||
char Password[30];
|
||||
int AccountID = Buffer.Read32();
|
||||
Buffer.ReadString(Password, sizeof(Password));
|
||||
@ -514,6 +505,20 @@ void ProcessLoginRequest(TConnection *Connection){
|
||||
return;
|
||||
}
|
||||
|
||||
if(AccountID <= 0){
|
||||
SendLoginError(Connection, "You must enter an account number.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TerminalType < 0 || TerminalType >= NARRAY(TERMINALVERSION)
|
||||
|| TERMINALVERSION[TerminalType] != TerminalVersion){
|
||||
SendLoginError(Connection,
|
||||
"Your terminal version is too old.\n"
|
||||
"Please get a new version at\n"
|
||||
"http://www.tibia.com.");
|
||||
return;
|
||||
}
|
||||
|
||||
int NumCharacters = 0;
|
||||
int PremiumDays = 0;
|
||||
TCharacterLoginData Characters[50];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user