mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
Revert "GetAccountInfoForLogin_result converted to MySQLRequestResult"
This reverts commit 8369570b507242323badaf46613768d0231df1e3. Conflicts: zone/zonedb.h
This commit is contained in:
parent
6bc4ecf390
commit
c6a7d5a96c
@ -348,40 +348,37 @@ void ZoneDatabase::UpdateBug(PetitionBug_Struct* bug){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ZoneDatabase::GetAccountInfoForLogin_result(MySQLRequestResult results, int16* admin, char* account_name, uint32* lsaccountid, uint8* gmspeed, bool* revoked,bool* gmhideme, uint32* account_creation) {
|
bool ZoneDatabase::GetAccountInfoForLogin_result(MYSQL_RES* result, int16* admin, char* account_name, uint32* lsaccountid, uint8* gmspeed, bool* revoked,bool* gmhideme, uint32* account_creation) {
|
||||||
|
MYSQL_ROW row;
|
||||||
if (results.RowCount() != 1)
|
if (mysql_num_rows(result) == 1) {
|
||||||
return false;
|
row = mysql_fetch_row(result);
|
||||||
|
|
||||||
auto row = results.begin();
|
|
||||||
|
|
||||||
if (admin)
|
if (admin)
|
||||||
*admin = atoi(row[0]);
|
*admin = atoi(row[0]);
|
||||||
|
|
||||||
if (account_name)
|
if (account_name)
|
||||||
strcpy(account_name, row[1]);
|
strcpy(account_name, row[1]);
|
||||||
|
|
||||||
if (lsaccountid) {
|
if (lsaccountid) {
|
||||||
|
|
||||||
if (row[2])
|
if (row[2])
|
||||||
*lsaccountid = atoi(row[2]);
|
*lsaccountid = atoi(row[2]);
|
||||||
else
|
else
|
||||||
*lsaccountid = 0;
|
*lsaccountid = 0;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
if (gmspeed)
|
if (gmspeed)
|
||||||
*gmspeed = atoi(row[3]);
|
*gmspeed = atoi(row[3]);
|
||||||
|
|
||||||
if (revoked)
|
if (revoked)
|
||||||
*revoked = atoi(row[4]);
|
*revoked = atoi(row[4]);
|
||||||
|
|
||||||
if(gmhideme)
|
if(gmhideme)
|
||||||
*gmhideme = atoi(row[5]);
|
*gmhideme = atoi(row[5]);
|
||||||
|
|
||||||
if(account_creation)
|
if(account_creation)
|
||||||
*account_creation = atoul(row[6]);
|
*account_creation = atoul(row[6]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -247,7 +247,7 @@ public:
|
|||||||
* General Character Related Stuff
|
* General Character Related Stuff
|
||||||
*/
|
*/
|
||||||
void StoreCharacterLookup(uint32 char_id);
|
void StoreCharacterLookup(uint32 char_id);
|
||||||
bool GetAccountInfoForLogin_result(MySQLRequestResult results, int16* admin = 0, char* account_name = 0,
|
bool GetAccountInfoForLogin_result(MYSQL_RES* result, int16* admin = 0, char* account_name = 0,
|
||||||
uint32* lsaccountid = 0, uint8* gmspeed = 0, bool* revoked = 0, bool* gmhideme = nullptr,
|
uint32* lsaccountid = 0, uint8* gmspeed = 0, bool* revoked = 0, bool* gmhideme = nullptr,
|
||||||
uint32* account_creation = 0);
|
uint32* account_creation = 0);
|
||||||
bool GetCharacterInfoForLogin_result(MYSQL_RES* result, uint32* character_id = 0, char* current_zone = 0,
|
bool GetCharacterInfoForLogin_result(MYSQL_RES* result, uint32* character_id = 0, char* current_zone = 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user