diff options
author | Shauren <shauren.trinity@gmail.com> | 2015-01-17 20:02:19 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2015-01-17 20:03:39 +0100 |
commit | 58d75eda3a0fea8f64d434adb7707b2dfd953089 (patch) | |
tree | 82d3bf88772319e902c82f37df35c8eee53ae043 /src/server/game | |
parent | 17039cd92255d85edff14171397a326c6eeffd06 (diff) |
Core/Commands: Added "createGameAccount" argument to .bnetaccount create command (default true) to opt out of creating the initial game account
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); |