diff options
author | Shauren <shauren.trinity@gmail.com> | 2014-06-18 00:19:00 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2014-06-18 00:19:00 +0200 |
commit | 41daea5b4eef1f91b1cc5cbc37b335677d440b8b (patch) | |
tree | d7b11d8a413698f834d959ea3545b14cc376fd16 /src/server/game/Accounts/BattlenetAccountMgr.cpp | |
parent | 6e35288d5cc72c8607588c0531c14f456dd55a4d (diff) |
Core/Mail: Implemented sending battle.net account bound items
Diffstat (limited to 'src/server/game/Accounts/BattlenetAccountMgr.cpp')
-rw-r--r-- | src/server/game/Accounts/BattlenetAccountMgr.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/game/Accounts/BattlenetAccountMgr.cpp b/src/server/game/Accounts/BattlenetAccountMgr.cpp index ca05ffd6141..00cf1f88298 100644 --- a/src/server/game/Accounts/BattlenetAccountMgr.cpp +++ b/src/server/game/Accounts/BattlenetAccountMgr.cpp @@ -73,6 +73,16 @@ uint32 Battlenet::AccountMgr::GetId(std::string const& username) return 0; } +uint32 Battlenet::AccountMgr::GetIdByGameAccount(uint32 gameAccountId) +{ + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_BNET_ACCOUNT_ID_BY_GAME_ACCOUNT); + stmt->setUInt32(0, gameAccountId); + if (PreparedQueryResult result = LoginDatabase.Query(stmt)) + return (*result)[0].GetUInt32(); + + return 0; +} + bool Battlenet::AccountMgr::GetName(uint32 accountId, std::string& name) { PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_BNET_ACCOUNT_EMAIL_BY_ID); |