Core/Mail: Replaced blocking db query in mail sending with async version

Port From (https://github.com/TrinityCore/TrinityCore/commit/081fa7cfc4d044d47e719d0a6880d2a9b6d30128)
This commit is contained in:
hondacrx
2022-05-24 11:09:49 -04:00
parent 334ea523c3
commit ba71bd81b4
3 changed files with 243 additions and 244 deletions
@@ -161,6 +161,13 @@ namespace Game
return 0;
}
public QueryCallback GetIdByGameAccountAsync(uint gameAccountId)
{
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.SEL_BNET_ACCOUNT_ID_BY_GAME_ACCOUNT);
stmt.AddValue(0, gameAccountId);
return DB.Login.AsyncQuery(stmt);
}
public byte GetMaxIndex(uint accountId)
{
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.SEL_BNET_MAX_ACCOUNT_INDEX);