Fixes implicit ternary expressions
This commit is contained in:
parent
c85b0a740c
commit
ff26dfa375
345 changed files with 1905 additions and 2336 deletions
|
|
@ -38,11 +38,8 @@ namespace Server.Items
|
|||
{
|
||||
if ( from.Mounted )
|
||||
return true;
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1070770 ); // You can only execute this attack while mounted!
|
||||
ClearCurrentAbility( from );
|
||||
}
|
||||
from.SendLocalizedMessage( 1070770 ); // You can only execute this attack while mounted!
|
||||
ClearCurrentAbility( from );
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace Server.Items
|
|||
|
||||
if ( weapon != null && weapon.PrimaryAbility == this )
|
||||
return 70.0;
|
||||
else if ( weapon != null && weapon.SecondaryAbility == this )
|
||||
if ( weapon != null && weapon.SecondaryAbility == this )
|
||||
return 90.0;
|
||||
|
||||
return 200.0;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,8 @@ namespace Server.Items
|
|||
from.LocalOverheadMessage( MessageType.Regular, 0x3E9, 1019045 ); // I can't reach that
|
||||
return;
|
||||
}
|
||||
else if ( !IsAccessibleTo( from ) )
|
||||
|
||||
if ( !IsAccessibleTo( from ) )
|
||||
{
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3E9, 1061637 ); // You are not allowed to access this.
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ namespace Server.Items
|
|||
|
||||
if ( Core.ML )
|
||||
return MlSpeed;
|
||||
else if ( Core.AOS )
|
||||
if ( Core.AOS )
|
||||
return AosSpeed;
|
||||
|
||||
return OldSpeed;
|
||||
|
|
@ -540,7 +540,8 @@ namespace Server.Items
|
|||
m.SendLocalizedMessage( 500214 ); // You already have something in both hands.
|
||||
return true;
|
||||
}
|
||||
else if ( Layer == Layer.OneHanded && layer == Layer.TwoHanded && !(item is BaseShield) && !(item is BaseEquipableLight) )
|
||||
|
||||
if ( Layer == Layer.OneHanded && layer == Layer.TwoHanded && !(item is BaseShield) && !(item is BaseEquipableLight) )
|
||||
{
|
||||
m.SendLocalizedMessage( 500215 ); // You can only wield one weapon at a time.
|
||||
return true;
|
||||
|
|
@ -1525,7 +1526,7 @@ namespace Server.Items
|
|||
|
||||
damageGiven = AOS.Damage( defender, attacker, damage, ignoreArmor, phys, fire, cold, pois, nrgy, chaos, direct, false, this is BaseRanged, false );
|
||||
|
||||
double propertyBonus = ( move == null ) ? 1.0 : move.GetPropertyBonus( attacker );
|
||||
double propertyBonus = move?.GetPropertyBonus( attacker ) ?? 1.0;
|
||||
|
||||
if ( Core.AOS )
|
||||
{
|
||||
|
|
@ -1866,7 +1867,8 @@ namespace Server.Items
|
|||
{
|
||||
continue;
|
||||
}
|
||||
else if ( scalar < 1.0 )
|
||||
|
||||
if ( scalar < 1.0 )
|
||||
{
|
||||
damage *= ( 11 - from.GetDistanceToSqrt( m ) ) / 10;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,8 +56,7 @@ namespace Server.Items
|
|||
|
||||
if ( wresValue > incrValue )
|
||||
return wresValue;
|
||||
else
|
||||
return incrValue;
|
||||
return incrValue;
|
||||
}
|
||||
|
||||
private void CheckPreAOSMoves( Mobile attacker, Mobile defender )
|
||||
|
|
|
|||
|
|
@ -91,12 +91,10 @@ namespace Server.Items
|
|||
|
||||
return GetDelay( attacker );
|
||||
}
|
||||
else
|
||||
{
|
||||
attacker.RevealingAction();
|
||||
|
||||
return TimeSpan.FromSeconds( 0.25 );
|
||||
}
|
||||
attacker.RevealingAction();
|
||||
|
||||
return TimeSpan.FromSeconds( 0.25 );
|
||||
}
|
||||
|
||||
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus = 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue