Fixes null propogation
This commit is contained in:
parent
22ab83ea9e
commit
3c9842ee5a
218 changed files with 799 additions and 1458 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue