UnDelegateMarkNPC converted to QueryDatabase

This commit is contained in:
Arthur Ice 2014-09-05 16:14:28 -07:00
parent ef1f1562f0
commit 59618e0038

View File

@ -1868,15 +1868,12 @@ void Group::UnDelegateMarkNPC(const char *OldNPCMarkerName)
NPCMarkerName.clear();
char errbuff[MYSQL_ERRMSG_SIZE];
char *Query = 0;
std::string query = StringFormat("UPDATE group_leaders SET marknpc = '' WHERE gid = %i LIMIT 1", GetID());
auto results = database.QueryDatabase(query);
if (!results.Success())
LogFile->write(EQEMuLog::Error, "Unable to clear group marknpc: %s\n", results.ErrorMessage().c_str());
if (!database.RunQuery(Query, MakeAnyLenString(&Query, "UPDATE group_leaders SET marknpc='' WHERE gid=%i LIMIT 1",
GetID()), errbuff))
LogFile->write(EQEMuLog::Error, "Unable to clear group marknpc: %s\n", errbuff);
safe_delete_array(Query);
}
void Group::SaveGroupLeaderAA()