Fixes null propogation

This commit is contained in:
Kamron Batman 2018-09-14 13:49:23 -07:00
parent 22ab83ea9e
commit 3c9842ee5a
218 changed files with 799 additions and 1458 deletions

View file

@ -33,8 +33,7 @@ namespace Server.Engines.Chat
public static void SendCommandTo( Mobile to, ChatCommand type, string param1, string param2 )
{
if ( to != null )
to.Send( new ChatMessagePacket( null, (int)type + 20, param1, param2 ) );
to?.Send( new ChatMessagePacket( null, (int)type + 20, param1, param2 ) );
}
public static void OpenChatWindowRequest( NetState state, PacketReader pvSrc )
@ -57,8 +56,7 @@ namespace Server.Engines.Chat
if ( acct != null )
accountChatName = acct.GetTag( "ChatName" );
if ( accountChatName != null )
accountChatName = accountChatName.Trim();
accountChatName = accountChatName?.Trim();
if ( accountChatName != null && accountChatName.Length > 0 )
{
@ -96,8 +94,7 @@ namespace Server.Engines.Chat
accountChatName = chatName;
if ( acct != null )
acct.AddTag( "ChatName", chatName );
acct?.AddTag( "ChatName", chatName );
}
else
{