mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
Cleanup Database::GetRaidLeaderName log Messages
This commit is contained in:
parent
f39afc51c7
commit
8d30ca51ca
@ -3395,7 +3395,6 @@ uint32 Database::GetRaidID(const char* name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
if (row == results.end()) {
|
if (row == results.end()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -3406,7 +3405,7 @@ uint32 Database::GetRaidID(const char* name)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Database::GetRaidLeaderName(uint32 rid)
|
const char* Database::GetRaidLeaderName(uint32 raid_id)
|
||||||
{
|
{
|
||||||
// Would be a good idea to fix this to be a passed in variable and
|
// Would be a good idea to fix this to be a passed in variable and
|
||||||
// make the caller responsible. static local variables like this are
|
// make the caller responsible. static local variables like this are
|
||||||
@ -3415,20 +3414,17 @@ const char* Database::GetRaidLeaderName(uint32 rid)
|
|||||||
// but may not be fully supported in some compilers.
|
// but may not be fully supported in some compilers.
|
||||||
static char name[128];
|
static char name[128];
|
||||||
|
|
||||||
std::string query = StringFormat("SELECT name FROM raid_members WHERE raidid=%u AND israidleader=1",rid);
|
std::string query = StringFormat("SELECT `name` FROM `raid_members` WHERE `raidid` = %u AND `israidleader` = 1", raid_id);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
if (!results.Success())
|
if (!results.Success()) {
|
||||||
{
|
Log.Out(Logs::General, Logs::Debug, "Unable to get Raid Leader Name for Raid ID: %u", raid_id);
|
||||||
std::cout << "Unable to get raid id: " << results.ErrorMessage() << std::endl;
|
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
if (row == results.end())
|
if (row == results.end()) {
|
||||||
{
|
|
||||||
std::cout << "Unable to get raid id, char not found!" << std::endl;
|
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user