40 FxCop Warnings; good practice
This commit is contained in:
parent
3f535ea235
commit
34e3a88bfe
30 changed files with 45 additions and 49 deletions
|
|
@ -1104,7 +1104,7 @@ namespace Server.Items
|
|||
|
||||
// Evasion grants a variable bonus post ML. 50% prior.
|
||||
if ( Evasion.IsEvading( defender ) )
|
||||
chance *= Evasion.GetParryScalar( defender );
|
||||
chance *= Evasion.GetParryScalar( defender );
|
||||
|
||||
// Low dexterity lowers the chance.
|
||||
if ( defender.Dex < 80 )
|
||||
|
|
@ -1133,9 +1133,9 @@ namespace Server.Items
|
|||
chance += 0.05;
|
||||
}
|
||||
|
||||
// Evasion grants a variable bonus post ML. 50% prior.
|
||||
if( Evasion.IsEvading( defender ) )
|
||||
chance *= Evasion.GetParryScalar( defender );
|
||||
// Evasion grants a variable bonus post ML. 50% prior.
|
||||
if( Evasion.IsEvading( defender ) )
|
||||
chance *= Evasion.GetParryScalar( defender );
|
||||
|
||||
// Low dexterity lowers the chance.
|
||||
if( defender.Dex < 80 )
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
|
|
@ -33,7 +34,7 @@ using System.Runtime.CompilerServices;
|
|||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
|
|
@ -76,3 +77,5 @@ using System.Runtime.CompilerServices;
|
|||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("")]
|
||||
[assembly: AssemblyKeyName("")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
@ -183,7 +183,7 @@ namespace Server.Commands
|
|||
}
|
||||
}
|
||||
|
||||
public class CommandSystem
|
||||
public static class CommandSystem
|
||||
{
|
||||
private static string m_Prefix = "[";
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace Server.Diagnostics {
|
|||
}
|
||||
}
|
||||
|
||||
public BaseProfile( string name ) {
|
||||
protected BaseProfile( string name ) {
|
||||
_name = name;
|
||||
|
||||
_stopwatch = new Stopwatch();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace Server.Diagnostics {
|
|||
}
|
||||
}
|
||||
|
||||
public BasePacketProfile( string name )
|
||||
protected BasePacketProfile(string name)
|
||||
: base( name ) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace Server
|
|||
None
|
||||
}
|
||||
|
||||
public class Effects
|
||||
public static class Effects
|
||||
{
|
||||
private static ParticleSupportType m_ParticleSupportType = ParticleSupportType.Detect;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ using DiagELog = System.Diagnostics.EventLog;
|
|||
|
||||
namespace Server
|
||||
{
|
||||
public class EventLog
|
||||
public static class EventLog
|
||||
{
|
||||
static EventLog()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -789,7 +789,7 @@ namespace Server
|
|||
public bool Blocked{ get{ return m_Blocked; } set{ m_Blocked = value; } }
|
||||
}
|
||||
|
||||
public class EventSink
|
||||
public static class EventSink
|
||||
{
|
||||
public static event CharacterCreatedEventHandler CharacterCreated;
|
||||
public static event OpenDoorMacroEventHandler OpenDoorMacroUsed;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace Server.Guilds
|
|||
{
|
||||
private int m_Id;
|
||||
|
||||
public BaseGuild( int Id )//serialization ctor
|
||||
protected BaseGuild( int Id )//serialization ctor
|
||||
{
|
||||
m_Id = Id;
|
||||
m_GuildList.Add( m_Id, this );
|
||||
|
|
@ -44,7 +44,7 @@ namespace Server.Guilds
|
|||
m_NextID = m_Id + 1;
|
||||
}
|
||||
|
||||
public BaseGuild()
|
||||
protected BaseGuild()
|
||||
{
|
||||
m_Id = m_NextID++;
|
||||
m_GuildList.Add( m_Id, this );
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace Server.Gumps
|
|||
{
|
||||
private Gump m_Parent;
|
||||
|
||||
public GumpEntry()
|
||||
protected GumpEntry()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -544,6 +544,7 @@ namespace Server
|
|||
Weight,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum ExpandFlag
|
||||
{
|
||||
None = 0x00,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ using System.IO;
|
|||
|
||||
namespace Server
|
||||
{
|
||||
public class ItemBounds
|
||||
public static class ItemBounds
|
||||
{
|
||||
private static Rectangle2D[] m_Bounds;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,18 +35,18 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Hue { get { return m_Hue; } set { m_Hue = value; } }
|
||||
|
||||
public BaseHairInfo( int itemid )
|
||||
protected BaseHairInfo( int itemid )
|
||||
: this( itemid, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseHairInfo( int itemid, int hue )
|
||||
protected BaseHairInfo( int itemid, int hue )
|
||||
{
|
||||
m_ItemID = itemid;
|
||||
m_Hue = hue;
|
||||
}
|
||||
|
||||
public BaseHairInfo( GenericReader reader )
|
||||
protected BaseHairInfo( GenericReader reader )
|
||||
{
|
||||
int version = reader.ReadInt();
|
||||
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ namespace Server
|
|||
return m_Maps[index];
|
||||
}
|
||||
|
||||
throw new Exception( "Invalid map name" );
|
||||
throw new ArgumentException( "Invalid map name" );
|
||||
}
|
||||
|
||||
private static void CheckNamesAndValues()
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ namespace Server
|
|||
private double m_Value;
|
||||
private bool m_ObeyCap;
|
||||
|
||||
public SkillMod( SkillName skill, bool relative, double value )
|
||||
protected SkillMod( SkillName skill, bool relative, double value )
|
||||
{
|
||||
m_Skill = skill;
|
||||
m_Relative = relative;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ using System.Collections;
|
|||
|
||||
namespace Server.Movement
|
||||
{
|
||||
public class Movement
|
||||
public static class Movement
|
||||
{
|
||||
private static IMovementImpl m_Impl;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ using System.IO;
|
|||
|
||||
namespace Server
|
||||
{
|
||||
public class MultiData
|
||||
public static class MultiData
|
||||
{
|
||||
private static MultiComponentList[] m_Components;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ using System;
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Server {
|
||||
public class NativeReader {
|
||||
public static class NativeReader {
|
||||
|
||||
private static readonly INativeReader m_NativeReader;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Server.Network {
|
|||
/// <summary>
|
||||
/// Handles outgoing packet compression for the network.
|
||||
/// </summary>
|
||||
public class Compression {
|
||||
public static class Compression {
|
||||
private static int[] _huffmanTable = new int[514]
|
||||
{
|
||||
0x2, 0x000, 0x5, 0x01F, 0x6, 0x022, 0x7, 0x034, 0x7, 0x075, 0x6, 0x028, 0x6, 0x03B, 0x7, 0x032,
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ namespace Server.Network
|
|||
Encoded = 0xC0
|
||||
}
|
||||
|
||||
public class PacketHandlers
|
||||
public static class PacketHandlers
|
||||
{
|
||||
private static PacketHandler[] m_Handlers;
|
||||
private static PacketHandler[] m_6017Handlers;
|
||||
|
|
|
|||
|
|
@ -2715,7 +2715,7 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public class AttributeNormalizer
|
||||
public static class AttributeNormalizer
|
||||
{
|
||||
private static int m_Maximum = 25;
|
||||
private static bool m_Enabled = true;
|
||||
|
|
@ -3997,7 +3997,7 @@ namespace Server.Network
|
|||
get{ return m_PacketID; }
|
||||
}
|
||||
|
||||
public Packet( int packetID )
|
||||
protected Packet( int packetID )
|
||||
{
|
||||
m_PacketID = packetID;
|
||||
|
||||
|
|
@ -4015,7 +4015,7 @@ namespace Server.Network
|
|||
m_Stream.Write( (short) 0 );
|
||||
}
|
||||
|
||||
public Packet( int packetID, int length )
|
||||
protected Packet( int packetID, int length )
|
||||
{
|
||||
m_PacketID = packetID;
|
||||
m_Length = length;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace Server
|
|||
{
|
||||
public delegate int NotorietyHandler( Mobile source, Mobile target );
|
||||
|
||||
public class Notoriety
|
||||
public static class Notoriety
|
||||
{
|
||||
public const int Innocent = 1;
|
||||
public const int Ally = 2;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ namespace Server {
|
|||
protected void SaveItems(SaveMetrics metrics)
|
||||
{
|
||||
Dictionary<Serial, Item> items = World.Items;
|
||||
List<Item> decaying = new List<Item>();
|
||||
|
||||
GenericWriter idx;
|
||||
GenericWriter tdb;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace Server.Prompts
|
|||
}
|
||||
}
|
||||
|
||||
public Prompt()
|
||||
protected Prompt()
|
||||
{
|
||||
do
|
||||
{
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace Server
|
|||
return m_Races[index];
|
||||
}
|
||||
|
||||
throw new Exception( "Invalid race name" );
|
||||
throw new ArgumentException( "Invalid race name" );
|
||||
}
|
||||
|
||||
private static void CheckNamesAndValues()
|
||||
|
|
@ -114,7 +114,7 @@ namespace Server
|
|||
public int FemaleBody { get { return m_FemaleBody; } }
|
||||
public int FemaleGhostBody { get { return m_FemaleGhostBody; } }
|
||||
|
||||
public Race( int raceID, int raceIndex, string name, string pluralName, int maleBody, int femaleBody, int maleGhostBody, int femaleGhostBody, Expansion requiredExpansion )
|
||||
protected Race( int raceID, int raceIndex, string name, string pluralName, int maleBody, int femaleBody, int maleGhostBody, int femaleGhostBody, Expansion requiredExpansion )
|
||||
{
|
||||
m_RaceID = raceID;
|
||||
m_RaceIndex = raceIndex;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ using Microsoft.VisualBasic;
|
|||
|
||||
namespace Server
|
||||
{
|
||||
public class ScriptCompiler
|
||||
public static class ScriptCompiler
|
||||
{
|
||||
private static Assembly[] m_Assemblies;
|
||||
|
||||
|
|
@ -522,15 +522,6 @@ namespace Server
|
|||
|
||||
private delegate CompilerResults Compiler( bool debug );
|
||||
|
||||
private void LoadScriptedAssembly( List<Assembly> assemblies, string fileName, Compiler compiler, bool debug )
|
||||
{
|
||||
|
||||
|
||||
if( File.Exists( fileName ) )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Compile()
|
||||
{
|
||||
return Compile( false );
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace Server
|
|||
{
|
||||
public abstract class GenericReader
|
||||
{
|
||||
public GenericReader() { }
|
||||
protected GenericReader() { }
|
||||
|
||||
public abstract string ReadString();
|
||||
public abstract DateTime ReadDateTime();
|
||||
|
|
@ -90,7 +90,7 @@ namespace Server
|
|||
|
||||
public abstract class GenericWriter
|
||||
{
|
||||
public GenericWriter() { }
|
||||
protected GenericWriter() { }
|
||||
|
||||
public abstract void Close();
|
||||
|
||||
|
|
|
|||
|
|
@ -53,11 +53,13 @@ namespace Server.Targeting
|
|||
}
|
||||
}
|
||||
|
||||
public MultiTarget( int multiID, Point3D offset ) : this( multiID, offset, 10, true, TargetFlags.None )
|
||||
protected MultiTarget( int multiID, Point3D offset )
|
||||
: this( multiID, offset, 10, true, TargetFlags.None )
|
||||
{
|
||||
}
|
||||
|
||||
public MultiTarget( int multiID, Point3D offset, int range, bool allowGround, TargetFlags flags ) : base( range, allowGround, flags )
|
||||
protected MultiTarget( int multiID, Point3D offset, int range, bool allowGround, TargetFlags flags )
|
||||
: base( range, allowGround, flags )
|
||||
{
|
||||
m_MultiID = multiID;
|
||||
m_Offset = offset;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace Server.Targeting
|
|||
|
||||
public DateTime TimeoutTime{ get{ return m_TimeoutTime; } }
|
||||
|
||||
public Target( int range, bool allowGround, TargetFlags flags )
|
||||
protected Target( int range, bool allowGround, TargetFlags flags )
|
||||
{
|
||||
m_TargetID = ++m_NextTargetID;
|
||||
m_Range = range;
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ namespace Server
|
|||
StairRight = 0x80000000
|
||||
}
|
||||
|
||||
public class TileData
|
||||
public static class TileData
|
||||
{
|
||||
private static LandData[] m_LandData;
|
||||
private static ItemData[] m_ItemData;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue