More Cleanups
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Game.Chat
|
||||
|
||||
// Security level required
|
||||
WorldSession session = handler.GetSession();
|
||||
bool hasRBAC = (session.HasPermission(RBACPermissions.EmailConfirmForPassChange) ? true : false);
|
||||
bool hasRBAC = (session.HasPermission(RBACPermissions.EmailConfirmForPassChange));
|
||||
uint pwConfig = 0; // 0 - PW_NONE, 1 - PW_EMAIL, 2 - PW_RBAC
|
||||
|
||||
handler.SendSysMessage(CypherStrings.AccountSecType, (pwConfig == 0 ? "Lowest level: No Email input required." :
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace Game.Chat.Commands
|
||||
string accountName = accountId.ToString() + '#' + index;
|
||||
|
||||
// Generate random hex string for password, these accounts must not be logged on with GRUNT
|
||||
byte[] randPassword = new byte[0].GenerateRandomKey(8);
|
||||
byte[] randPassword = Array.Empty<byte>().GenerateRandomKey(8);
|
||||
switch (Global.AccountMgr.CreateAccount(accountName, randPassword.ToHexString(), bnetAccountName, accountId, index))
|
||||
{
|
||||
case AccountOpResult.Ok:
|
||||
@@ -179,7 +179,7 @@ namespace Game.Chat.Commands
|
||||
{
|
||||
int index = name.IndexOf('#');
|
||||
if (index > 0)
|
||||
return "WoW" + name.Substring(++index);
|
||||
return "WoW" + name[++index..];
|
||||
else
|
||||
return name;
|
||||
});
|
||||
|
||||
@@ -288,7 +288,7 @@ namespace Game.Chat
|
||||
}
|
||||
|
||||
uint oldAccountId = characterInfo.AccountId;
|
||||
uint newAccountId = oldAccountId;
|
||||
uint newAccountId;
|
||||
|
||||
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.SEL_ACCOUNT_ID_BY_NAME);
|
||||
stmt.AddValue(0, accountName);
|
||||
|
||||
@@ -369,17 +369,15 @@ namespace Game.Chat.Commands
|
||||
if (args.Empty())
|
||||
return false;
|
||||
|
||||
Player target;
|
||||
ObjectGuid targetGuid;
|
||||
string targetName;
|
||||
|
||||
ObjectGuid parseGUID = ObjectGuid.Create(HighGuid.Player, args.NextUInt64());
|
||||
if (Global.CharacterCacheStorage.GetCharacterNameByGuid(parseGUID, out targetName))
|
||||
{
|
||||
target = Global.ObjAccessor.FindPlayer(parseGUID);
|
||||
targetGuid = parseGUID;
|
||||
}
|
||||
else if (!handler.ExtractPlayerTarget(args, out target, out targetGuid, out targetName))
|
||||
else if (!handler.ExtractPlayerTarget(args, out _, out targetGuid, out targetName))
|
||||
return false;
|
||||
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_MAIL_LIST_COUNT);
|
||||
|
||||
@@ -1580,7 +1580,7 @@ namespace Game.Chat
|
||||
Locale locale = handler.GetSessionDbcLocale();
|
||||
uint totalPlayerTime;
|
||||
uint level;
|
||||
string alive = handler.GetCypherString(CypherStrings.Error);
|
||||
string alive;
|
||||
ulong money;
|
||||
uint xp = 0;
|
||||
uint xptotal = 0;
|
||||
|
||||
Reference in New Issue
Block a user