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
*/
+1
View File
@@ -134,6 +134,7 @@ public:
uint32 GetCharacterInfo(const char* iName, uint32* oAccID = 0, uint32* oZoneID = 0, uint32* oInstanceID = 0, float* oX = 0, float* oY = 0, float* oZ = 0);
uint32 GetGuildIDByCharID(uint32 char_id);
uint32 GetGroupIDByCharID(uint32 char_id);
uint32 GetRaidIDByCharID(uint32 char_id);
void GetAccountName(uint32 accountid, char* name, uint32* oLSAccountID = 0);
void GetCharName(uint32 char_id, char* name);