diff --git a/Server/Interfaces.cs b/Server/Interfaces.cs index d6830b17d..1aa06a274 100644 --- a/Server/Interfaces.cs +++ b/Server/Interfaces.cs @@ -40,8 +40,8 @@ namespace Server { public interface IVendor { - bool OnBuyItems( Mobile from, List list ); - bool OnSellItems( Mobile from, List list ); + bool OnBuyItems( Mobile from, List list ); + bool OnSellItems( Mobile from, List list ); DateTime LastRestock{ get; set; } TimeSpan RestockDelay{ get; } diff --git a/Server/Item.cs b/Server/Item.cs index 457c01cb7..39c3d4112 100644 --- a/Server/Item.cs +++ b/Server/Item.cs @@ -1120,10 +1120,10 @@ namespace Server ((Mobile)m_Parent).GetChildNameProperties( list, item ); } - public virtual bool IsChildVisibleTo( Mobile m, Item child ) - { - return true; - } + public virtual bool IsChildVisibleTo( Mobile m, Item child ) + { + return true; + } public void Bounce( Mobile from ) { diff --git a/Server/Items/Container.cs b/Server/Items/Container.cs index 48be3f74d..dda9e06ac 100644 --- a/Server/Items/Container.cs +++ b/Server/Items/Container.cs @@ -1646,50 +1646,50 @@ namespace Server.Items } } - public void ProcessOpeners( Mobile opener ) - { - if ( !IsPublicContainer ) - { - bool contains = false; + public void ProcessOpeners( Mobile opener ) + { + if ( !IsPublicContainer ) + { + bool contains = false; - if ( m_Openers != null ) - { - Point3D worldLoc = GetWorldLocation(); - Map map = this.Map; + if ( m_Openers != null ) + { + Point3D worldLoc = GetWorldLocation(); + Map map = this.Map; - for ( int i = 0; i < m_Openers.Count; ++i ) - { - Mobile mob = m_Openers[i]; + for ( int i = 0; i < m_Openers.Count; ++i ) + { + Mobile mob = m_Openers[i]; - if ( mob == opener ) - { - contains = true; - } - else - { - int range = GetUpdateRange( mob ); + if ( mob == opener ) + { + contains = true; + } + else + { + int range = GetUpdateRange( mob ); - if ( mob.Map != map || !mob.InRange( worldLoc, range ) ) - m_Openers.RemoveAt( i-- ); - } - } - } + if ( mob.Map != map || !mob.InRange( worldLoc, range ) ) + m_Openers.RemoveAt( i-- ); + } + } + } - if ( !contains ) - { - if ( m_Openers == null ) - { - m_Openers = new List(); - } + if ( !contains ) + { + if ( m_Openers == null ) + { + m_Openers = new List(); + } - m_Openers.Add( opener ); - } - else if ( m_Openers != null && m_Openers.Count == 0 ) - { - m_Openers = null; - } - } - } + m_Openers.Add( opener ); + } + else if ( m_Openers != null && m_Openers.Count == 0 ) + { + m_Openers = null; + } + } + } public override void GetProperties( ObjectPropertyList list ) { diff --git a/Server/Network/PacketHandlers.cs b/Server/Network/PacketHandlers.cs index 89d2f38f5..7b5b48705 100644 --- a/Server/Network/PacketHandlers.cs +++ b/Server/Network/PacketHandlers.cs @@ -401,7 +401,7 @@ namespace Server.Network if ( (msgSize / 7) > 100 ) return; - List buyList = new List( msgSize / 7 ); + List buyList = new List( msgSize / 7 ); for ( ;msgSize>0;msgSize-=7) { byte layer = pvSrc.ReadByte(); @@ -443,7 +443,7 @@ namespace Server.Network int count = pvSrc.ReadUInt16(); if ( count < 100 && pvSrc.Size == (1+2+4+2+(count*6)) ) { - List sellList = new List( count ); + List sellList = new List( count ); for (int i=0;i list ) - : base( 0x3c ) + public VendorBuyContent( List list ) + : base( 0x3c ) { this.EnsureCapacity( list.Count*19 + 5 ); @@ -326,8 +326,8 @@ namespace Server.Network public sealed class VendorBuyList : Packet { - public VendorBuyList( Mobile vendor, List list ) - : base( 0x74 ) + public VendorBuyList( Mobile vendor, List list ) + : base( 0x74 ) { this.EnsureCapacity( 256 ); diff --git a/Server/Prompt.cs b/Server/Prompt.cs index 809d8bb99..1519d16f6 100644 --- a/Server/Prompt.cs +++ b/Server/Prompt.cs @@ -46,7 +46,7 @@ namespace Server.Prompts public virtual void OnCancel( Mobile from ) { - } + } public virtual void OnResponse( Mobile from, string text ) { diff --git a/Server/ScriptCompiler.cs b/Server/ScriptCompiler.cs index 50f27f61a..fb5663cdd 100644 --- a/Server/ScriptCompiler.cs +++ b/Server/ScriptCompiler.cs @@ -126,7 +126,7 @@ namespace Server } bin.Write( debug ); - bin.Write( Core.Version.ToString() ); + bin.Write( Core.Version.ToString() ); ms.Position = 0; diff --git a/Server/Utility.cs b/Server/Utility.cs index ba8da5be3..1744d61c3 100644 --- a/Server/Utility.cs +++ b/Server/Utility.cs @@ -146,23 +146,23 @@ namespace Server return sb.ToString(); } - public static bool IPMatchCIDR( string cidr, IPAddress ip ) - { + public static bool IPMatchCIDR( string cidr, IPAddress ip ) + { if ( ip == null || ip.AddressFamily == AddressFamily.InterNetworkV6 ) return false; //Just worry about IPv4 for now /* - string[] str = cidr.Split( '/' ); + string[] str = cidr.Split( '/' ); - if ( str.Length != 2 ) - return false; + if ( str.Length != 2 ) + return false; /* ************************************************** - IPAddress cidrPrefix; + IPAddress cidrPrefix; - if ( !IPAddress.TryParse( str[0], out cidrPrefix ) ) - return false; + if ( !IPAddress.TryParse( str[0], out cidrPrefix ) ) + return false; * */ /* @@ -180,7 +180,7 @@ namespace Server uint cidrPrefix = OrderedAddressValue( bytes ); - int cidrLength = Utility.ToInt32( str[1] ); + int cidrLength = Utility.ToInt32( str[1] ); //The below solution is the fastest solution of the three */ @@ -273,19 +273,19 @@ namespace Server uint cidrPrefix = OrderedAddressValue( bytes ); - return IPMatchCIDR( cidrPrefix, ip, cidrLength ); - } + return IPMatchCIDR( cidrPrefix, ip, cidrLength ); + } - public static bool IPMatchCIDR( IPAddress cidrPrefix, IPAddress ip, int cidrLength ) - { - if ( cidrPrefix == null || ip == null || cidrPrefix.AddressFamily == AddressFamily.InterNetworkV6 ) //Ignore IPv6 for now - return false; + public static bool IPMatchCIDR( IPAddress cidrPrefix, IPAddress ip, int cidrLength ) + { + if ( cidrPrefix == null || ip == null || cidrPrefix.AddressFamily == AddressFamily.InterNetworkV6 ) //Ignore IPv6 for now + return false; uint cidrValue = SwapUnsignedInt( (uint)GetLongAddressValue( cidrPrefix ) ); uint ipValue = SwapUnsignedInt( (uint)GetLongAddressValue( ip ) ); return IPMatchCIDR( cidrValue, ipValue, cidrLength ); - } + } public static bool IPMatchCIDR( uint cidrPrefixValue, IPAddress ip, int cidrLength ) { @@ -481,10 +481,10 @@ namespace Server public static bool InsensitiveStartsWith( string first, string second ) { return Insensitive.StartsWith( first, second ); - } + } - #region To[Something] - public static bool ToBoolean( string value ) + #region To[Something] + public static bool ToBoolean( string value ) { bool b; bool.TryParse( value, out b ); @@ -518,11 +518,11 @@ namespace Server int.TryParse( value, out i ); return i; - } - #endregion + } + #endregion - #region Get[Something] - public static int GetXMLInt32( string intString, int defaultValue ) + #region Get[Something] + public static int GetXMLInt32( string intString, int defaultValue ) { try { @@ -530,11 +530,11 @@ namespace Server } catch { - int val; - if ( int.TryParse( intString, out val ) ) - return val; + int val; + if ( int.TryParse( intString, out val ) ) + return val; - return defaultValue; + return defaultValue; } } @@ -605,15 +605,15 @@ namespace Server #pragma warning disable 618 return address.Address; #pragma warning restore 618 - } - #endregion + } + #endregion - public static double RandomDouble() + public static double RandomDouble() { return m_Random.NextDouble(); - } - #region In[...]Range - public static bool InRange( Point3D p1, Point3D p2, int range ) + } + #region In[...]Range + public static bool InRange( Point3D p1, Point3D p2, int range ) { return ( p1.m_X >= (p2.m_X - range) ) && ( p1.m_X <= (p2.m_X + range) ) @@ -643,10 +643,10 @@ namespace Server && ( p1.X <= (p2.X + 18) ) && ( p1.Y >= (p2.Y - 18) ) && ( p1.Y <= (p2.Y + 18) ); - } + } - #endregion - public static Direction GetDirection( IPoint2D from, IPoint2D to ) + #endregion + public static Direction GetDirection( IPoint2D from, IPoint2D to ) { int dx = to.X - from.X; int dy = to.Y - from.Y;