mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
SetZoneFlag converted to QueryDatabase
This commit is contained in:
parent
87efd22394
commit
21ba9953f8
@ -723,16 +723,11 @@ void Client::SetZoneFlag(uint32 zone_id) {
|
|||||||
|
|
||||||
zone_flags.insert(zone_id);
|
zone_flags.insert(zone_id);
|
||||||
|
|
||||||
//update the DB
|
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
|
||||||
char *query = 0;
|
|
||||||
|
|
||||||
// Retrieve all waypoints for this grid
|
// Retrieve all waypoints for this grid
|
||||||
if(!database.RunQuery(query,MakeAnyLenString(&query,
|
std::string query = StringFormat("INSERT INTO zone_flags (charID,zoneID) VALUES(%d,%d)", CharacterID(), zone_id);
|
||||||
"INSERT INTO zone_flags (charID,zoneID) VALUES(%d,%d)",
|
auto results = database.QueryDatabase(query);
|
||||||
CharacterID(),zone_id),errbuf)) {
|
if(!results.Success())
|
||||||
LogFile->write(EQEMuLog::Error, "MySQL Error while trying to set zone flag for %s: %s", GetName(), errbuf);
|
LogFile->write(EQEMuLog::Error, "MySQL Error while trying to set zone flag for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::ClearZoneFlag(uint32 zone_id) {
|
void Client::ClearZoneFlag(uint32 zone_id) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user