From 77cfd116e0bf12ccdf2bfccd999e94b06e7b3723 Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Tue, 7 Oct 2014 11:15:45 -0700 Subject: [PATCH] SetRaidDetails converted to QueryDatabase --- zone/raids.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/zone/raids.cpp b/zone/raids.cpp index 648b6b418..35829cdf8 100644 --- a/zone/raids.cpp +++ b/zone/raids.cpp @@ -1229,14 +1229,9 @@ void Raid::LockRaid(bool lockFlag) void Raid::SetRaidDetails() { - char errbuf[MYSQL_ERRMSG_SIZE]; - char* query = 0; - MYSQL_RES *result; - if (database.RunQuery(query,MakeAnyLenString(&query, "INSERT INTO raid_details SET raidid=%lu, loottype=4, locked=0", (unsigned long)GetID()),errbuf,&result)){ - mysql_free_result(result); - } - - safe_delete_array(query); + std::string query = StringFormat("INSERT INTO raid_details SET raidid = %lu, loottype = 4, locked = 0", + (unsigned long)GetID()); + auto results = database.QueryDatabase(query); } void Raid::GetRaidDetails()