diff options
Diffstat (limited to 'src/server/game')
| -rw-r--r-- | src/server/game/Accounts/BattlenetAccountMgr.cpp | 6 | ||||
| -rw-r--r-- | src/server/game/Accounts/BattlenetAccountMgr.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/server/game/Accounts/BattlenetAccountMgr.cpp b/src/server/game/Accounts/BattlenetAccountMgr.cpp index 88ebb000b5b..3241c6eb5a2 100644 --- a/src/server/game/Accounts/BattlenetAccountMgr.cpp +++ b/src/server/game/Accounts/BattlenetAccountMgr.cpp @@ -23,7 +23,7 @@ using GameAccountMgr = AccountMgr; -AccountOpResult Battlenet::AccountMgr::CreateBattlenetAccount(std::string email, std::string password) +AccountOpResult Battlenet::AccountMgr::CreateBattlenetAccount(std::string email, std::string password, bool withGameAccount /*= true*/) { if (utf8length(email) > MAX_BNET_EMAIL_STR) return AccountOpResult::AOR_NAME_TOO_LONG; @@ -45,7 +45,9 @@ AccountOpResult Battlenet::AccountMgr::CreateBattlenetAccount(std::string email, uint32 newAccountId = GetId(email); ASSERT(newAccountId); - GameAccountMgr::instance()->CreateAccount(std::to_string(newAccountId) + "#1", password, email, newAccountId, 1); + if (withGameAccount) + GameAccountMgr::instance()->CreateAccount(std::to_string(newAccountId) + "#1", password, email, newAccountId, 1); + return AccountOpResult::AOR_OK; } diff --git a/src/server/game/Accounts/BattlenetAccountMgr.h b/src/server/game/Accounts/BattlenetAccountMgr.h index 120bee18e13..7601cbc4e53 100644 --- a/src/server/game/Accounts/BattlenetAccountMgr.h +++ b/src/server/game/Accounts/BattlenetAccountMgr.h @@ -29,7 +29,7 @@ namespace Battlenet { namespace AccountMgr { - AccountOpResult CreateBattlenetAccount(std::string email, std::string password); + AccountOpResult CreateBattlenetAccount(std::string email, std::string password, bool withGameAccount = true); AccountOpResult ChangePassword(uint32 accountId, std::string newPassword); bool CheckPassword(uint32 accountId, std::string password); AccountOpResult LinkWithGameAccount(std::string const& email, std::string const& gameAccountName); |
