Fixes bnet account create command.

This commit is contained in:
hondacrx
2022-07-07 13:44:01 -04:00
parent ba6c30add4
commit db83da417a
4 changed files with 12 additions and 25 deletions
@@ -28,7 +28,7 @@ namespace Game.Chat.Commands
[Command("create", RBACPermissions.CommandBnetAccountCreate, true)]
static bool HandleAccountCreateCommand(CommandHandler handler, string accountName, string password, bool? createGameAccount)
{
if (!accountName.Contains('@'))
if (accountName.IsEmpty() || !accountName.Contains('@'))
{
handler.SendSysMessage(CypherStrings.AccountInvalidBnetName);
return false;
@@ -38,7 +38,7 @@ namespace Game.Chat.Commands
switch (Global.BNetAccountMgr.CreateBattlenetAccount(accountName, password, createGameAccount.GetValueOrDefault(true), out gameAccountName))
{
case AccountOpResult.Ok:
if (createGameAccount.Value)
if (createGameAccount.HasValue && createGameAccount.Value)
handler.SendSysMessage(CypherStrings.AccountCreatedBnetWithGame, accountName, gameAccountName);
else
handler.SendSysMessage(CypherStrings.AccountCreated, accountName);
+1 -1
View File
@@ -879,7 +879,7 @@ namespace Game.Chat
return false;
}
if (state == 0)
if (!state.HasValue)
{
// reset all states
for (AuraStateType s = 0; s < AuraStateType.Max; ++s)