SetZoneFlag converted to QueryDatabase

This commit is contained in:
Arthur Ice 2014-08-20 12:52:41 -07:00
parent 87efd22394
commit 21ba9953f8

View File

@ -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) {