Fixes sequential checks

This commit is contained in:
Kamron Batman 2018-09-14 13:00:41 -07:00
parent 83dcf536d8
commit 42d0b6271f
67 changed files with 99 additions and 99 deletions

View file

@ -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;