From 41daea5b4eef1f91b1cc5cbc37b335677d440b8b Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 18 Jun 2014 00:19:00 +0200 Subject: Core/Mail: Implemented sending battle.net account bound items --- src/server/game/Accounts/BattlenetAccountMgr.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/server/game/Accounts/BattlenetAccountMgr.cpp') 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); -- cgit v1.2.3