Fixes implicit ternary expressions
This commit is contained in:
parent
c85b0a740c
commit
ff26dfa375
345 changed files with 1905 additions and 2336 deletions
|
|
@ -91,7 +91,8 @@ namespace Server.Mobiles
|
|||
Kill();
|
||||
return;
|
||||
}
|
||||
else if ( Map != m_Target.Map || !InRange( m_Target, 15 ) )
|
||||
|
||||
if ( Map != m_Target.Map || !InRange( m_Target, 15 ) )
|
||||
{
|
||||
Map fromMap = Map;
|
||||
Point3D from = Location;
|
||||
|
|
@ -110,15 +111,13 @@ namespace Server.Mobiles
|
|||
to = loc;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
loc.Z = toMap.GetAverageZ( loc.X, loc.Y );
|
||||
|
||||
if ( toMap.CanSpawnMobile( loc ) )
|
||||
{
|
||||
to = loc;
|
||||
break;
|
||||
}
|
||||
loc.Z = toMap.GetAverageZ( loc.X, loc.Y );
|
||||
|
||||
if ( toMap.CanSpawnMobile( loc ) )
|
||||
{
|
||||
to = loc;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( SolenHelper.CheckBlackFriendship( m ) )
|
||||
return false;
|
||||
else
|
||||
return base.IsEnemy( m );
|
||||
return base.IsEnemy( m );
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
|
|
|
|||
|
|
@ -80,8 +80,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( SolenHelper.CheckBlackFriendship( m ) )
|
||||
return false;
|
||||
else
|
||||
return base.IsEnemy( m );
|
||||
return base.IsEnemy( m );
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
|
|
|
|||
|
|
@ -86,8 +86,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( SolenHelper.CheckBlackFriendship( m ) )
|
||||
return false;
|
||||
else
|
||||
return base.IsEnemy( m );
|
||||
return base.IsEnemy( m );
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
|
|
|
|||
|
|
@ -87,8 +87,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( SolenHelper.CheckBlackFriendship( m ) )
|
||||
return false;
|
||||
else
|
||||
return base.IsEnemy( m );
|
||||
return base.IsEnemy( m );
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
|
|
|
|||
|
|
@ -80,8 +80,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( SolenHelper.CheckBlackFriendship( m ) )
|
||||
return false;
|
||||
else
|
||||
return base.IsEnemy( m );
|
||||
return base.IsEnemy( m );
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
|
|
|
|||
|
|
@ -78,8 +78,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( SolenHelper.CheckRedFriendship( m ) )
|
||||
return false;
|
||||
else
|
||||
return base.IsEnemy( m );
|
||||
return base.IsEnemy( m );
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
|
|
|
|||
|
|
@ -80,8 +80,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( SolenHelper.CheckRedFriendship( m ) )
|
||||
return false;
|
||||
else
|
||||
return base.IsEnemy( m );
|
||||
return base.IsEnemy( m );
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
|
|
|
|||
|
|
@ -86,8 +86,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( SolenHelper.CheckRedFriendship( m ) )
|
||||
return false;
|
||||
else
|
||||
return base.IsEnemy( m );
|
||||
return base.IsEnemy( m );
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
|
|
|
|||
|
|
@ -86,8 +86,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( SolenHelper.CheckRedFriendship( m ) )
|
||||
return false;
|
||||
else
|
||||
return base.IsEnemy( m );
|
||||
return base.IsEnemy( m );
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( SolenHelper.CheckRedFriendship( m ) )
|
||||
return false;
|
||||
else
|
||||
return base.IsEnemy( m );
|
||||
return base.IsEnemy( m );
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace Server.Mobiles
|
|||
|
||||
public static bool IsInsideKhaldun( Mobile from )
|
||||
{
|
||||
return @from?.Region != null && @from.Region.IsPartOf( "Khaldun" );
|
||||
return from?.Region != null && from.Region.IsPartOf( "Khaldun" );
|
||||
}
|
||||
|
||||
private Mobile m_Target;
|
||||
|
|
|
|||
|
|
@ -53,8 +53,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( Utility.RandomBool() )
|
||||
return WeaponAbility.ParalyzingBlow;
|
||||
else
|
||||
return WeaponAbility.BleedAttack;
|
||||
return WeaponAbility.BleedAttack;
|
||||
}
|
||||
|
||||
public override bool GivesMLMinorArtifact => true;
|
||||
|
|
|
|||
|
|
@ -50,8 +50,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( Utility.RandomBool() )
|
||||
return WeaponAbility.ParalyzingBlow;
|
||||
else
|
||||
return WeaponAbility.BleedAttack;
|
||||
return WeaponAbility.BleedAttack;
|
||||
}
|
||||
|
||||
public override bool GivesMLMinorArtifact => true;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace Server.Mobiles
|
|||
|
||||
public override void AlterMeleeDamageFrom( Mobile from, ref int damage )
|
||||
{
|
||||
if ( @from is BaseCreature bc )
|
||||
if ( from is BaseCreature bc )
|
||||
{
|
||||
if ( bc.Controlled || bc.BardTarget == this )
|
||||
damage = 0; // Immune to pets and provoked creatures
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ namespace Server.Mobiles
|
|||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
{
|
||||
if ( @from?.Map != null )
|
||||
if ( from?.Map != null )
|
||||
{
|
||||
int amt=0;
|
||||
Mobile target = this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue