Fixes null propogation
This commit is contained in:
parent
22ab83ea9e
commit
3c9842ee5a
218 changed files with 799 additions and 1458 deletions
|
|
@ -62,21 +62,18 @@ namespace Server.Items
|
|||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
if ( m_Boat != null )
|
||||
m_Boat.Delete();
|
||||
m_Boat?.Delete();
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( m_Boat == null || !m_Boat.Contains( from ) )
|
||||
{
|
||||
if ( m_Boat.TillerMan != null )
|
||||
m_Boat.TillerMan.Say( 502490 ); // You must be on the ship to open the hold.
|
||||
m_Boat.TillerMan?.Say( 502490 ); // You must be on the ship to open the hold.
|
||||
}
|
||||
else if ( m_Boat.IsMoving )
|
||||
{
|
||||
if ( m_Boat.TillerMan != null )
|
||||
m_Boat.TillerMan.Say( 502491 ); // I can not open the hold while the ship is moving.
|
||||
m_Boat.TillerMan?.Say( 502491 ); // I can not open the hold while the ship is moving.
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue