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

@ -236,8 +236,8 @@ namespace Server.Gumps
public int Compare( RaffleEntry x, RaffleEntry y )
{
bool xIsNull = ( x == null || x.From == null );
bool yIsNull = ( y == null || y.From == null );
bool xIsNull = ( x?.From == null );
bool yIsNull = ( y?.From == null );
if ( xIsNull && yIsNull )
return 0;
@ -265,8 +265,8 @@ namespace Server.Gumps
public int Compare( RaffleEntry x, RaffleEntry y )
{
bool xIsNull = ( x == null || x.From == null );
bool yIsNull = ( y == null || y.From == null );
bool xIsNull = ( x?.From == null );
bool yIsNull = ( y?.From == null );
if ( xIsNull && yIsNull )
return 0;
@ -304,8 +304,8 @@ namespace Server.Gumps
public int Compare( RaffleEntry x, RaffleEntry y )
{
bool xIsNull = ( x == null || x.Address == null );
bool yIsNull = ( y == null || y.Address == null );
bool xIsNull = ( x?.Address == null );
bool yIsNull = ( y?.Address == null );
if ( xIsNull && yIsNull )
return 0;

View file

@ -54,7 +54,7 @@ namespace Server.Regions
public override bool OnTarget( Mobile m, Target t, object o )
{
if ( m.Spell != null && m.Spell is MarkSpell && m.AccessLevel == AccessLevel.Player )
if ( m.Spell is MarkSpell && m.AccessLevel == AccessLevel.Player )
{
m.SendLocalizedMessage( 501800 ); // You cannot mark an object at that location.
return false;