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/Accounts/BattlenetAccountMgr.cpp | |
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/Accounts/BattlenetAccountMgr.cpp')
-rw-r--r-- | src/server/game/Accounts/BattlenetAccountMgr.cpp | 6 |
1 files changed, 4 insertions, 2 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; } |