Skip to content

Commit

Permalink
[core] Audit local SqlConnection usage+naming
Browse files Browse the repository at this point in the history
  • Loading branch information
zach2good committed Dec 18, 2023
1 parent 0d6aee5 commit 2fbdee3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/map/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,10 @@ int32 do_init(int32 argc, char** argv)
// But we're not executing on the main thread, so we're doing it with
// our own SQL connection.
{
auto _sql = std::make_unique<SqlConnection>();
auto query = "UPDATE %s SET %s %u WHERE charid = %u;";
_sql->Query(query, "chars", "gmlevel =", PChar->m_GMlevel, PChar->id);
_sql->Query(query, "char_stats", "nameflags =", PChar->nameflags.flags, PChar->id);
auto otherSql = std::make_unique<SqlConnection>();
auto query = "UPDATE %s SET %s %u WHERE charid = %u;";
otherSql->Query(query, "chars", "gmlevel =", PChar->m_GMlevel, PChar->id);
otherSql->Query(query, "char_stats", "nameflags =", PChar->nameflags.flags, PChar->id);
}

fmt::print("Promoting {} to GM level {}\n", PChar->name, level);
Expand Down

0 comments on commit 2fbdee3

Please sign in to comment.