Fixes casting, default parameters and null propogation in more files.
This commit is contained in:
parent
067dca8393
commit
403e2a8b9d
21 changed files with 328 additions and 523 deletions
|
|
@ -117,12 +117,9 @@ namespace Server
|
|||
|
||||
public static void HWInfo_OnTarget( Mobile from, object obj )
|
||||
{
|
||||
if ( obj is Mobile && ((Mobile)obj).Player )
|
||||
if ( obj is Mobile m && m.Player )
|
||||
{
|
||||
Mobile m = (Mobile)obj;
|
||||
Account acct = m.Account as Account;
|
||||
|
||||
if ( acct != null )
|
||||
if ( m.Account is Account acct )
|
||||
{
|
||||
HardwareInfo hwInfo = acct.HardwareInfo;
|
||||
|
||||
|
|
@ -180,9 +177,7 @@ namespace Server
|
|||
|
||||
info.m_TimeReceived = DateTime.UtcNow;
|
||||
|
||||
Account acct = state.Account as Account;
|
||||
|
||||
if ( acct != null )
|
||||
if ( state.Account is Account acct )
|
||||
acct.HardwareInfo = info;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue