mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-20 05:01:29 +00:00
SetFirstLogon converted to QueryDatabase
This commit is contained in:
parent
c82ce7cecc
commit
cc9267707a
@ -1768,15 +1768,13 @@ void Database::SetLFG(uint32 CharID, bool LFG) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Database::SetFirstLogon(uint32 CharID, uint8 firstlogon) {
|
void Database::SetFirstLogon(uint32 CharID, uint8 firstlogon) {
|
||||||
|
char *query = nullptr;
|
||||||
|
|
||||||
char ErrBuf[MYSQL_ERRMSG_SIZE];
|
auto results = QueryDatabase(query, MakeAnyLenString(&query, "update character_ set firstlogon=%i where id=%i",firstlogon, CharID));
|
||||||
char *Query = 0;
|
safe_delete_array(query);
|
||||||
|
|
||||||
if (!RunQuery(Query, MakeAnyLenString(&Query, "update character_ set firstlogon=%i where id=%i",firstlogon, CharID), ErrBuf))
|
|
||||||
LogFile->write(EQEMuLog::Error, "Error updating firstlogon for character %i : %s", CharID, ErrBuf);
|
|
||||||
|
|
||||||
safe_delete_array(Query);
|
|
||||||
|
|
||||||
|
if (!results.Success())
|
||||||
|
LogFile->write(EQEMuLog::Error, "Error updating firstlogon for character %i : %s", CharID, results.ErrorMessage().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Database::AddReport(std::string who, std::string against, std::string lines)
|
void Database::AddReport(std::string who, std::string against, std::string lines)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user