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

@ -48,7 +48,7 @@ namespace Server.Mobiles
public static bool IsInsideKhaldun( Mobile from )
{
return from != null && from.Region != null && from.Region.IsPartOf( "Khaldun" );
return @from?.Region != null && @from.Region.IsPartOf( "Khaldun" );
}
private Mobile m_Target;

View file

@ -196,7 +196,7 @@ namespace Server.Mobiles
public bool Devour( Corpse corpse )
{
if ( corpse == null || corpse.Owner == null ) // sorry we can't devour because the corpse's owner is null
if ( corpse?.Owner == null ) // sorry we can't devour because the corpse's owner is null
return false;
if ( corpse.Owner.Body.IsHuman )

View file

@ -146,7 +146,7 @@ namespace Server.Mobiles
public override void OnDamage( int amount, Mobile from, bool willKill )
{
if ( from != null && from.Map != null )
if ( @from?.Map != null )
{
int amt=0;
Mobile target = this;