Fixes null propogation
This commit is contained in:
parent
22ab83ea9e
commit
3c9842ee5a
218 changed files with 799 additions and 1458 deletions
|
|
@ -13,8 +13,7 @@ namespace Server.Engines.PartySystem
|
|||
{
|
||||
DeclineTimer t = (DeclineTimer)m_Table[m];
|
||||
|
||||
if ( t != null )
|
||||
t.Stop();
|
||||
t?.Stop();
|
||||
|
||||
m_Table[m] = t = new DeclineTimer( m, leader );
|
||||
t.Start();
|
||||
|
|
|
|||
|
|
@ -129,18 +129,14 @@ namespace Server.Engines.PartySystem
|
|||
Mobile from = e.Mobile;
|
||||
Party p = Get( from );
|
||||
|
||||
if ( p != null )
|
||||
p.Remove( from );
|
||||
p?.Remove( @from );
|
||||
|
||||
from.Party = null;
|
||||
}
|
||||
|
||||
public static Party Get( Mobile m )
|
||||
{
|
||||
if ( m == null )
|
||||
return null;
|
||||
|
||||
return m.Party as Party;
|
||||
return m?.Party as Party;
|
||||
}
|
||||
|
||||
public Party( Mobile leader )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue