From 8ed1d5042ac20fa213b64a9834219e91ea15b9e9 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 24 Jan 2015 22:29:15 -0600 Subject: [PATCH] Suppress Error message for GetRaidID (Unable to get raid id, char not found) because it will happen for any player who is not in a raid anyways which makes it pointless --- common/database.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/common/database.cpp b/common/database.cpp index eab564ff4..b5ad4073c 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -3385,21 +3385,18 @@ void Database::ClearRaidDetails(uint32 rid) { // returns 0 on error or no raid for that character, or // the raid id that the character is a member of. -uint32 Database::GetRaidID(const char* name){ - - std::string query = StringFormat("SELECT raidid from raid_members where name='%s'", name); +uint32 Database::GetRaidID(const char* name) +{ + std::string query = StringFormat("SELECT `raidid` FROM `raid_members` WHERE `name` = '%s'", name); auto results = QueryDatabase(query); - if (!results.Success()) - { - std::cout << "Unable to get raid id: " << results.ErrorMessage() << std::endl; + if (!results.Success()) { return 0; } auto row = results.begin(); - if (row == results.end()) - { + if (row == results.end()) { Log.Out(Logs::General, Logs::Error, "Unable to get raid id, char not found!"); return 0; }