diff options
| author | Shauren <shauren.trinity@gmail.com> | 2014-08-22 20:09:18 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2014-08-22 20:09:18 +0200 |
| commit | b90329d63acaecb1f074dd2b303561baa9f639a2 (patch) | |
| tree | f2adfc5acec51b4467d56ba1a659330e83fb5aff /src/server/game/Accounts | |
| parent | f2cb5061618367d6d4c07dee40eb9c6ecaed5d03 (diff) | |
Core/Battle.net: Use real account name from account table to auth instead of always constructing bnetId#index. Fixes having to reconfigure addons by players.
*NEW* battle.net only accounts should be created with battlenet_account_id#account_index format in username
Diffstat (limited to 'src/server/game/Accounts')
| -rw-r--r-- | src/server/game/Accounts/BattlenetAccountMgr.cpp | 23 | ||||
| -rw-r--r-- | src/server/game/Accounts/BattlenetAccountMgr.h | 1 |
2 files changed, 0 insertions, 24 deletions
diff --git a/src/server/game/Accounts/BattlenetAccountMgr.cpp b/src/server/game/Accounts/BattlenetAccountMgr.cpp index 23c1b7cdd61..da71f02d7d2 100644 --- a/src/server/game/Accounts/BattlenetAccountMgr.cpp +++ b/src/server/game/Accounts/BattlenetAccountMgr.cpp @@ -126,26 +126,3 @@ std::string Battlenet::AccountMgr::CalculateShaPassHash(std::string const& name, return ByteArrayToHexStr(sha.GetDigest(), sha.GetLength(), true); } - -bool Battlenet::AccountMgr::GetAccountIdAndIndex(std::string const& account, uint32* battlenetAccountId, uint8* battlenetAccountIndex) -{ - Tokenizer tokens(account, '#'); - if (tokens.size() != 2) - return false; - - if (!battlenetAccountId) - return false; - - *battlenetAccountId = atol(tokens[0]); - if (!*battlenetAccountId) - return false; - - if (battlenetAccountIndex) - { - *battlenetAccountIndex = atol(tokens[1]); - if (!*battlenetAccountIndex) - return false; - } - - return true; -} diff --git a/src/server/game/Accounts/BattlenetAccountMgr.h b/src/server/game/Accounts/BattlenetAccountMgr.h index c41a54189e5..1e0b7b78a99 100644 --- a/src/server/game/Accounts/BattlenetAccountMgr.h +++ b/src/server/game/Accounts/BattlenetAccountMgr.h @@ -38,7 +38,6 @@ namespace Battlenet uint32 GetIdByGameAccount(uint32 gameAccountId); std::string CalculateShaPassHash(std::string const& name, std::string const& password); - bool GetAccountIdAndIndex(std::string const& account, uint32* battlenetAccountId, uint8* battlenetAccountIndex); } } |
