diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-09-27 17:07:47 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-02-28 13:56:45 +0100 |
commit | 081fa7cfc4d044d47e719d0a6880d2a9b6d30128 (patch) | |
tree | 65281c224b9dd7edb23c7559f40fc43ec1df053d /src/server/game/Accounts/BattlenetAccountMgr.cpp | |
parent | c027912a5b3c4a1d6cd5bffaee04e77cb4e02f16 (diff) |
Core/Mail: Replaced blocking db query in mail sending with async version
(cherry picked from commit 0a9e239c12ceb1d4a5ef5cdc796320a403b3da2b)
Diffstat (limited to 'src/server/game/Accounts/BattlenetAccountMgr.cpp')
-rw-r--r-- | src/server/game/Accounts/BattlenetAccountMgr.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/game/Accounts/BattlenetAccountMgr.cpp b/src/server/game/Accounts/BattlenetAccountMgr.cpp index a204e99f337..08a807b8db6 100644 --- a/src/server/game/Accounts/BattlenetAccountMgr.cpp +++ b/src/server/game/Accounts/BattlenetAccountMgr.cpp @@ -161,6 +161,13 @@ uint32 Battlenet::AccountMgr::GetIdByGameAccount(uint32 gameAccountId) return 0; } +QueryCallback Battlenet::AccountMgr::GetIdByGameAccountAsync(uint32 gameAccountId) +{ + LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_BNET_ACCOUNT_ID_BY_GAME_ACCOUNT); + stmt->setUInt32(0, gameAccountId); + return LoginDatabase.AsyncQuery(stmt); +} + uint8 Battlenet::AccountMgr::GetMaxIndex(uint32 accountId) { LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_BNET_MAX_ACCOUNT_INDEX); |