Some cleanups. (might break build for scripts as they are a WIP)

This commit is contained in:
hondacrx
2023-10-08 10:35:31 -04:00
parent fa10b981bd
commit cda53c8e7f
208 changed files with 2266 additions and 2329 deletions
+5 -5
View File
@@ -105,7 +105,7 @@ namespace Game.Chat.Commands
break;
}
string author = handler.GetSession() ? handler.GetSession().GetPlayerName() : "Server";
string author = handler.GetSession() != null ? handler.GetSession().GetPlayerName() : "Server";
switch (Global.WorldMgr.BanAccount(mode, nameOrIP, duration, reason, author))
{
case BanReturn.Success:
@@ -180,7 +180,7 @@ namespace Game.Chat.Commands
Player target = Global.ObjAccessor.FindPlayerByName(name);
ObjectGuid targetGuid;
if (!target)
if (target == null)
{
targetGuid = Global.CharacterCacheStorage.GetCharacterGuidByName(name);
if (targetGuid.IsEmpty())
@@ -314,7 +314,7 @@ namespace Game.Chat.Commands
handler.SendSysMessage(CypherStrings.BanlistMatchingcharacter);
// Chat short output
if (handler.GetSession())
if (handler.GetSession() != null)
{
do
{
@@ -405,7 +405,7 @@ namespace Game.Chat.Commands
handler.SendSysMessage(CypherStrings.BanlistMatchingip);
// Chat short output
if (handler.GetSession())
if (handler.GetSession() != null)
{
do
{
@@ -458,7 +458,7 @@ namespace Game.Chat.Commands
handler.SendSysMessage(CypherStrings.BanlistMatchingaccount);
// Chat short output
if (handler.GetSession())
if (handler.GetSession() != null)
{
do
{