Core/BnetServer: Bnetserver cleanup

Port From (https://github.com/TrinityCore/TrinityCore/commit/e9392ad28767626e519c463e2110184d71ba8426)
This commit is contained in:
hondacrx
2020-08-12 17:43:37 -04:00
parent 7eb9b2201f
commit 459d49f899
12 changed files with 201 additions and 56 deletions
@@ -99,7 +99,9 @@ namespace Game.Chat.Commands
byte index = (byte)(Global.BNetAccountMgr.GetMaxIndex(accountId) + 1);
string accountName = accountId.ToString() + '#' + index;
switch (Global.AccountMgr.CreateAccount(accountName, "DUMMY", bnetAccountName, accountId, index))
// Generate random hex string for password, these accounts must not be logged on with GRUNT
byte[] randPassword = new byte[0].GenerateRandomKey(16);
switch (Global.AccountMgr.CreateAccount(accountName, randPassword.ToHexString(), bnetAccountName, accountId, index))
{
case AccountOpResult.Ok:
handler.SendSysMessage(CypherStrings.AccountCreated, accountName);