Add GetRaidIDByCharID to Perl/Lua.

This commit is contained in:
Alex
2020-03-08 21:11:56 -04:00
parent 2a9248697e
commit cede38f562
6 changed files with 48 additions and 0 deletions
+16
View File
@@ -2180,6 +2180,22 @@ uint32 Database::GetGroupIDByCharID(uint32 character_id)
return atoi(row[0]);
}
uint32 Database::GetRaidIDByCharID(uint32 character_id) {
std::string query = fmt::format(
SQL(
SELECT raidid
FROM raid_members
WHERE charid = '{}'
),
character_id
);
auto results = QueryDatabase(query);
for (auto row = results.begin(); row != results.end(); ++row) {
return atoi(row[0]);
}
return 0;
}
/**
* @param log_settings
*/