Fixes implicit ternary expressions

This commit is contained in:
Kamron Batman 2018-09-14 14:56:48 -07:00
parent c85b0a740c
commit ff26dfa375
345 changed files with 1905 additions and 2336 deletions

View file

@ -104,8 +104,7 @@ namespace Server.Items
if ( FacingSouth )
return BaseAddon.IsWall( p.X, p.Y - 1, p.Z, map ); // north wall
else
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // west wall
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // west wall
}
}

View file

@ -172,9 +172,9 @@ namespace Server.Items
{
if ( keg.Type == PotionEffect.ExplosionLesser )
return 5;
else if ( keg.Type == PotionEffect.Explosion )
if ( keg.Type == PotionEffect.Explosion )
return 10;
else if ( keg.Type == PotionEffect.ExplosionGreater )
if ( keg.Type == PotionEffect.ExplosionGreater )
return 15;
}

View file

@ -107,8 +107,7 @@ namespace Server.Items
if ( FacingSouth )
return BaseAddon.IsWall( p.X, p.Y - 1, p.Z, map ); // north wall
else
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // west wall
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // west wall
}
}

View file

@ -99,9 +99,9 @@ namespace Server.Items
if ( Type == StoneFaceTrapType.NorthWestWall )
return BaseAddon.IsWall( p.X, p.Y - 1, p.Z, map ) && BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // north and west wall
else if ( Type == StoneFaceTrapType.NorthWall )
if ( Type == StoneFaceTrapType.NorthWall )
return BaseAddon.IsWall( p.X, p.Y - 1, p.Z, map ); // north wall
else if ( Type == StoneFaceTrapType.WestWall )
if ( Type == StoneFaceTrapType.WestWall )
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // west wall
return false;

View file

@ -109,8 +109,7 @@ namespace Server.Items
if ( FacingSouth )
return BaseAddon.IsWall( p.X, p.Y - 1, p.Z, map ); // north wall
else
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // west wall
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // west wall
}
}

View file

@ -168,7 +168,7 @@ namespace Server.Items
public static WeaponEngravingTool Find( Mobile from )
{
return @from.Backpack?.FindItemByType( typeof( WeaponEngravingTool ) ) as WeaponEngravingTool;
return from.Backpack?.FindItemByType( typeof( WeaponEngravingTool ) ) as WeaponEngravingTool;
}
private class TargetWeapon : Target