Fixes sequential checks
This commit is contained in:
parent
83dcf536d8
commit
42d0b6271f
67 changed files with 99 additions and 99 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue