Fixes sequential checks
This commit is contained in:
parent
83dcf536d8
commit
42d0b6271f
67 changed files with 99 additions and 99 deletions
|
|
@ -3266,7 +3266,7 @@ namespace Server.Multis
|
|||
|
||||
public bool IsGuildMember( Mobile m )
|
||||
{
|
||||
if ( m == null || Owner == null || Owner.Guild == null )
|
||||
if ( m == null || Owner?.Guild == null )
|
||||
return false;
|
||||
|
||||
return ( m.Guild == Owner.Guild );
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace Server.Items
|
|||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
if ( m_Boat != null && m_Boat.ShipName != null )
|
||||
if ( m_Boat?.ShipName != null )
|
||||
list.Add( 1042884, m_Boat.ShipName ); // the tiller man of the ~1_SHIP_NAME~
|
||||
else
|
||||
base.AddNameProperty( list );
|
||||
|
|
@ -55,7 +55,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
if ( m_Boat != null && m_Boat.ShipName != null )
|
||||
if ( m_Boat?.ShipName != null )
|
||||
LabelTo( from, 1042884, m_Boat.ShipName ); // the tiller man of the ~1_SHIP_NAME~
|
||||
else
|
||||
base.OnSingleClick( from );
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnResponse( Network.NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( !m_From.CheckAlive() || m_From.Backpack == null || m_From.Backpack.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
if ( !m_From.CheckAlive() || m_From.Backpack?.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
return;
|
||||
|
||||
switch ( info.ButtonID )
|
||||
|
|
@ -195,7 +195,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnResponse( Network.NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( !m_From.CheckAlive() || m_From.Backpack == null || m_From.Backpack.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
if ( !m_From.CheckAlive() || m_From.Backpack?.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
return;
|
||||
|
||||
int index = info.ButtonID - 1;
|
||||
|
|
@ -231,7 +231,7 @@ namespace Server.Items
|
|||
|
||||
protected override void OnTarget( Mobile from, object o )
|
||||
{
|
||||
if ( !from.CheckAlive() || from.Backpack == null || from.Backpack.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
if ( !@from.CheckAlive() || @from.Backpack?.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
return;
|
||||
|
||||
IPoint3D ip = o as IPoint3D;
|
||||
|
|
@ -260,7 +260,7 @@ namespace Server.Items
|
|||
|
||||
protected override void OnTargetFinish( Mobile from )
|
||||
{
|
||||
if ( !from.CheckAlive() || from.Backpack == null || from.Backpack.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
if ( !@from.CheckAlive() || @from.Backpack?.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
return;
|
||||
|
||||
if ( !m_Placed )
|
||||
|
|
@ -332,7 +332,7 @@ namespace Server.Items
|
|||
|
||||
public void PlacementWarning_Callback( Mobile from, bool okay, object state )
|
||||
{
|
||||
if ( !from.CheckAlive() || from.Backpack == null || from.Backpack.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
if ( !@from.CheckAlive() || @from.Backpack?.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
return;
|
||||
|
||||
PreviewHouse prevHouse = (PreviewHouse)state;
|
||||
|
|
@ -447,7 +447,7 @@ namespace Server.Items
|
|||
|
||||
public bool OnPlacement( Mobile from, Point3D p )
|
||||
{
|
||||
if ( !from.CheckAlive() || from.Backpack == null || from.Backpack.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
if ( !@from.CheckAlive() || @from.Backpack?.FindItemByType( typeof( HousePlacementTool ) ) == null )
|
||||
return false;
|
||||
|
||||
ArrayList toMove;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace Server.Multis
|
|||
base.GetProperties( list );
|
||||
|
||||
list.Add( 1061639, Utility.FixHtml( GetName() ) ); // Name: ~1_NAME~
|
||||
list.Add( 1061640, (m_Owner == null || m_Owner.Owner == null) ? "nobody" : m_Owner.Owner.Name ); // Owner: ~1_OWNER~
|
||||
list.Add( 1061640, (m_Owner?.Owner == null) ? "nobody" : m_Owner.Owner.Name ); // Owner: ~1_OWNER~
|
||||
|
||||
if ( m_Owner != null )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue