Make consent variable names more descriptive and replace char pointer parameters with std::string

Use fmt::format for SQL statement when updating corpse guild id
This commit is contained in:
hg
2020-02-04 18:27:59 -05:00
parent b8229c8459
commit d7138e84c0
5 changed files with 39 additions and 46 deletions
+1 -1
View File
@@ -4321,7 +4321,7 @@ uint32 ZoneDatabase::UpdateCharacterCorpse(uint32 db_id, uint32 char_id, const c
uint32 ZoneDatabase::UpdateCharacterCorpseConsent(uint32 charid, uint32 guildid)
{
std::string query = StringFormat("UPDATE `character_corpses` SET `guild_consent_id` = %u WHERE `charid` = %u", guildid, charid);
std::string query = fmt::format("UPDATE `character_corpses` SET `guild_consent_id` = '{}' WHERE charid = '{}'", guildid, charid);
auto results = QueryDatabase(query);
return results.RowsAffected();
}