From 22ab83ea9ebc19fcb81d3595bdc8b2f027c5d2d0 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Fri, 14 Sep 2018 13:22:16 -0700 Subject: [PATCH] Replaces types with built-in types. --- Scripts/Accounting/AccountHandler.cs | 6 ++-- Scripts/Commands/Add.cs | 16 +++++----- Scripts/Commands/Docs.cs | 30 +++++++++---------- Scripts/Commands/GenCategorization.cs | 2 +- .../Compilers/ConditionalCompiler.cs | 2 +- Scripts/Commands/Logging.cs | 2 +- Scripts/Commands/Profiling.cs | 4 +-- Scripts/Commands/Properties.cs | 24 +++++++-------- Scripts/Commands/Statics.cs | 2 +- .../Engines/BulkOrders/Books/BulkOrderBook.cs | 2 +- Scripts/Engines/Chat/Channel.cs | 2 +- Scripts/Engines/Chat/Packets.cs | 4 +-- Scripts/Engines/ConPVP/AcceptDuelGump.cs | 10 +++---- Scripts/Engines/ConPVP/DuelContext.cs | 6 ++-- Scripts/Engines/ConPVP/DuelContextGump.cs | 2 +- Scripts/Engines/ConPVP/Games/BombingRun.cs | 2 +- Scripts/Engines/ConPVP/Games/CTF.cs | 2 +- Scripts/Engines/ConPVP/Games/DoubleDom.cs | 2 +- Scripts/Engines/ConPVP/Games/KingOfTheHill.cs | 2 +- Scripts/Engines/ConPVP/LadderGump.cs | 2 +- Scripts/Engines/ConPVP/Participant.cs | 2 +- Scripts/Engines/ConPVP/Tournament.cs | 4 +-- Scripts/Engines/Craft/Core/CraftItem.cs | 4 +-- Scripts/Engines/Craft/Core/CraftRes.cs | 2 +- .../Doom/LeverPuzzle/LeverPuzzleController.cs | 12 ++++---- .../Doom/LeverPuzzle/LeverPuzzleItems.cs | 6 ++-- .../Ethics/Evil/Mobiles/UnholyFamiliar.cs | 2 +- .../Ethics/Evil/Mobiles/UnholySteed.cs | 2 +- .../Ethics/Hero/Mobiles/HolyFamiliar.cs | 2 +- .../Engines/Ethics/Hero/Mobiles/HolySteed.cs | 2 +- Scripts/Engines/Factions/Core/Faction.cs | 4 +-- Scripts/Engines/Factions/Gumps/FinanceGump.cs | 4 +-- .../Mobiles/Guards/BaseFactionGuard.cs | 2 +- Scripts/Engines/MLQuests/MLQuestEntry.cs | 4 +-- Scripts/Engines/MyRunUO/MyRunUO.cs | 4 +-- Scripts/Engines/Party/Party.cs | 2 +- .../Engines/RemoteAdmin/RemoteAdminLogging.cs | 4 +-- .../Engines/Reports/Objects/Staffing/Info.cs | 2 +- Scripts/Engines/Spawner/Spawner.cs | 8 ++--- .../Engines/VeteranRewards/RewardSystem.cs | 4 +-- Scripts/Gumps/AdminGump.cs | 2 +- .../Guilds/New Guild System/GuildInfoGump.cs | 2 +- Scripts/Gumps/PlayerVendorGumps.cs | 2 +- Scripts/Gumps/Props/PropsGump.cs | 30 +++++++++---------- .../Halloween/2012/Engines/PlayerZombies.cs | 2 +- Scripts/Items/Addons/BallotBox.cs | 2 +- .../Items/Construction/Signs/SubtextSign.cs | 4 +-- Scripts/Items/Misc/BankCheck.cs | 2 +- Scripts/Items/Misc/BulletinBoards.cs | 4 +-- .../Skill Items/Magical/Misc/RecallRune.cs | 12 ++++---- .../Special/House Raffle/HouseRaffleDeed.cs | 2 +- .../Special Scrolls/ScrollofAlacrity.cs | 2 +- .../Special/Special Scrolls/SpecialScroll.cs | 2 +- .../Veteran Rewards/WeaponEngravingTool.cs | 2 +- Scripts/Items/Talismans/BaseTalisman.cs | 2 +- Scripts/Items/Weapons/BaseWeapon.cs | 4 +-- Scripts/Misc/AttackMessage.cs | 4 +-- Scripts/Misc/CharacterCreation.cs | 6 ++-- Scripts/Misc/CrashGuard.cs | 2 +- Scripts/Misc/DataPath.cs | 6 ++-- .../Winter2004/LightOfTheWinterSolstice.cs | 2 +- Scripts/Misc/Guild.cs | 12 ++++---- Scripts/Misc/InhumanSpeech.cs | 18 +++++------ Scripts/Misc/NameList.cs | 2 +- Scripts/Misc/Profile.cs | 2 +- Scripts/Misc/ResourceInfo.cs | 2 +- Scripts/Misc/ShardPoller.cs | 4 +-- Scripts/Misc/TextDefinition.cs | 4 +-- Scripts/Misc/Titles.cs | 2 +- Scripts/Misc/WebStatus.cs | 4 +-- Scripts/Mobiles/BaseCreature.cs | 4 +-- .../Mobiles/Monsters/LBR/Jukas/JukaLord.cs | 2 +- Scripts/Mobiles/PlayerMobile.cs | 18 +++++------ Scripts/Mobiles/Townfolk/Banker.cs | 14 ++++----- Scripts/Mobiles/Townfolk/TownCrier.cs | 8 ++--- Scripts/Mobiles/Vendors/BaseVendor.cs | 6 ++-- Scripts/Mobiles/Vendors/PlayerVendor.cs | 4 +-- Scripts/Multis/Boats/BaseBoat.cs | 2 +- Scripts/Regions/BaseRegion.cs | 2 +- Scripts/Spells/Base/SpecialMove.cs | 2 +- Scripts/Spells/Base/SpellRegistry.cs | 6 ++-- Scripts/Spells/Fifth/MagicReflect.cs | 2 +- Scripts/Spells/Fourth/ArchProtection.cs | 4 +-- Server/ClientVersion.cs | 4 +-- Server/EventLog.cs | 6 ++-- Server/Item.cs | 2 +- Server/Items/Container.cs | 2 +- Server/Items/VirtualCheck.cs | 4 +-- Server/Main.cs | 4 +-- Server/Map.cs | 4 +-- Server/Network/NetState.cs | 2 +- Server/Network/PacketReader.cs | 6 ++-- Server/Network/PacketWriter.cs | 12 ++++---- Server/Network/Packets.cs | 4 +-- Server/ObjectPropertyList.cs | 16 +++++----- Server/Serialization.cs | 2 +- Server/Utility.cs | 4 +-- Server/World.cs | 4 +-- 98 files changed, 248 insertions(+), 248 deletions(-) diff --git a/Scripts/Accounting/AccountHandler.cs b/Scripts/Accounting/AccountHandler.cs index f8d65bfda..1f708f0cd 100644 --- a/Scripts/Accounting/AccountHandler.cs +++ b/Scripts/Accounting/AccountHandler.cs @@ -223,15 +223,15 @@ namespace Server.Misc return ( IPTable[ip] < MaxAccountsPerIP ); } - private static Dictionary m_IPTable; + private static Dictionary m_IPTable; - public static Dictionary IPTable + public static Dictionary IPTable { get { if ( m_IPTable == null ) { - m_IPTable = new Dictionary(); + m_IPTable = new Dictionary(); foreach ( Account a in Accounts.GetAccounts() ) if ( a.LoginIPs.Length > 0 ) diff --git a/Scripts/Commands/Add.cs b/Scripts/Commands/Add.cs index 74d4d2df9..974e0020f 100644 --- a/Scripts/Commands/Add.cs +++ b/Scripts/Commands/Add.cs @@ -686,10 +686,10 @@ namespace Server.Commands } private static Type[] m_SignedNumerics = { - typeof( Int64 ), - typeof( Int32 ), - typeof( Int16 ), - typeof( SByte ) + typeof( long ), + typeof( int ), + typeof( short ), + typeof( sbyte ) }; public static bool IsSignedNumeric( Type type ) @@ -702,10 +702,10 @@ namespace Server.Commands } private static Type[] m_UnsignedNumerics = { - typeof( UInt64 ), - typeof( UInt32 ), - typeof( UInt16 ), - typeof( Byte ) + typeof( ulong ), + typeof( uint ), + typeof( ushort ), + typeof( byte ) }; public static bool IsUnsignedNumeric( Type type ) diff --git a/Scripts/Commands/Docs.cs b/Scripts/Commands/Docs.cs index f8aff8047..cb07c809b 100644 --- a/Scripts/Commands/Docs.cs +++ b/Scripts/Commands/Docs.cs @@ -207,11 +207,11 @@ namespace Server.Commands } int index = 0; - string file = String.Concat( name, ext ); + string file = string.Concat( name, ext ); while( File.Exists( Path.Combine( root, file ) ) ) { - file = String.Concat( name, ++index, ext ); + file = string.Concat( name, ++index, ext ); } return file; @@ -370,7 +370,7 @@ namespace Server.Commands aliased = realType.Name; } - string retval = String.Concat( prepend, aliased, append, name ); + string retval = string.Concat( prepend, aliased, append, name ); //Console.WriteLine(">> getpair: "+retval); return retval; } @@ -1947,16 +1947,16 @@ namespace Server.Commands private const string HtmlNewLine = " "; private static object[,] m_Tooltips = { - { typeof( Byte ), "Numeric value in the range from 0 to 255, inclusive." }, - { typeof( SByte ), "Numeric value in the range from negative 128 to positive 127, inclusive." }, - { typeof( UInt16 ), "Numeric value in the range from 0 to 65,535, inclusive." }, - { typeof( Int16 ), "Numeric value in the range from negative 32,768 to positive 32,767, inclusive." }, - { typeof( UInt32 ), "Numeric value in the range from 0 to 4,294,967,295, inclusive." }, - { typeof( Int32 ), "Numeric value in the range from negative 2,147,483,648 to positive 2,147,483,647, inclusive." }, - { typeof( UInt64 ), "Numeric value in the range from 0 through about 10^20." }, - { typeof( Int64 ), "Numeric value in the approximate range from negative 10^19 through 10^19." }, - { typeof( String ), "Text value. To specify a value containing spaces, encapsulate the value in quote characters:{0}{0}"Spaced text example"" }, - { typeof( Boolean ), "Boolean value which can be either True or False." }, + { typeof( byte ), "Numeric value in the range from 0 to 255, inclusive." }, + { typeof( sbyte ), "Numeric value in the range from negative 128 to positive 127, inclusive." }, + { typeof( ushort ), "Numeric value in the range from 0 to 65,535, inclusive." }, + { typeof( short ), "Numeric value in the range from negative 32,768 to positive 32,767, inclusive." }, + { typeof( uint ), "Numeric value in the range from 0 to 4,294,967,295, inclusive." }, + { typeof( int ), "Numeric value in the range from negative 2,147,483,648 to positive 2,147,483,647, inclusive." }, + { typeof( ulong ), "Numeric value in the range from 0 through about 10^20." }, + { typeof( long ), "Numeric value in the approximate range from negative 10^19 through 10^19." }, + { typeof( string ), "Text value. To specify a value containing spaces, encapsulate the value in quote characters:{0}{0}"Spaced text example"" }, + { typeof( bool ), "Boolean value which can be either True or False." }, { typeof( Map ), "Map or facet name. Possible values include:{0}{0}- Felucca{0}- Trammel{0}- Ilshenar{0}- Malas" }, { typeof( Poison ), "Poison name or level. Possible values include:{0}{0}- Lesser{0}- Regular{0}- Greater{0}- Deadly{0}- Lethal" }, { typeof( Point3D ), "Three-dimensional coordinate value. Format as follows:{0}{0}"(, , )"" } @@ -1971,7 +1971,7 @@ namespace Server.Commands Type checkType = (Type)m_Tooltips[i, 0]; if ( paramType == checkType ) - return String.Format( (string)m_Tooltips[i, 1], HtmlNewLine ); + return string.Format( (string)m_Tooltips[i, 1], HtmlNewLine ); } if ( paramType.IsEnum ) @@ -2508,7 +2508,7 @@ namespace Server.Commands { // MONO: type.Namespace is null/empty for generic arguments - if ( type.Name == "T" || String.IsNullOrEmpty( type.Namespace ) || m_Namespaces == null ) + if ( type.Name == "T" || string.IsNullOrEmpty( type.Namespace ) || m_Namespaces == null ) return true; if ( type.Namespace.StartsWith( "Server" ) ) diff --git a/Scripts/Commands/GenCategorization.cs b/Scripts/Commands/GenCategorization.cs index 91567611f..736708c8a 100644 --- a/Scripts/Commands/GenCategorization.cs +++ b/Scripts/Commands/GenCategorization.cs @@ -387,7 +387,7 @@ namespace Server.Commands for ( index = 0; index < input.Length; ++index ) { - if ( Char.IsLetter( input, index ) ) + if ( char.IsLetter( input, index ) ) break; } diff --git a/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs b/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs index 2078c7006..df2cb1d56 100644 --- a/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs +++ b/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs @@ -268,7 +268,7 @@ namespace Server.Commands.Generic if ( m_IgnoreCase || methodName == "Equals" ) { - Type type = ( m_IgnoreCase ? typeof( Insensitive ) : typeof( String ) ); + Type type = ( m_IgnoreCase ? typeof( Insensitive ) : typeof( string ) ); emitter.BeginCall( type.GetMethod( diff --git a/Scripts/Commands/Logging.cs b/Scripts/Commands/Logging.cs index 7f0cc578e..dc916697c 100644 --- a/Scripts/Commands/Logging.cs +++ b/Scripts/Commands/Logging.cs @@ -64,7 +64,7 @@ namespace Server.Commands if ( !m_Enabled ) return; - WriteLine( from, String.Format( format, args ) ); + WriteLine( from, string.Format( format, args ) ); } public static void WriteLine( Mobile from, string text ) diff --git a/Scripts/Commands/Profiling.cs b/Scripts/Commands/Profiling.cs index d6efe209e..8e4b4602b 100644 --- a/Scripts/Commands/Profiling.cs +++ b/Scripts/Commands/Profiling.cs @@ -334,7 +334,7 @@ namespace Server.Commands { ArrayList types = new ArrayList(); - using ( BinaryReader bin = new BinaryReader( new FileStream( String.Format( "Saves/{0}/{0}.tdb", type ), FileMode.Open, FileAccess.Read, FileShare.Read ) ) ) + using ( BinaryReader bin = new BinaryReader( new FileStream( string.Format( "Saves/{0}/{0}.tdb", type ), FileMode.Open, FileAccess.Read, FileShare.Read ) ) ) { int count = bin.ReadInt32(); @@ -346,7 +346,7 @@ namespace Server.Commands Hashtable table = new Hashtable(); - using ( BinaryReader bin = new BinaryReader( new FileStream( String.Format( "Saves/{0}/{0}.idx", type ), FileMode.Open, FileAccess.Read, FileShare.Read ) ) ) + using ( BinaryReader bin = new BinaryReader( new FileStream( string.Format( "Saves/{0}/{0}.idx", type ), FileMode.Open, FileAccess.Read, FileShare.Read ) ) ) { int count = bin.ReadInt32(); diff --git a/Scripts/Commands/Properties.cs b/Scripts/Commands/Properties.cs index 3c4b6b652..3b403e064 100644 --- a/Scripts/Commands/Properties.cs +++ b/Scripts/Commands/Properties.cs @@ -309,9 +309,9 @@ namespace Server.Commands if ( value == null ) toString = "null"; else if ( IsNumeric( type ) ) - toString = String.Format( "{0} (0x{0:X})", value ); + toString = string.Format( "{0} (0x{0:X})", value ); else if ( IsChar( type ) ) - toString = String.Format( "'{0}' ({1} [0x{1:X}])", value, (int) value ); + toString = string.Format( "'{0}' ({1} [0x{1:X}])", value, (int) value ); else if ( IsString( type ) ) toString = ( (string) value == "null" ? @"@""null""" : $"\"{value}\""); else if ( IsText( type ) ) @@ -332,7 +332,7 @@ namespace Server.Commands concat[concat.Length-1] = toString; - return String.Concat( concat ); + return string.Concat( concat ); } public static string SetValue( Mobile from, object o, string name, string value ) @@ -362,14 +362,14 @@ namespace Server.Commands return ( t == typeofType ); } - private static Type typeofChar = typeof( Char ); + private static Type typeofChar = typeof( char ); private static bool IsChar( Type t ) { return ( t == typeofChar ); } - private static Type typeofString = typeof( String ); + private static Type typeofString = typeof( string ); private static bool IsString( Type t ) { @@ -409,10 +409,10 @@ namespace Server.Commands } private static Type[] m_NumericTypes = { - typeof( Byte ), typeof( SByte ), - typeof( Int16 ), typeof( UInt16 ), - typeof( Int32 ), typeof( UInt32 ), - typeof( Int64 ), typeof( UInt64 ) + typeof( byte ), typeof( sbyte ), + typeof( short ), typeof( ushort ), + typeof( int ), typeof( uint ), + typeof( long ), typeof( ulong ) }; private static bool IsNumeric( Type t ) @@ -495,7 +495,7 @@ namespace Server.Commands } if ( isSerial ) // mutate back - toSet = (Serial)((Int32)toSet); + toSet = (Serial)((int)toSet); constructed = toSet; return null; @@ -598,7 +598,7 @@ namespace Server public sealed class NotYetBoundException : BindingException { public NotYetBoundException( Property property ) - : base( property, String.Format( "Property has not yet been bound." ) ) + : base( property, string.Format( "Property has not yet been bound." ) ) { } } @@ -606,7 +606,7 @@ namespace Server public sealed class AlreadyBoundException : BindingException { public AlreadyBoundException( Property property ) - : base( property, String.Format( "Property has already been bound." ) ) + : base( property, string.Format( "Property has already been bound." ) ) { } } diff --git a/Scripts/Commands/Statics.cs b/Scripts/Commands/Statics.cs index 9414a9e9b..a34e24901 100644 --- a/Scripts/Commands/Statics.cs +++ b/Scripts/Commands/Statics.cs @@ -49,7 +49,7 @@ namespace Server public static void SendWarning( Mobile m, string header, string baseWarning, Map map, Point3D start, Point3D end, WarningGumpCallback callback ) { - m.SendGump( new WarningGump( 1060635, 30720, String.Format( baseWarning, String.Format( header, map ) ), 0xFFC000, 420, 400, callback, new StateInfo( map, start, end ) ) ); + m.SendGump( new WarningGump( 1060635, 30720, string.Format( baseWarning, string.Format( header, map ) ), 0xFFC000, 420, 400, callback, new StateInfo( map, start, end ) ) ); } private const string BaseFreezeWarning = "{0} " + diff --git a/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs b/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs index 6fcef484c..2c414a580 100644 --- a/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs +++ b/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs @@ -262,7 +262,7 @@ namespace Server.Engines.BulkOrders LabelTo(from, 1062344, m_Entries.Count.ToString()); // Deeds in book: ~1_val~ - if (!String.IsNullOrEmpty(m_BookName)) + if (!string.IsNullOrEmpty(m_BookName)) LabelTo(from, 1062481, m_BookName); } diff --git a/Scripts/Engines/Chat/Channel.cs b/Scripts/Engines/Chat/Channel.cs index fb8ff43e5..c0bea6fa0 100644 --- a/Scripts/Engines/Chat/Channel.cs +++ b/Scripts/Engines/Chat/Channel.cs @@ -49,7 +49,7 @@ namespace Server.Engines.Chat { newValue = value.Trim(); - if ( String.IsNullOrEmpty( newValue ) ) + if ( string.IsNullOrEmpty( newValue ) ) newValue = null; } diff --git a/Scripts/Engines/Chat/Packets.cs b/Scripts/Engines/Chat/Packets.cs index 16ad0ce36..810708b90 100644 --- a/Scripts/Engines/Chat/Packets.cs +++ b/Scripts/Engines/Chat/Packets.cs @@ -8,10 +8,10 @@ namespace Server.Engines.Chat public ChatMessagePacket( Mobile who, int number, string param1, string param2 ) : base( 0xB2 ) { if ( param1 == null ) - param1 = String.Empty; + param1 = string.Empty; if ( param2 == null ) - param2 = String.Empty; + param2 = string.Empty; EnsureCapacity( 13 + ((param1.Length + param2.Length) * 2) ); diff --git a/Scripts/Engines/ConPVP/AcceptDuelGump.cs b/Scripts/Engines/ConPVP/AcceptDuelGump.cs index 36f456e01..312a990b6 100644 --- a/Scripts/Engines/ConPVP/AcceptDuelGump.cs +++ b/Scripts/Engines/ConPVP/AcceptDuelGump.cs @@ -65,11 +65,11 @@ namespace Server.Engines.ConPVP else fmt = "You have been challenged to a duel from {0}. Do you accept?"; - AddHtml( 22-1, 50, 294, 40, Color( String.Format( fmt, challenger.Name ), BlackColor32 ), false, false ); - AddHtml( 22+1, 50, 294, 40, Color( String.Format( fmt, challenger.Name ), BlackColor32 ), false, false ); - AddHtml( 22, 50-1, 294, 40, Color( String.Format( fmt, challenger.Name ), BlackColor32 ), false, false ); - AddHtml( 22, 50+1, 294, 40, Color( String.Format( fmt, challenger.Name ), BlackColor32 ), false, false ); - AddHtml( 22, 50, 294, 40, Color( String.Format( fmt, challenger.Name ), 0xB0C868 ), false, false ); + AddHtml( 22-1, 50, 294, 40, Color( string.Format( fmt, challenger.Name ), BlackColor32 ), false, false ); + AddHtml( 22+1, 50, 294, 40, Color( string.Format( fmt, challenger.Name ), BlackColor32 ), false, false ); + AddHtml( 22, 50-1, 294, 40, Color( string.Format( fmt, challenger.Name ), BlackColor32 ), false, false ); + AddHtml( 22, 50+1, 294, 40, Color( string.Format( fmt, challenger.Name ), BlackColor32 ), false, false ); + AddHtml( 22, 50, 294, 40, Color( string.Format( fmt, challenger.Name ), 0xB0C868 ), false, false ); AddImageTiled( 32, 88, 264, 1, 9107 ); AddImageTiled( 42, 90, 264, 1, 9157 ); diff --git a/Scripts/Engines/ConPVP/DuelContext.cs b/Scripts/Engines/ConPVP/DuelContext.cs index 0818437ca..5f01cf80d 100644 --- a/Scripts/Engines/ConPVP/DuelContext.cs +++ b/Scripts/Engines/ConPVP/DuelContext.cs @@ -1180,7 +1180,7 @@ namespace Server.Engines.ConPVP string text = $"{{0}} are ranked {LadderGump.Rank(entry.Index + 1)} at level {Ladder.GetLevel(entry.Experience)}."; - pm.PrivateOverheadMessage( MessageType.Regular, pm.SpeechHue, true, String.Format( text, from==pm?"You":"They" ), from.NetState ); + pm.PrivateOverheadMessage( MessageType.Regular, pm.SpeechHue, true, string.Format( text, from==pm?"You":"They" ), from.NetState ); } else if ( obj is Mobile mob ) { @@ -1272,8 +1272,8 @@ namespace Server.Engines.ConPVP string text = $"{{0}} {{1}} ranked {LadderGump.Rank(entry.Index + 1)} at level {Ladder.GetLevel(entry.Experience)}."; - pm.LocalOverheadMessage( MessageType.Regular, pm.SpeechHue, true, String.Format( text, "You", "are" ) ); - pm.NonlocalOverheadMessage( MessageType.Regular, pm.SpeechHue, true, String.Format( text, pm.Name, "is" ) ); + pm.LocalOverheadMessage( MessageType.Regular, pm.SpeechHue, true, string.Format( text, "You", "are" ) ); + pm.NonlocalOverheadMessage( MessageType.Regular, pm.SpeechHue, true, string.Format( text, pm.Name, "is" ) ); //pm.PublicOverheadMessage( MessageType.Regular, pm.SpeechHue, true, String.Format( "Level {0} with {1} win{2} and {3} loss{4}.", Ladder.GetLevel( entry.Experience ), entry.Wins, entry.Wins==1?"":"s", entry.Losses, entry.Losses==1?"":"es" ) ); //pm.PublicOverheadMessage( MessageType.Regular, pm.SpeechHue, true, String.Format( "Level {0} with {1} win{2} and {3} loss{4}.", Ladder.GetLevel( entry.Experience ), entry.Wins, entry.Wins==1?"":"s", entry.Losses, entry.Losses==1?"":"es" ) ); diff --git a/Scripts/Engines/ConPVP/DuelContextGump.cs b/Scripts/Engines/ConPVP/DuelContextGump.cs index 8dceb9840..cdc747a4b 100644 --- a/Scripts/Engines/ConPVP/DuelContextGump.cs +++ b/Scripts/Engines/ConPVP/DuelContextGump.cs @@ -65,7 +65,7 @@ namespace Server.Engines.ConPVP { Participant p = (Participant)context.Participants[i]; - AddGoldenButtonLabeled( x, y, 4 + i, String.Format( p.Count == 1 ? "Player {0}: {3}" : "Team {0}: {1}/{2}: {3}", 1 + i, p.FilledSlots, p.Count, p.NameList ) ); y += 22; + AddGoldenButtonLabeled( x, y, 4 + i, string.Format( p.Count == 1 ? "Player {0}: {3}" : "Team {0}: {1}/{2}: {3}", 1 + i, p.FilledSlots, p.Count, p.NameList ) ); y += 22; } } diff --git a/Scripts/Engines/ConPVP/Games/BombingRun.cs b/Scripts/Engines/ConPVP/Games/BombingRun.cs index a5517a35c..97dbe34f4 100644 --- a/Scripts/Engines/ConPVP/Games/BombingRun.cs +++ b/Scripts/Engines/ConPVP/Games/BombingRun.cs @@ -1581,7 +1581,7 @@ namespace Server.Engines.ConPVP public void Alert( string format, params object[] args ) { - Alert( String.Format( format, args ) ); + Alert( string.Format( format, args ) ); } public BRGame( BRController controller, DuelContext context ) : base( context ) diff --git a/Scripts/Engines/ConPVP/Games/CTF.cs b/Scripts/Engines/ConPVP/Games/CTF.cs index 7c0222ff8..a144a041e 100644 --- a/Scripts/Engines/ConPVP/Games/CTF.cs +++ b/Scripts/Engines/ConPVP/Games/CTF.cs @@ -925,7 +925,7 @@ namespace Server.Engines.ConPVP public void Alert( string format, params object[] args ) { - Alert( String.Format( format, args ) ); + Alert( string.Format( format, args ) ); } public CTFGame( CTFController controller, DuelContext context ) : base( context ) diff --git a/Scripts/Engines/ConPVP/Games/DoubleDom.cs b/Scripts/Engines/ConPVP/Games/DoubleDom.cs index c43d194b9..8046a359d 100644 --- a/Scripts/Engines/ConPVP/Games/DoubleDom.cs +++ b/Scripts/Engines/ConPVP/Games/DoubleDom.cs @@ -559,7 +559,7 @@ namespace Server.Engines.ConPVP public void Alert( string format, params object[] args ) { - Alert( String.Format( format, args ) ); + Alert( string.Format( format, args ) ); } public DDGame( DDController controller, DuelContext context ) : base( context ) diff --git a/Scripts/Engines/ConPVP/Games/KingOfTheHill.cs b/Scripts/Engines/ConPVP/Games/KingOfTheHill.cs index b6e1aa086..a74efcb89 100644 --- a/Scripts/Engines/ConPVP/Games/KingOfTheHill.cs +++ b/Scripts/Engines/ConPVP/Games/KingOfTheHill.cs @@ -947,7 +947,7 @@ namespace Server.Engines.ConPVP public void Alert(string format, params object[] args) { - Alert(String.Format(format, args)); + Alert(string.Format(format, args)); } public KHGame(KHController controller, DuelContext context) diff --git a/Scripts/Engines/ConPVP/LadderGump.cs b/Scripts/Engines/ConPVP/LadderGump.cs index fb99dab64..82d4b1062 100644 --- a/Scripts/Engines/ConPVP/LadderGump.cs +++ b/Scripts/Engines/ConPVP/LadderGump.cs @@ -149,7 +149,7 @@ namespace Server.Engines.ConPVP else AddImage( 466, height-12-2-16, 0x2622 ); - AddHtml( 16, height-12-2-18, 400, 20, Color( String.Format( "Top {3} of {0:N0} duelists, page {1} of {2}", list.Count, page+1, (lc+14)/15, lc ), 0xFFC000 ), false, false ); + AddHtml( 16, height-12-2-18, 400, 20, Color( string.Format( "Top {3} of {0:N0} duelists, page {1} of {2}", list.Count, page+1, (lc+14)/15, lc ), 0xFFC000 ), false, false ); AddColumnHeader( 75, "Rank" ); AddColumnHeader( 115, "Level" ); diff --git a/Scripts/Engines/ConPVP/Participant.cs b/Scripts/Engines/ConPVP/Participant.cs index 0961bdf3b..e149f4cf6 100644 --- a/Scripts/Engines/ConPVP/Participant.cs +++ b/Scripts/Engines/ConPVP/Participant.cs @@ -51,7 +51,7 @@ namespace Server.Engines.ConPVP m_Players[i].Mobile.SendMessage( hue, message ); if ( nonLocalOverhead != null ) - m_Players[i].Mobile.NonlocalOverheadMessage( Network.MessageType.Regular, hue, false, String.Format( nonLocalOverhead, m_Players[i].Mobile.Name, m_Players[i].Mobile.Female ? "her" : "his" ) ); + m_Players[i].Mobile.NonlocalOverheadMessage( Network.MessageType.Regular, hue, false, string.Format( nonLocalOverhead, m_Players[i].Mobile.Name, m_Players[i].Mobile.Female ? "her" : "his" ) ); if ( localOverhead != null ) m_Players[i].Mobile.LocalOverheadMessage( Network.MessageType.Regular, hue, false, localOverhead ); diff --git a/Scripts/Engines/ConPVP/Tournament.cs b/Scripts/Engines/ConPVP/Tournament.cs index f73c1516d..05df0edc9 100644 --- a/Scripts/Engines/ConPVP/Tournament.cs +++ b/Scripts/Engines/ConPVP/Tournament.cs @@ -716,7 +716,7 @@ namespace Server.Engines.ConPVP timeUntil = $"in {minutesUntil} minute{(minutesUntil == 1 ? "" : "s")}"; m_Registrar.PrivateOverheadMessage( MessageType.Regular, - 0x35, false, String.Format( fmt, from.Female ? "Lady" : "Lord", timeUntil ), from.NetState ); + 0x35, false, string.Format( fmt, from.Female ? "Lady" : "Lord", timeUntil ), from.NetState ); } TournyParticipant part = new TournyParticipant( from ); @@ -2687,7 +2687,7 @@ namespace Server.Engines.ConPVP public void AddLog( string format, params object[] args ) { - AddLog( String.Format( format, args ) ); + AddLog( string.Format( format, args ) ); } public void WonMatch( TournyMatch match ) diff --git a/Scripts/Engines/Craft/Core/CraftItem.cs b/Scripts/Engines/Craft/Core/CraftItem.cs index c963ca001..bd8d16858 100644 --- a/Scripts/Engines/Craft/Core/CraftItem.cs +++ b/Scripts/Engines/Craft/Core/CraftItem.cs @@ -663,7 +663,7 @@ namespace Server.Engines.Craft if ( res.MessageNumber > 0 ) message = res.MessageNumber; - else if ( !String.IsNullOrEmpty( res.MessageString ) ) + else if ( !string.IsNullOrEmpty( res.MessageString ) ) message = res.MessageString; else message = 502925; // You don't have the resources required to make that item. @@ -791,7 +791,7 @@ namespace Server.Engines.Craft if ( res.MessageNumber > 0 ) message = res.MessageNumber; - else if ( res.MessageString != null && res.MessageString != String.Empty ) + else if ( res.MessageString != null && res.MessageString != string.Empty ) message = res.MessageString; else message = 502925; // You don't have the resources required to make that item. diff --git a/Scripts/Engines/Craft/Core/CraftRes.cs b/Scripts/Engines/Craft/Core/CraftRes.cs index 4b3e2a6ae..28c6d195e 100644 --- a/Scripts/Engines/Craft/Core/CraftRes.cs +++ b/Scripts/Engines/Craft/Core/CraftRes.cs @@ -32,7 +32,7 @@ namespace Server.Engines.Craft { if ( m_MessageNumber > 0 ) from.SendLocalizedMessage( m_MessageNumber ); - else if ( !String.IsNullOrEmpty( m_MessageString ) ) + else if ( !string.IsNullOrEmpty( m_MessageString ) ) from.SendMessage( m_MessageString ); else from.SendLocalizedMessage( 502925 ); // You don't have the resources required to make that item. diff --git a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs index fd2d0d8c9..f2c6b83c5 100644 --- a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs +++ b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs @@ -17,8 +17,8 @@ namespace Server.Engines.Doom private bool m_Enabled; private static bool installed; - private UInt16 m_MyKey; - private UInt16 m_TheirKey; + private ushort m_MyKey; + private ushort m_TheirKey; private List m_Levers; private List m_Teles; @@ -58,12 +58,12 @@ namespace Server.Engines.Doom } [CommandProperty( AccessLevel.GameMaster )] - public UInt16 MyKey { get => m_MyKey; + public ushort MyKey { get => m_MyKey; set => m_MyKey = value; } [CommandProperty( AccessLevel.GameMaster )] - public UInt16 TheirKey { get => m_TheirKey; + public ushort TheirKey { get => m_TheirKey; set => m_TheirKey = value; } @@ -262,7 +262,7 @@ namespace Server.Engines.Doom m_Successful=null; } - public virtual void LeverPulled( UInt16 code ) + public virtual void LeverPulled( ushort code ) { int Correct=0; Mobile m_Player; @@ -326,7 +326,7 @@ namespace Server.Engines.Doom public virtual void GenKey() /* Shuffle & build key */ { - UInt16 tmp; int n, i; ushort[] CA = { 1,2,4,8 }; + ushort tmp; int n, i; ushort[] CA = { 1,2,4,8 }; for (i=0; i<4; i++) { n=(((n = Utility.Random(0,3))==i) ? n&~i : n ); /* if (i==n) { return pointless; } */ diff --git a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs index 7f54410ed..e8b3d158e 100644 --- a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs +++ b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs @@ -95,13 +95,13 @@ namespace Server.Engines.Doom public class LeverPuzzleLever : Item { - private UInt16 m_Code; + private ushort m_Code; private LeverPuzzleController m_Controller; [CommandProperty( AccessLevel.GameMaster )] - public UInt16 Code => m_Code; + public ushort Code => m_Code; - public LeverPuzzleLever( UInt16 code, LeverPuzzleController controller ) : base( 0x108E ) + public LeverPuzzleLever( ushort code, LeverPuzzleController controller ) : base( 0x108E ) { m_Controller=controller; m_Code = code; diff --git a/Scripts/Engines/Ethics/Evil/Mobiles/UnholyFamiliar.cs b/Scripts/Engines/Ethics/Evil/Mobiles/UnholyFamiliar.cs index 26187b604..a01c41641 100644 --- a/Scripts/Engines/Ethics/Evil/Mobiles/UnholyFamiliar.cs +++ b/Scripts/Engines/Ethics/Evil/Mobiles/UnholyFamiliar.cs @@ -62,7 +62,7 @@ namespace Server.Mobiles if ( suffix.Length == 0 ) suffix = Ethic.Evil.Definition.Adjunct.String; else - suffix = String.Concat( suffix, " ", Ethic.Evil.Definition.Adjunct.String ); + suffix = string.Concat( suffix, " ", Ethic.Evil.Definition.Adjunct.String ); return base.ApplyNameSuffix( suffix ); } diff --git a/Scripts/Engines/Ethics/Evil/Mobiles/UnholySteed.cs b/Scripts/Engines/Ethics/Evil/Mobiles/UnholySteed.cs index b2f93c119..543848412 100644 --- a/Scripts/Engines/Ethics/Evil/Mobiles/UnholySteed.cs +++ b/Scripts/Engines/Ethics/Evil/Mobiles/UnholySteed.cs @@ -59,7 +59,7 @@ namespace Server.Mobiles if ( suffix.Length == 0 ) suffix = Ethic.Evil.Definition.Adjunct.String; else - suffix = String.Concat( suffix, " ", Ethic.Evil.Definition.Adjunct.String ); + suffix = string.Concat( suffix, " ", Ethic.Evil.Definition.Adjunct.String ); return base.ApplyNameSuffix( suffix ); } diff --git a/Scripts/Engines/Ethics/Hero/Mobiles/HolyFamiliar.cs b/Scripts/Engines/Ethics/Hero/Mobiles/HolyFamiliar.cs index 5a878aca1..c90c69956 100644 --- a/Scripts/Engines/Ethics/Hero/Mobiles/HolyFamiliar.cs +++ b/Scripts/Engines/Ethics/Hero/Mobiles/HolyFamiliar.cs @@ -63,7 +63,7 @@ namespace Server.Mobiles if ( suffix.Length == 0 ) suffix = Ethic.Hero.Definition.Adjunct.String; else - suffix = String.Concat( suffix, " ", Ethic.Hero.Definition.Adjunct.String ); + suffix = string.Concat( suffix, " ", Ethic.Hero.Definition.Adjunct.String ); return base.ApplyNameSuffix( suffix ); } diff --git a/Scripts/Engines/Ethics/Hero/Mobiles/HolySteed.cs b/Scripts/Engines/Ethics/Hero/Mobiles/HolySteed.cs index dae647f26..235140c2b 100644 --- a/Scripts/Engines/Ethics/Hero/Mobiles/HolySteed.cs +++ b/Scripts/Engines/Ethics/Hero/Mobiles/HolySteed.cs @@ -59,7 +59,7 @@ namespace Server.Mobiles if ( suffix.Length == 0 ) suffix = Ethic.Hero.Definition.Adjunct.String; else - suffix = String.Concat( suffix, " ", Ethic.Hero.Definition.Adjunct.String ); + suffix = string.Concat( suffix, " ", Ethic.Hero.Definition.Adjunct.String ); return base.ApplyNameSuffix( suffix ); } diff --git a/Scripts/Engines/Factions/Core/Faction.cs b/Scripts/Engines/Factions/Core/Faction.cs index 56ae5f03b..35e092fa3 100644 --- a/Scripts/Engines/Factions/Core/Faction.cs +++ b/Scripts/Engines/Factions/Core/Faction.cs @@ -100,12 +100,12 @@ namespace Server.Factions public void Broadcast( string format, params object[] args ) { - Broadcast( String.Format( format, args ) ); + Broadcast( string.Format( format, args ) ); } public void Broadcast( int hue, string format, params object[] args ) { - Broadcast( hue, String.Format( format, args ) ); + Broadcast( hue, string.Format( format, args ) ); } public void BeginBroadcast( Mobile from ) diff --git a/Scripts/Engines/Factions/Gumps/FinanceGump.cs b/Scripts/Engines/Factions/Gumps/FinanceGump.cs index ac1f98db2..7088c83c4 100644 --- a/Scripts/Engines/Factions/Gumps/FinanceGump.cs +++ b/Scripts/Engines/Factions/Gumps/FinanceGump.cs @@ -66,9 +66,9 @@ namespace Server.Factions AddRadio( x, y, 208, 209, ( town.Tax == ofs ), i+1 ); if ( ofs < 0 ) - AddLabel( x + 35, y, 0x26, String.Concat( "- ", -ofs, "%" ) ); + AddLabel( x + 35, y, 0x26, string.Concat( "- ", -ofs, "%" ) ); else - AddLabel( x + 35, y, 0x12A, String.Concat( "+ ", ofs, "%" ) ); + AddLabel( x + 35, y, 0x12A, string.Concat( "+ ", ofs, "%" ) ); } AddRadio( 20, 270, 208, 209, ( town.Tax == 0 ), 0 ); diff --git a/Scripts/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs b/Scripts/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs index 94e3052d5..8ac931afc 100644 --- a/Scripts/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs +++ b/Scripts/Engines/Factions/Mobiles/Guards/BaseFactionGuard.cs @@ -252,7 +252,7 @@ namespace Server.Factions { if ( m_Faction != null && Map == Faction.Facet ) { - string text = String.Concat( "(Guard, ", m_Faction.Definition.FriendlyName, ")" ); + string text = string.Concat( "(Guard, ", m_Faction.Definition.FriendlyName, ")" ); int hue = ( Faction.Find( from ) == m_Faction ? 98 : 38 ); diff --git a/Scripts/Engines/MLQuests/MLQuestEntry.cs b/Scripts/Engines/MLQuests/MLQuestEntry.cs index 0ba2e1221..93030b380 100644 --- a/Scripts/Engines/MLQuests/MLQuestEntry.cs +++ b/Scripts/Engines/MLQuests/MLQuestEntry.cs @@ -372,10 +372,10 @@ namespace Server.Engines.MLQuests foreach ( Item rewardItem in rewards ) { - string rewardName = ( rewardItem.Name != null ) ? rewardItem.Name : String.Concat( "#", rewardItem.LabelNumber ); + string rewardName = ( rewardItem.Name != null ) ? rewardItem.Name : string.Concat( "#", rewardItem.LabelNumber ); if ( rewardItem.Stackable ) - m_Player.SendLocalizedMessage( 1115917, String.Concat( rewardItem.Amount, "\t", rewardName ) ); // You receive a reward: ~1_QUANTITY~ ~2_ITEM~ + m_Player.SendLocalizedMessage( 1115917, string.Concat( rewardItem.Amount, "\t", rewardName ) ); // You receive a reward: ~1_QUANTITY~ ~2_ITEM~ else m_Player.SendLocalizedMessage( 1074360, rewardName ); // You receive a reward: ~1_REWARD~ } diff --git a/Scripts/Engines/MyRunUO/MyRunUO.cs b/Scripts/Engines/MyRunUO/MyRunUO.cs index 4b3177b1c..7d173097b 100644 --- a/Scripts/Engines/MyRunUO/MyRunUO.cs +++ b/Scripts/Engines/MyRunUO/MyRunUO.cs @@ -293,7 +293,7 @@ namespace Server.Engines.MyRunUO public void ExecuteNonQuery( string format, params string[] args ) { - ExecuteNonQuery( String.Format( format, args ) ); + ExecuteNonQuery( string.Format( format, args ) ); } public void ExecuteNonQueryIfNull( string select, string insert ) @@ -638,7 +638,7 @@ namespace Server.Engines.MyRunUO string theirId = them.Id.ToString(); ExecuteNonQueryIfNull( - String.Format( "SELECT guild_1 FROM myrunuo_guilds_wars WHERE (guild_1={0} AND guild_2={1}) OR (guild_1={1} AND guild_2={0})", ourId, theirId ), + string.Format( "SELECT guild_1 FROM myrunuo_guilds_wars WHERE (guild_1={0} AND guild_2={1}) OR (guild_1={1} AND guild_2={0})", ourId, theirId ), $"INSERT INTO myrunuo_guilds_wars (guild_1, guild_2) VALUES ({ourId}, {theirId})"); } } diff --git a/Scripts/Engines/Party/Party.cs b/Scripts/Engines/Party/Party.cs index e314fa830..553706da5 100644 --- a/Scripts/Engines/Party/Party.cs +++ b/Scripts/Engines/Party/Party.cs @@ -379,7 +379,7 @@ namespace Server.Engines.PartySystem } private void SendToStaffMessage( Mobile from, string format, params object[] args ) { - SendToStaffMessage( from, String.Format( format, args ) ); + SendToStaffMessage( from, string.Format( format, args ) ); } public void SendToAll( Packet p ) diff --git a/Scripts/Engines/RemoteAdmin/RemoteAdminLogging.cs b/Scripts/Engines/RemoteAdmin/RemoteAdminLogging.cs index 6934d98d3..9812cbf82 100644 --- a/Scripts/Engines/RemoteAdmin/RemoteAdminLogging.cs +++ b/Scripts/Engines/RemoteAdmin/RemoteAdminLogging.cs @@ -35,7 +35,7 @@ namespace Server.RemoteAdmin try { - m_Output = new StreamWriter( Path.Combine( directory, String.Format( LogSubDirectory + "{0}.log", DateTime.UtcNow.ToString( "yyyyMMdd" ) ) ), true ); + m_Output = new StreamWriter( Path.Combine( directory, string.Format( LogSubDirectory + "{0}.log", DateTime.UtcNow.ToString( "yyyyMMdd" ) ) ), true ); m_Output.AutoFlush = true; @@ -66,7 +66,7 @@ namespace Server.RemoteAdmin for ( int i = 0; i < args.Length; i++ ) args[i] = Commands.CommandLogging.Format( args[i] ); - WriteLine( state, String.Format( format, args ) ); + WriteLine( state, string.Format( format, args ) ); } public static void WriteLine( NetState state, string text ) diff --git a/Scripts/Engines/Reports/Objects/Staffing/Info.cs b/Scripts/Engines/Reports/Objects/Staffing/Info.cs index f2b3db3b8..f8d917c0d 100644 --- a/Scripts/Engines/Reports/Objects/Staffing/Info.cs +++ b/Scripts/Engines/Reports/Objects/Staffing/Info.cs @@ -83,7 +83,7 @@ namespace Server.Engines.Reports - GetPageCount( this is StaffInfo ? PageResolution.Handled : PageResolution.None, DateTime.UtcNow - m_SortRange, DateTime.UtcNow ); if ( v == 0 ) - v = String.Compare( Display, cmp.Display ); + v = string.Compare( Display, cmp.Display ); return v; } diff --git a/Scripts/Engines/Spawner/Spawner.cs b/Scripts/Engines/Spawner/Spawner.cs index d772fed67..90aa95a73 100644 --- a/Scripts/Engines/Spawner/Spawner.cs +++ b/Scripts/Engines/Spawner/Spawner.cs @@ -436,7 +436,7 @@ namespace Server.Mobiles string[] paramargs; string[] propargs; - if ( String.IsNullOrEmpty( entry.Properties ) ) + if ( string.IsNullOrEmpty( entry.Properties ) ) propargs = new string[0]; else propargs = CommandSystem.Split( entry.Properties.Trim() ); @@ -451,7 +451,7 @@ namespace Server.Mobiles return false; } - if ( String.IsNullOrEmpty( entry.Parameters ) ) + if ( string.IsNullOrEmpty( entry.Parameters ) ) paramargs = new string[0]; else paramargs = entry.Parameters.Trim().Split( ' ' ); @@ -872,7 +872,7 @@ namespace Server.Mobiles for ( int i = 0; i < size; ++i ) if ( addentries ) - m_Entries.Add( new SpawnerEntry( String.Empty, 100, reader.ReadInt() ) ); + m_Entries.Add( new SpawnerEntry( string.Empty, 100, reader.ReadInt() ) ); else m_Entries[i].SpawnedMaxCount = reader.ReadInt(); @@ -886,7 +886,7 @@ namespace Server.Mobiles for ( int i = 0; i < size; ++i ) if ( addentries ) - m_Entries.Add( new SpawnerEntry( String.Empty, reader.ReadInt(), 1 ) ); + m_Entries.Add( new SpawnerEntry( string.Empty, reader.ReadInt(), 1 ) ); else m_Entries[i].SpawnedProbability = reader.ReadInt(); diff --git a/Scripts/Engines/VeteranRewards/RewardSystem.cs b/Scripts/Engines/VeteranRewards/RewardSystem.cs index 273318a03..8e4649f78 100644 --- a/Scripts/Engines/VeteranRewards/RewardSystem.cs +++ b/Scripts/Engines/VeteranRewards/RewardSystem.cs @@ -119,7 +119,7 @@ namespace Server.Engines.VeteranRewards { TimeSpan totalTime = (DateTime.UtcNow - acct.Created); - Double level = (totalTime.TotalDays / RewardInterval.TotalDays); + double level = (totalTime.TotalDays / RewardInterval.TotalDays); return level >= 0.5; } @@ -163,7 +163,7 @@ namespace Server.Engines.VeteranRewards string tag = acct.GetTag( "numRewardsChosen" ); - if ( String.IsNullOrEmpty( tag ) ) + if ( string.IsNullOrEmpty( tag ) ) cur = 0; else cur = Utility.ToInt32( tag ); diff --git a/Scripts/Gumps/AdminGump.cs b/Scripts/Gumps/AdminGump.cs index c5784937d..3fcf924a3 100644 --- a/Scripts/Gumps/AdminGump.cs +++ b/Scripts/Gumps/AdminGump.cs @@ -2323,7 +2323,7 @@ namespace Server.Gumps break; if ( rads.Count > 0 ) - from.SendGump( new WarningGump( 1060635, 30720, String.Format( "You are about to permanently delete {0} marked account{1}. Likewise, all characters on the account{1} will be deleted, including equipped, inventory, and banked items. Any houses tied to the account{1} will be demolished.

Do you wish to continue?", rads.Count, rads.Count == 1 ? "" : "s" ), 0xFFC000, 420, 280, new WarningGumpCallback( Marked_Callback ), new object[]{ false, list, rads, m_ListPage } ) ); + from.SendGump( new WarningGump( 1060635, 30720, string.Format( "You are about to permanently delete {0} marked account{1}. Likewise, all characters on the account{1} will be deleted, including equipped, inventory, and banked items. Any houses tied to the account{1} will be demolished.

Do you wish to continue?", rads.Count, rads.Count == 1 ? "" : "s" ), 0xFFC000, 420, 280, new WarningGumpCallback( Marked_Callback ), new object[]{ false, list, rads, m_ListPage } ) ); else from.SendGump( new NoticeGump( 1060637, 30720, "You have not yet marked any accounts. Place a check mark next to the accounts you wish to ban and then try again.", 0xFFC000, 420, 280, new NoticeGumpCallback( ResendGump_Callback ), new object[]{ list, rads, m_ListPage } ) ); diff --git a/Scripts/Gumps/Guilds/New Guild System/GuildInfoGump.cs b/Scripts/Gumps/Guilds/New Guild System/GuildInfoGump.cs index 543ba6475..46d4ed2a7 100644 --- a/Scripts/Gumps/Guilds/New Guild System/GuildInfoGump.cs +++ b/Scripts/Gumps/Guilds/New Guild System/GuildInfoGump.cs @@ -60,7 +60,7 @@ namespace Server.Guilds string s = guild.Charter; - if ( String.IsNullOrEmpty( s ) ) + if ( string.IsNullOrEmpty( s ) ) s = "The guild leader has not yet set the guild charter."; AddHtml( 65, 216, 480, 80, s, true, true ); diff --git a/Scripts/Gumps/PlayerVendorGumps.cs b/Scripts/Gumps/PlayerVendorGumps.cs index c09d03715..0afe255d9 100644 --- a/Scripts/Gumps/PlayerVendorGumps.cs +++ b/Scripts/Gumps/PlayerVendorGumps.cs @@ -22,7 +22,7 @@ namespace Server.Gumps AddHtmlLocalized( 125, 20, 250, 24, 1019070, false, false ); // You have agreed to purchase: - if ( !String.IsNullOrEmpty( vi.Description ) ) + if ( !string.IsNullOrEmpty( vi.Description ) ) AddLabel( 125, 45, 0, vi.Description ); else AddHtmlLocalized( 125, 45, 250, 24, 1019072, false, false ); // an item without a description diff --git a/Scripts/Gumps/Props/PropsGump.cs b/Scripts/Gumps/Props/PropsGump.cs index c8af42fe7..a8bf7f2f2 100644 --- a/Scripts/Gumps/Props/PropsGump.cs +++ b/Scripts/Gumps/Props/PropsGump.cs @@ -406,8 +406,8 @@ namespace Server.Gumps private static Type typeofTimeSpan = typeof( TimeSpan ); private static Type typeofCustomEnum = typeof( CustomEnumAttribute ); private static Type typeofEnum = typeof( Enum ); - private static Type typeofBool = typeof( Boolean ); - private static Type typeofString = typeof( String ); + private static Type typeofBool = typeof( bool ); + private static Type typeofString = typeof( string ); private static Type typeofText = typeof( TextDefinition ); private static Type typeofPoison = typeof( Poison ); private static Type typeofMap = typeof( Map ); @@ -416,19 +416,19 @@ namespace Server.Gumps private static Type typeofNoSort = typeof( NoSortAttribute ); private static Type[] typeofReal = { - typeof( Single ), - typeof( Double ) + typeof( float ), + typeof( double ) }; private static Type[] typeofNumeric = { - typeof( Byte ), - typeof( Int16 ), - typeof( Int32 ), - typeof( Int64 ), - typeof( SByte ), - typeof( UInt16 ), - typeof( UInt32 ), - typeof( UInt64 ) + typeof( byte ), + typeof( short ), + typeof( int ), + typeof( long ), + typeof( sbyte ), + typeof( ushort ), + typeof( uint ), + typeof( ulong ) }; private string ValueToString( PropertyInfo prop ) @@ -484,7 +484,7 @@ namespace Server.Gumps } if ( o is byte || o is sbyte || o is short || o is ushort || o is int || o is uint || o is long || o is ulong ) { - return String.Format( "{0} (0x{0:X})", o ); + return string.Format( "{0} (0x{0:X})", o ); } if ( o is Mobile mobile ) { @@ -668,7 +668,7 @@ namespace Server.Gumps } if ( o is byte || o is sbyte || o is short || o is ushort || o is int || o is uint || o is long || o is ulong ) { - return String.Format( "{0} (0x{0:X})", o ); + return string.Format( "{0} (0x{0:X})", o ); } if ( o is Mobile mobile ) { @@ -722,7 +722,7 @@ namespace Server.Gumps m_Start = start; } - private static Type typeofObject = typeof( Object ); + private static Type typeofObject = typeof( object ); private int GetDistance( Type type ) { diff --git a/Scripts/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs b/Scripts/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs index 87171192a..b363f30f9 100644 --- a/Scripts/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs +++ b/Scripts/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs @@ -140,7 +140,7 @@ namespace Server.Engines.Events public class PlayerBones : BaseContainer { [Constructible] - public PlayerBones( String name ) + public PlayerBones( string name ) : base( Utility.RandomMinMax( 0x0ECA, 0x0ED2 ) ) { Name = $"{name}'s bones"; diff --git a/Scripts/Items/Addons/BallotBox.cs b/Scripts/Items/Addons/BallotBox.cs index c2fa5ada0..9df3316c7 100644 --- a/Scripts/Items/Addons/BallotBox.cs +++ b/Scripts/Items/Addons/BallotBox.cs @@ -119,7 +119,7 @@ namespace Server.Items { string line = box.Topic[i]; - if ( !String.IsNullOrEmpty( line ) ) + if ( !string.IsNullOrEmpty( line ) ) AddLabelCropped( 30, 90 + i * 20, 340, 20, 0x3E3, line ); } diff --git a/Scripts/Items/Construction/Signs/SubtextSign.cs b/Scripts/Items/Construction/Signs/SubtextSign.cs index 1e6c1a813..c5a4bdddd 100644 --- a/Scripts/Items/Construction/Signs/SubtextSign.cs +++ b/Scripts/Items/Construction/Signs/SubtextSign.cs @@ -31,7 +31,7 @@ namespace Server.Items { base.OnSingleClick( from ); - if ( !String.IsNullOrEmpty( m_Subtext ) ) + if ( !string.IsNullOrEmpty( m_Subtext ) ) LabelTo( from, m_Subtext ); } @@ -39,7 +39,7 @@ namespace Server.Items { base.AddNameProperties( list ); - if ( !String.IsNullOrEmpty( m_Subtext ) ) + if ( !string.IsNullOrEmpty( m_Subtext ) ) list.Add( m_Subtext ); } diff --git a/Scripts/Items/Misc/BankCheck.cs b/Scripts/Items/Misc/BankCheck.cs index 693afb329..118ec5e32 100644 --- a/Scripts/Items/Misc/BankCheck.cs +++ b/Scripts/Items/Misc/BankCheck.cs @@ -157,7 +157,7 @@ namespace Server.Items 1041361, "", AffixType.Append, - String.Concat(" ", m_Worth.ToString()), + string.Concat(" ", m_Worth.ToString()), "")); // A bank check: } diff --git a/Scripts/Items/Misc/BulletinBoards.cs b/Scripts/Items/Misc/BulletinBoards.cs index 000d83872..86ccb6c01 100644 --- a/Scripts/Items/Misc/BulletinBoards.cs +++ b/Scripts/Items/Misc/BulletinBoards.cs @@ -539,7 +539,7 @@ namespace Server.Items public string SafeString( string v ) { if ( v == null ) - return String.Empty; + return string.Empty; return v; } @@ -618,7 +618,7 @@ namespace Server.Items public string SafeString( string v ) { if ( v == null ) - return String.Empty; + return string.Empty; return v; } diff --git a/Scripts/Items/Skill Items/Magical/Misc/RecallRune.cs b/Scripts/Items/Skill Items/Magical/Misc/RecallRune.cs index aef79e020..fafc6fb4d 100644 --- a/Scripts/Items/Skill Items/Magical/Misc/RecallRune.cs +++ b/Scripts/Items/Skill Items/Magical/Misc/RecallRune.cs @@ -216,7 +216,7 @@ namespace Server.Items else if ( m_TargetMap == Map.Trammel ) list.Add( (House != null ? 1062453 : 1060806), RuneFormat, desc ); // ~1_val~ (Trammel)[(House)] else - list.Add( (House != null ? "{0} ({1})(House)" : "{0} ({1})"), String.Format( RuneFormat, desc ), m_TargetMap ); + list.Add( (House != null ? "{0} ({1})(House)" : "{0} ({1})"), string.Format( RuneFormat, desc ), m_TargetMap ); } } @@ -230,15 +230,15 @@ namespace Server.Items desc = "an unknown location"; if ( m_TargetMap == Map.Tokuno ) - LabelTo( from, (House != null ? 1063260 : 1063259), String.Format( RuneFormat, desc ) ); // ~1_val~ (Tokuno Islands)[(House)] + LabelTo( from, (House != null ? 1063260 : 1063259), string.Format( RuneFormat, desc ) ); // ~1_val~ (Tokuno Islands)[(House)] else if ( m_TargetMap == Map.Malas ) - LabelTo( from, (House != null ? 1062454 : 1060804), String.Format( RuneFormat, desc ) ); // ~1_val~ (Malas)[(House)] + LabelTo( from, (House != null ? 1062454 : 1060804), string.Format( RuneFormat, desc ) ); // ~1_val~ (Malas)[(House)] else if ( m_TargetMap == Map.Felucca ) - LabelTo( from, (House != null ? 1062452 : 1060805), String.Format( RuneFormat, desc ) ); // ~1_val~ (Felucca)[(House)] + LabelTo( from, (House != null ? 1062452 : 1060805), string.Format( RuneFormat, desc ) ); // ~1_val~ (Felucca)[(House)] else if ( m_TargetMap == Map.Trammel ) - LabelTo( from, (House != null ? 1062453 : 1060806), String.Format( RuneFormat, desc ) ); // ~1_val~ (Trammel)[(House)] + LabelTo( from, (House != null ? 1062453 : 1060806), string.Format( RuneFormat, desc ) ); // ~1_val~ (Trammel)[(House)] else - LabelTo( from, (House != null ? "{0} ({1})(House)" : "{0} ({1})"), String.Format( RuneFormat, desc ), m_TargetMap ); + LabelTo( from, (House != null ? "{0} ({1})(House)" : "{0} ({1})"), string.Format( RuneFormat, desc ), m_TargetMap ); } else { diff --git a/Scripts/Items/Special/House Raffle/HouseRaffleDeed.cs b/Scripts/Items/Special/House Raffle/HouseRaffleDeed.cs index 391679fef..0adeeb733 100644 --- a/Scripts/Items/Special/House Raffle/HouseRaffleDeed.cs +++ b/Scripts/Items/Special/House Raffle/HouseRaffleDeed.cs @@ -176,7 +176,7 @@ namespace Server.Items private static string FormatDescription( HouseRaffleDeed deed ) { if ( deed == null ) - return String.Empty; + return string.Empty; if ( deed.IsExpired ) { diff --git a/Scripts/Items/Special/Special Scrolls/ScrollofAlacrity.cs b/Scripts/Items/Special/Special Scrolls/ScrollofAlacrity.cs index ed5a1405e..5c51dbd8f 100644 --- a/Scripts/Items/Special/Special Scrolls/ScrollofAlacrity.cs +++ b/Scripts/Items/Special/Special Scrolls/ScrollofAlacrity.cs @@ -32,7 +32,7 @@ namespace Server.Items *level in that skill by the amount of points displayed on the scroll. *As you may not gain skills beyond your maximum skill cap, any excess points will be lost.*/ - public override string DefaultTitle => String.Format( "Scroll of Alacrity:" ); + public override string DefaultTitle => string.Format( "Scroll of Alacrity:" ); public ScrollofAlacrity() : this( SkillName.Alchemy ) { diff --git a/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs b/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs index 5467741d4..11f829015 100644 --- a/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs +++ b/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs @@ -50,7 +50,7 @@ namespace Server.Items public virtual string GetNameLocalized() { - return String.Concat( "#", AosSkillBonuses.GetLabel( m_Skill ).ToString() ); + return string.Concat( "#", AosSkillBonuses.GetLabel( m_Skill ).ToString() ); } public virtual string GetName() diff --git a/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs b/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs index b5dba90e9..4ddc2c8da 100644 --- a/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs +++ b/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs @@ -248,7 +248,7 @@ namespace Server.Items if ( relay != null ) { - if ( String.IsNullOrEmpty( relay.Text ) ) + if ( string.IsNullOrEmpty( relay.Text ) ) { m_Target.EngravedText = null; state.Mobile.SendLocalizedMessage( 1072362 ); // You remove the engraving from the object. diff --git a/Scripts/Items/Talismans/BaseTalisman.cs b/Scripts/Items/Talismans/BaseTalisman.cs index 1648a5cfe..a750e5991 100644 --- a/Scripts/Items/Talismans/BaseTalisman.cs +++ b/Scripts/Items/Talismans/BaseTalisman.cs @@ -383,7 +383,7 @@ namespace Server.Items if (Blessed) { if (BlessedFor != null) - list.Add(1072304, !String.IsNullOrEmpty(BlessedFor.Name) ? BlessedFor.Name : "Unnamed Warrior"); // Owned by ~1_name~ + list.Add(1072304, !string.IsNullOrEmpty(BlessedFor.Name) ? BlessedFor.Name : "Unnamed Warrior"); // Owned by ~1_name~ else list.Add(1072304, "Nobody"); // Owned by ~1_name~ } diff --git a/Scripts/Items/Weapons/BaseWeapon.cs b/Scripts/Items/Weapons/BaseWeapon.cs index c1faec0ef..734da83e8 100644 --- a/Scripts/Items/Weapons/BaseWeapon.cs +++ b/Scripts/Items/Weapons/BaseWeapon.cs @@ -2425,7 +2425,7 @@ namespace Server.Items SetSaveFlag( ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty ); SetSaveFlag( ref flags, SaveFlag.Slayer2, m_Slayer2 != SlayerName.None ); SetSaveFlag( ref flags, SaveFlag.ElementalDamages, !m_AosElementDamages.IsEmpty ); - SetSaveFlag( ref flags, SaveFlag.EngravedText, !String.IsNullOrEmpty( m_EngravedText ) ); + SetSaveFlag( ref flags, SaveFlag.EngravedText, !string.IsNullOrEmpty( m_EngravedText ) ); writer.Write( (int) flags ); @@ -3007,7 +3007,7 @@ namespace Server.Items * method and engraving tool, to make it perm cleaned up. */ - if ( !String.IsNullOrEmpty( m_EngravedText ) ) + if ( !string.IsNullOrEmpty( m_EngravedText ) ) list.Add( 1062613, m_EngravedText ); /* list.Add( 1062613, Utility.FixHtml( m_EngravedText ) ); */ diff --git a/Scripts/Misc/AttackMessage.cs b/Scripts/Misc/AttackMessage.cs index 6949a34da..7dd07538b 100644 --- a/Scripts/Misc/AttackMessage.cs +++ b/Scripts/Misc/AttackMessage.cs @@ -27,8 +27,8 @@ namespace Server.Misc if ( !CheckAggressions( aggressor, aggressed ) ) { - aggressor.LocalOverheadMessage( MessageType.Regular, Hue, true, String.Format( AggressorFormat, aggressed.Name ) ); - aggressed.LocalOverheadMessage( MessageType.Regular, Hue, true, String.Format( AggressedFormat, aggressor.Name ) ); + aggressor.LocalOverheadMessage( MessageType.Regular, Hue, true, string.Format( AggressorFormat, aggressed.Name ) ); + aggressed.LocalOverheadMessage( MessageType.Regular, Hue, true, string.Format( AggressedFormat, aggressor.Name ) ); } } diff --git a/Scripts/Misc/CharacterCreation.cs b/Scripts/Misc/CharacterCreation.cs index 8a31af5c9..557296f8e 100644 --- a/Scripts/Misc/CharacterCreation.cs +++ b/Scripts/Misc/CharacterCreation.cs @@ -214,9 +214,9 @@ namespace Server.Misc cont.Hue = 0x480; cont.Name = "Spell Casting Stuff"; - PlaceItemIn( cont, 45, 105, new Spellbook( UInt64.MaxValue ) ); - PlaceItemIn( cont, 65, 105, new NecromancerSpellbook( (UInt64)0xFFFF ) ); - PlaceItemIn( cont, 85, 105, new BookOfChivalry( (UInt64)0x3FF ) ); + PlaceItemIn( cont, 45, 105, new Spellbook( ulong.MaxValue ) ); + PlaceItemIn( cont, 65, 105, new NecromancerSpellbook( (ulong)0xFFFF ) ); + PlaceItemIn( cont, 85, 105, new BookOfChivalry( (ulong)0x3FF ) ); PlaceItemIn( cont, 105, 105, new BookOfBushido() ); //Default ctor = full PlaceItemIn( cont, 125, 105, new BookOfNinjitsu() ); //Default ctor = full diff --git a/Scripts/Misc/CrashGuard.cs b/Scripts/Misc/CrashGuard.cs index dd88cca23..f44941d6c 100644 --- a/Scripts/Misc/CrashGuard.cs +++ b/Scripts/Misc/CrashGuard.cs @@ -131,7 +131,7 @@ namespace Server.Misc string root = GetRoot(); string rootBackup = Combine( root, $"Backups/Crashed/{timeStamp}/"); - string rootOrigin = Combine( root, String.Format( "Saves/" ) ); + string rootOrigin = Combine( root, string.Format( "Saves/" ) ); // Create new directories CreateDirectory( rootBackup ); diff --git a/Scripts/Misc/DataPath.cs b/Scripts/Misc/DataPath.cs index c745ebb09..84a918d75 100644 --- a/Scripts/Misc/DataPath.cs +++ b/Scripts/Misc/DataPath.cs @@ -76,14 +76,14 @@ namespace Server.Misc else keyString = @"SOFTWARE\{0}"; - using( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( keyString, subName ) ) ) + using( RegistryKey key = Registry.LocalMachine.OpenSubKey( string.Format( keyString, subName ) ) ) { if ( key == null ) return null; string v = key.GetValue( keyName ) as string; - if ( String.IsNullOrEmpty( v ) ) + if ( string.IsNullOrEmpty( v ) ) return null; if ( keyName == "InstallDir" ) @@ -91,7 +91,7 @@ namespace Server.Misc v = Path.GetDirectoryName( v ); - if ( String.IsNullOrEmpty( v ) ) + if ( string.IsNullOrEmpty( v ) ) return null; return v; diff --git a/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs b/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs index ded580b52..6fad105e8 100644 --- a/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs +++ b/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs @@ -97,7 +97,7 @@ namespace Server.Items } if ( m_Dipper != null ) - m_Dipper = String.Intern( m_Dipper ); + m_Dipper = string.Intern( m_Dipper ); } } } \ No newline at end of file diff --git a/Scripts/Misc/Guild.cs b/Scripts/Misc/Guild.cs index 3233f612d..00afc3f3c 100644 --- a/Scripts/Misc/Guild.cs +++ b/Scripts/Misc/Guild.cs @@ -283,7 +283,7 @@ namespace Server.Guilds #region Alliance[Text]Message(...) public void AllianceMessage( int num, bool append, string format, params object[] args ) { - AllianceMessage( num, append, String.Format( format, args) ); + AllianceMessage( num, append, string.Format( format, args) ); } public void AllianceMessage( int number ) { @@ -319,7 +319,7 @@ namespace Server.Guilds } public void AllianceTextMessage( string format, params object[] args ) { - AllianceTextMessage( 0x3B2, String.Format( format, args ) ); + AllianceTextMessage( 0x3B2, string.Format( format, args ) ); } public void AllianceTextMessage( int hue, string text ) { @@ -328,7 +328,7 @@ namespace Server.Guilds } public void AllianceTextMessage( int hue, string format, params object[] args ) { - AllianceTextMessage( hue, String.Format( format, args ) ); + AllianceTextMessage( hue, string.Format( format, args ) ); } public void AllianceChat( Mobile from, int hue, string text ) @@ -1400,7 +1400,7 @@ namespace Server.Guilds #region Guild[Text]Message(...) public void GuildMessage( int num, bool append, string format, params object[] args ) { - GuildMessage( num, append, String.Format( format, args) ); + GuildMessage( num, append, string.Format( format, args) ); } public void GuildMessage( int number ) { @@ -1426,7 +1426,7 @@ namespace Server.Guilds } public void GuildTextMessage( string format, params object[] args ) { - GuildTextMessage( 0x3B2, String.Format( format, args ) ); + GuildTextMessage( 0x3B2, string.Format( format, args ) ); } public void GuildTextMessage( int hue, string text ) { @@ -1435,7 +1435,7 @@ namespace Server.Guilds } public void GuildTextMessage( int hue, string format, params object[] args ) { - GuildTextMessage( hue, String.Format( format, args ) ); + GuildTextMessage( hue, string.Format( format, args ) ); } public void GuildChat( Mobile from, int hue, string text ) diff --git a/Scripts/Misc/InhumanSpeech.cs b/Scripts/Misc/InhumanSpeech.cs index fd85f4db9..37db5afc4 100644 --- a/Scripts/Misc/InhumanSpeech.cs +++ b/Scripts/Misc/InhumanSpeech.cs @@ -339,7 +339,7 @@ namespace Server.Misc for ( int i = 0; i < syllableCount; ++i ) syllables[i] = GetRandomSyllable(); - return String.Concat( syllables ); + return string.Concat( syllables ); } public string ConstructSentance( int wordCount ) @@ -381,7 +381,7 @@ namespace Server.Misc sentance.Append( word ); if ( needUpperCase ) - sentance.Replace( word[0], Char.ToUpper( word[0] ), sentance.Length - word.Length, 1 ); + sentance.Replace( word[0], char.ToUpper( word[0] ), sentance.Length - word.Length, 1 ); needUpperCase = false; } @@ -462,33 +462,33 @@ namespace Server.Misc case 1: { response.Append( responseWord ).Append( " thee!" ); - response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 ); + response.Replace( responseWord[0], char.ToUpper( responseWord[0] ), 0, 1 ); break; } case 2: { response.Append( responseWord ).Append( '?' ); - response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 ); + response.Replace( responseWord[0], char.ToUpper( responseWord[0] ), 0, 1 ); break; } case 3: { response.Append( responseWord ).Append( "! " ).Append( secondResponseWord ).Append( '.' ); - response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 ); - response.Replace( secondResponseWord[0], Char.ToUpper( secondResponseWord[0] ), responseWord.Length + 2, 1 ); + response.Replace( responseWord[0], char.ToUpper( responseWord[0] ), 0, 1 ); + response.Replace( secondResponseWord[0], char.ToUpper( secondResponseWord[0] ), responseWord.Length + 2, 1 ); break; } case 4: { response.Append( responseWord ).Append( '.' ); - response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 ); + response.Replace( responseWord[0], char.ToUpper( responseWord[0] ), 0, 1 ); break; } case 5: { response.Append( responseWord ).Append( "? " ).Append( secondResponseWord ).Append( '.' ); - response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 ); - response.Replace( secondResponseWord[0], Char.ToUpper( secondResponseWord[0] ), responseWord.Length + 2, 1 ); + response.Replace( responseWord[0], char.ToUpper( responseWord[0] ), 0, 1 ); + response.Replace( secondResponseWord[0], char.ToUpper( secondResponseWord[0] ), responseWord.Length + 2, 1 ); break; } } diff --git a/Scripts/Misc/NameList.cs b/Scripts/Misc/NameList.cs index 351bc09db..a0b53b817 100644 --- a/Scripts/Misc/NameList.cs +++ b/Scripts/Misc/NameList.cs @@ -88,7 +88,7 @@ namespace Server { string type = element.GetAttribute( "type" ); - if ( String.IsNullOrEmpty( type ) ) + if ( string.IsNullOrEmpty( type ) ) continue; try diff --git a/Scripts/Misc/Profile.cs b/Scripts/Misc/Profile.cs index e3e97d7c0..7a201b775 100644 --- a/Scripts/Misc/Profile.cs +++ b/Scripts/Misc/Profile.cs @@ -84,7 +84,7 @@ namespace Server.Misc { if ( value >= 1.0 ) { - op = String.Format( format, (int)value, (int)value != 1 ? "s" : "" ); + op = string.Format( format, (int)value, (int)value != 1 ? "s" : "" ); return true; } diff --git a/Scripts/Misc/ResourceInfo.cs b/Scripts/Misc/ResourceInfo.cs index 543c7a508..37fa37a64 100644 --- a/Scripts/Misc/ResourceInfo.cs +++ b/Scripts/Misc/ResourceInfo.cs @@ -650,7 +650,7 @@ namespace Server.Items { CraftResourceInfo info = GetInfo( resource ); - return ( info == null ? String.Empty : info.Name ); + return ( info == null ? string.Empty : info.Name ); } /// diff --git a/Scripts/Misc/ShardPoller.cs b/Scripts/Misc/ShardPoller.cs index fdfb9c40a..cc8c8930b 100644 --- a/Scripts/Misc/ShardPoller.cs +++ b/Scripts/Misc/ShardPoller.cs @@ -488,7 +488,7 @@ namespace Server.Misc { double perc = option.Votes / (double)totalVotes; - text = String.Format( "[{1}: {2}%] {0}", text, option.Votes, (int)(perc*100) ); + text = string.Format( "[{1}: {2}%] {0}", text, option.Votes, (int)(perc*100) ); } int optHeight = option.ComputeHeight(); @@ -600,7 +600,7 @@ namespace Server.Misc } else if ( m.Groups[2].Success ) { - return String.Format( "{0}", m.Groups[2].Value ); + return string.Format( "{0}", m.Groups[2].Value ); } return m.Value; diff --git a/Scripts/Misc/TextDefinition.cs b/Scripts/Misc/TextDefinition.cs index cb869b7af..a5a15cb39 100644 --- a/Scripts/Misc/TextDefinition.cs +++ b/Scripts/Misc/TextDefinition.cs @@ -37,7 +37,7 @@ namespace Server public override string ToString() { if ( m_Number > 0 ) - return String.Concat( "#", m_Number.ToString() ); + return string.Concat( "#", m_Number.ToString() ); else if ( m_String != null ) return m_String; @@ -47,7 +47,7 @@ namespace Server public string Format( bool propsGump ) { if ( m_Number > 0 ) - return String.Format( "{0} (0x{0:X})", m_Number ); + return string.Format( "{0} (0x{0:X})", m_Number ); else if ( m_String != null ) return $"\"{m_String}\""; diff --git a/Scripts/Misc/Titles.cs b/Scripts/Misc/Titles.cs index ca9356d95..46e4feb56 100644 --- a/Scripts/Misc/Titles.cs +++ b/Scripts/Misc/Titles.cs @@ -236,7 +236,7 @@ namespace Server.Misc if ( mob.Female && skillTitle.EndsWith( "man" ) ) skillTitle = skillTitle.Substring( 0, skillTitle.Length - 3 ) + "woman"; - return String.Concat( skillLevel, " ", skillTitle ); + return string.Concat( skillLevel, " ", skillTitle ); } return null; diff --git a/Scripts/Misc/WebStatus.cs b/Scripts/Misc/WebStatus.cs index ae8895929..b61435958 100644 --- a/Scripts/Misc/WebStatus.cs +++ b/Scripts/Misc/WebStatus.cs @@ -17,7 +17,7 @@ namespace Server.Misc private static HttpListener _Listener; - private static string _StatusPage = String.Empty; + private static string _StatusPage = string.Empty; private static byte[] _StatusBuffer = new byte[0]; private static readonly object _StatusLock = new object(); @@ -144,7 +144,7 @@ namespace Server.Misc var title = m.GuildTitle; - title = title != null ? title.Trim() : String.Empty; + title = title != null ? title.Trim() : string.Empty; if (title.Length > 0) { diff --git a/Scripts/Mobiles/BaseCreature.cs b/Scripts/Mobiles/BaseCreature.cs index 440327074..0d21b71b1 100644 --- a/Scripts/Mobiles/BaseCreature.cs +++ b/Scripts/Mobiles/BaseCreature.cs @@ -1022,7 +1022,7 @@ namespace Server.Mobiles if ( suffix.Length == 0 ) suffix = "(Paragon)"; else - suffix = String.Concat( suffix, " (Paragon)" ); + suffix = string.Concat( suffix, " (Paragon)" ); } return base.ApplyNameSuffix( suffix ); @@ -2796,7 +2796,7 @@ namespace Server.Mobiles public void DebugSay( string format, params object[] args ) { if ( m_DebugAI ) - PublicOverheadMessage( MessageType.Regular, 41, false, String.Format( format, args ) ); + PublicOverheadMessage( MessageType.Regular, 41, false, string.Format( format, args ) ); } /* diff --git a/Scripts/Mobiles/Monsters/LBR/Jukas/JukaLord.cs b/Scripts/Mobiles/Monsters/LBR/Jukas/JukaLord.cs index 34da9e9b3..992fa73bb 100644 --- a/Scripts/Mobiles/Monsters/LBR/Jukas/JukaLord.cs +++ b/Scripts/Mobiles/Monsters/LBR/Jukas/JukaLord.cs @@ -75,7 +75,7 @@ namespace Server.Mobiles "{0}!! You will pay for that!" }; - Say( true, String.Format( toSay[Utility.Random( toSay.Length )], from.Name ) ); + Say( true, string.Format( toSay[Utility.Random( toSay.Length )], from.Name ) ); } base.OnDamage( amount, from, willKill ); diff --git a/Scripts/Mobiles/PlayerMobile.cs b/Scripts/Mobiles/PlayerMobile.cs index b30062af2..2639655f6 100644 --- a/Scripts/Mobiles/PlayerMobile.cs +++ b/Scripts/Mobiles/PlayerMobile.cs @@ -3081,7 +3081,7 @@ namespace Server.Mobiles private static void SendToStaffMessage( Mobile from, string format, params object[] args ) { - SendToStaffMessage( from, String.Format( format, args ) ); + SendToStaffMessage( from, string.Format( format, args ) ); } public override void Damage( int amount, Mobile from ) @@ -3839,19 +3839,19 @@ namespace Server.Mobiles Faction faction = pl.Faction; if ( faction.Commander == this ) - text = String.Concat( Female ? "(Commanding Lady of the " : "(Commanding Lord of the ", faction.Definition.FriendlyName, ")" ); + text = string.Concat( Female ? "(Commanding Lady of the " : "(Commanding Lord of the ", faction.Definition.FriendlyName, ")" ); else if ( pl.Sheriff != null ) - text = String.Concat( "(The Sheriff of ", pl.Sheriff.Definition.FriendlyName, ", ", faction.Definition.FriendlyName, ")" ); + text = string.Concat( "(The Sheriff of ", pl.Sheriff.Definition.FriendlyName, ", ", faction.Definition.FriendlyName, ")" ); else if ( pl.Finance != null ) - text = String.Concat( "(The Finance Minister of ", pl.Finance.Definition.FriendlyName, ", ", faction.Definition.FriendlyName, ")" ); + text = string.Concat( "(The Finance Minister of ", pl.Finance.Definition.FriendlyName, ", ", faction.Definition.FriendlyName, ")" ); else { ascii = true; if ( pl.MerchantTitle != MerchantTitle.None ) - text = String.Concat( "(", MerchantTitles.GetInfo( pl.MerchantTitle ).Title.String, ", ", faction.Definition.FriendlyName, ")" ); + text = string.Concat( "(", MerchantTitles.GetInfo( pl.MerchantTitle ).Title.String, ", ", faction.Definition.FriendlyName, ")" ); else - text = String.Concat( "(", pl.Rank.Title.String, ", ", faction.Definition.FriendlyName, ")" ); + text = string.Concat( "(", pl.Rank.Title.String, ", ", faction.Definition.FriendlyName, ")" ); } int hue = ( Faction.Find( from ) == faction ? 98 : 38 ); @@ -4341,7 +4341,7 @@ namespace Server.Mobiles if ( suffix.Length == 0 ) suffix = "(Young)"; else - suffix = String.Concat( suffix, " (Young)" ); + suffix = string.Concat( suffix, " (Young)" ); } #region Ethics @@ -4350,7 +4350,7 @@ namespace Server.Mobiles if ( suffix.Length == 0 ) suffix = m_EthicPlayer.Ethic.Definition.Adjunct.String; else - suffix = String.Concat( suffix, " ", m_EthicPlayer.Ethic.Definition.Adjunct.String ); + suffix = string.Concat( suffix, " ", m_EthicPlayer.Ethic.Definition.Adjunct.String ); } #endregion @@ -4364,7 +4364,7 @@ namespace Server.Mobiles if ( suffix.Length == 0 ) suffix = adjunct; else - suffix = String.Concat( suffix, " ", adjunct ); + suffix = string.Concat( suffix, " ", adjunct ); } } diff --git a/Scripts/Mobiles/Townfolk/Banker.cs b/Scripts/Mobiles/Townfolk/Banker.cs index 4479edbc7..0d9d50819 100644 --- a/Scripts/Mobiles/Townfolk/Banker.cs +++ b/Scripts/Mobiles/Townfolk/Banker.cs @@ -33,7 +33,7 @@ namespace Server.Mobiles if (AccountGold.Enabled && m.Account != null) { balance = m.Account.GetTotalGold(); - if (balance >= Int32.MaxValue) { return Int32.MaxValue; } + if (balance >= int.MaxValue) { return int.MaxValue; } } Container bank = m.FindBankNoCreate(); @@ -44,11 +44,11 @@ namespace Server.Mobiles var checks = bank.FindItemsByType(); balance += gold.Aggregate(0L, (c, t) => c + t.Amount); - if (balance >= Int32.MaxValue) { return Int32.MaxValue; } + if (balance >= int.MaxValue) { return int.MaxValue; } balance += checks.Aggregate(0L, (c, t) => c + t.Worth); } - return Math.Max(0, (int)Math.Min(Int32.MaxValue, balance)); + return Math.Max(0, (int)Math.Min(int.MaxValue, balance)); } public static int GetBalance(Mobile m, out Item[] gold, out Item[] checks) @@ -59,10 +59,10 @@ namespace Server.Mobiles { balance = m.Account.GetTotalGold(); - if (balance > Int32.MaxValue) + if (balance > int.MaxValue) { gold = checks = new Item[0]; - return Int32.MaxValue; + return int.MaxValue; } } @@ -74,7 +74,7 @@ namespace Server.Mobiles checks = bank.FindItemsByType(typeof(BankCheck)); balance += gold.OfType().Aggregate(0L, (c, t) => c + t.Amount); - if (balance >= Int32.MaxValue) { return Int32.MaxValue; } + if (balance >= int.MaxValue) { return int.MaxValue; } balance += checks.OfType().Aggregate(0L, (c, t) => c + t.Worth); } else @@ -82,7 +82,7 @@ namespace Server.Mobiles gold = checks = new Item[0]; } - return Math.Max(0, (int)Math.Min(Int32.MaxValue, balance)); + return Math.Max(0, (int)Math.Min(int.MaxValue, balance)); } public static bool Withdraw(Mobile from, int amount) diff --git a/Scripts/Mobiles/Townfolk/TownCrier.cs b/Scripts/Mobiles/Townfolk/TownCrier.cs index 6f5e6137e..789f1f5ac 100644 --- a/Scripts/Mobiles/Townfolk/TownCrier.cs +++ b/Scripts/Mobiles/Townfolk/TownCrier.cs @@ -153,7 +153,7 @@ namespace Server.Mobiles from.SendMessage( "Duration set to: {0}", ts ); from.SendMessage( "Enter the first line to shout:" ); - from.Prompt = new TownCrierLinesPrompt( m_Owner, null, new List(), ts ); + from.Prompt = new TownCrierLinesPrompt( m_Owner, null, new List(), ts ); } public override void OnCancel( Mobile from ) @@ -167,10 +167,10 @@ namespace Server.Mobiles { private ITownCrierEntryList m_Owner; private TownCrierEntry m_Entry; - private List m_Lines; + private List m_Lines; private TimeSpan m_Duration; - public TownCrierLinesPrompt( ITownCrierEntryList owner, TownCrierEntry entry, List lines, TimeSpan duration ) + public TownCrierLinesPrompt( ITownCrierEntryList owner, TownCrierEntry entry, List lines, TimeSpan duration ) { m_Owner = owner; m_Entry = entry; @@ -235,7 +235,7 @@ namespace Server.Mobiles m_From.SendMessage( "Editing entry #{0}.", index + 1 ); m_From.SendMessage( "Enter the first line to shout:" ); - m_From.Prompt = new TownCrierLinesPrompt( m_Owner, tce, new List(), ts ); + m_From.Prompt = new TownCrierLinesPrompt( m_Owner, tce, new List(), ts ); } } } diff --git a/Scripts/Mobiles/Vendors/BaseVendor.cs b/Scripts/Mobiles/Vendors/BaseVendor.cs index 9823785e8..0f7bf8d04 100644 --- a/Scripts/Mobiles/Vendors/BaseVendor.cs +++ b/Scripts/Mobiles/Vendors/BaseVendor.cs @@ -430,12 +430,12 @@ namespace Server.Mobiles continue; if ( split[i].Length > 1 ) - split[i] = Char.ToUpper( split[i][0] ) + split[i].Substring( 1 ); + split[i] = char.ToUpper( split[i][0] ) + split[i].Substring( 1 ); else if ( split[i].Length > 0 ) - split[i] = Char.ToUpper( split[i][0] ).ToString(); + split[i] = char.ToUpper( split[i][0] ).ToString(); } - Title = String.Join( " ", split ); + Title = string.Join( " ", split ); } public virtual int GetHairHue() diff --git a/Scripts/Mobiles/Vendors/PlayerVendor.cs b/Scripts/Mobiles/Vendors/PlayerVendor.cs index 5ccd3b9e8..bf2c4d794 100644 --- a/Scripts/Mobiles/Vendors/PlayerVendor.cs +++ b/Scripts/Mobiles/Vendors/PlayerVendor.cs @@ -241,7 +241,7 @@ namespace Server.Mobiles else item.LabelTo( from, 1043304, vi.FormattedPrice ); // Price: ~1_COST~ - if ( !String.IsNullOrEmpty( vi.Description ) ) + if ( !string.IsNullOrEmpty( vi.Description ) ) { // The localized message (1043305) is no longer valid -
Seller's Description:
"~1_DESC~" item.LabelTo( from, "Description: {0}", vi.Description ); @@ -973,7 +973,7 @@ namespace Server.Mobiles if ( vi != null ) { string name; - if ( !String.IsNullOrEmpty( item.Name ) ) + if ( !string.IsNullOrEmpty( item.Name ) ) name = item.Name; else name = "#" + item.LabelNumber.ToString(); diff --git a/Scripts/Multis/Boats/BaseBoat.cs b/Scripts/Multis/Boats/BaseBoat.cs index 776a158d4..2f0bb3e40 100644 --- a/Scripts/Multis/Boats/BaseBoat.cs +++ b/Scripts/Multis/Boats/BaseBoat.cs @@ -909,7 +909,7 @@ namespace Server.Multis int start = -1; for ( int i = 0; i < navPoint.Length; i++ ) { - if ( Char.IsDigit( navPoint[i] ) ) + if ( char.IsDigit( navPoint[i] ) ) { start = i; break; diff --git a/Scripts/Regions/BaseRegion.cs b/Scripts/Regions/BaseRegion.cs index ac3c1722f..9554164e3 100644 --- a/Scripts/Regions/BaseRegion.cs +++ b/Scripts/Regions/BaseRegion.cs @@ -224,7 +224,7 @@ namespace Server.Regions } } - private static List m_SpawnBuffer1 = new List(); + private static List m_SpawnBuffer1 = new List(); private static List m_SpawnBuffer2 = new List(); public Point3D RandomSpawnLocation( int spawnHeight, bool land, bool water, Point3D home, int range ) diff --git a/Scripts/Spells/Base/SpecialMove.cs b/Scripts/Spells/Base/SpecialMove.cs index 4cab4abcc..d683643ab 100644 --- a/Scripts/Spells/Base/SpecialMove.cs +++ b/Scripts/Spells/Base/SpecialMove.cs @@ -193,7 +193,7 @@ namespace Server.Spells public static void ClearAllMoves( Mobile m ) { - foreach ( KeyValuePair kvp in SpellRegistry.SpecialMoves ) + foreach ( KeyValuePair kvp in SpellRegistry.SpecialMoves ) { int moveID = kvp.Key; diff --git a/Scripts/Spells/Base/SpellRegistry.cs b/Scripts/Spells/Base/SpellRegistry.cs index bb58a801b..67525faa5 100644 --- a/Scripts/Spells/Base/SpellRegistry.cs +++ b/Scripts/Spells/Base/SpellRegistry.cs @@ -35,10 +35,10 @@ namespace Server.Spells } } - private static Dictionary m_IDsFromTypes = new Dictionary( m_Types.Length ); + private static Dictionary m_IDsFromTypes = new Dictionary( m_Types.Length ); - private static Dictionary m_SpecialMoves = new Dictionary(); - public static Dictionary SpecialMoves => m_SpecialMoves; + private static Dictionary m_SpecialMoves = new Dictionary(); + public static Dictionary SpecialMoves => m_SpecialMoves; public static int GetRegistryNumber( ISpell s ) { diff --git a/Scripts/Spells/Fifth/MagicReflect.cs b/Scripts/Spells/Fifth/MagicReflect.cs index 7176ca7ef..972ac5f22 100644 --- a/Scripts/Spells/Fifth/MagicReflect.cs +++ b/Scripts/Spells/Fifth/MagicReflect.cs @@ -80,7 +80,7 @@ namespace Server.Spells.Fifth for ( int i = 0; i < mods.Length; ++i ) targ.AddResistanceMod( mods[i] ); - string buffFormat = String.Format( "{0}\t+{1}\t+{1}\t+{1}\t+{1}", physiMod, otherMod ); + string buffFormat = string.Format( "{0}\t+{1}\t+{1}\t+{1}\t+{1}", physiMod, otherMod ); BuffInfo.AddBuff( targ, new BuffInfo( BuffIcon.MagicReflection, 1075817, buffFormat, true ) ); } diff --git a/Scripts/Spells/Fourth/ArchProtection.cs b/Scripts/Spells/Fourth/ArchProtection.cs index 56aca7738..1c2f464eb 100644 --- a/Scripts/Spells/Fourth/ArchProtection.cs +++ b/Scripts/Spells/Fourth/ArchProtection.cs @@ -103,9 +103,9 @@ namespace Server.Spells.Fourth FinishSequence(); } - private static Dictionary _Table = new Dictionary(); + private static Dictionary _Table = new Dictionary(); - private static void AddEntry( Mobile m, Int32 v ) + private static void AddEntry( Mobile m, int v ) { _Table[m] = v; } diff --git a/Server/ClientVersion.cs b/Server/ClientVersion.cs index b26f60e17..f1041f380 100644 --- a/Server/ClientVersion.cs +++ b/Server/ClientVersion.cs @@ -164,7 +164,7 @@ namespace Server int br2 = fmt.IndexOf( '.', br1 + 1 ); int br3 = br2 + 1; - while ( br3 < fmt.Length && Char.IsDigit( fmt, br3 ) ) + while ( br3 < fmt.Length && char.IsDigit( fmt, br3 ) ) br3++; m_Major = Utility.ToInt32( fmt.Substring( 0, br1 ) ); @@ -175,7 +175,7 @@ namespace Server { if ( m_Major <= 5 && m_Minor <= 0 && m_Revision <= 6 ) //Anything before 5.0.7 { - if ( !Char.IsWhiteSpace( fmt, br3 ) ) + if ( !char.IsWhiteSpace( fmt, br3 ) ) m_Patch = (fmt[br3] - 'a') + 1; } else diff --git a/Server/EventLog.cs b/Server/EventLog.cs index bc5d68ea8..0b29a4365 100644 --- a/Server/EventLog.cs +++ b/Server/EventLog.cs @@ -41,7 +41,7 @@ namespace Server public static void Error( int eventID, string format, params object[] args ) { - Error( eventID, String.Format( format, args ) ); + Error( eventID, string.Format( format, args ) ); } public static void Warning( int eventID, string text ) @@ -51,7 +51,7 @@ namespace Server public static void Warning( int eventID, string format, params object[] args ) { - Warning( eventID, String.Format( format, args ) ); + Warning( eventID, string.Format( format, args ) ); } public static void Inform( int eventID, string text ) @@ -61,7 +61,7 @@ namespace Server public static void Inform( int eventID, string format, params object[] args ) { - Inform( eventID, String.Format( format, args ) ); + Inform( eventID, string.Format( format, args ) ); } } } \ No newline at end of file diff --git a/Server/Item.cs b/Server/Item.cs index d7c9dc744..1b67438ab 100644 --- a/Server/Item.cs +++ b/Server/Item.cs @@ -1277,7 +1277,7 @@ namespace Server public void LabelTo( Mobile to, string format, params object[] args ) { - LabelTo( to, String.Format( format, args ) ); + LabelTo( to, string.Format( format, args ) ); } public void LabelToAffix( Mobile to, int number, AffixType type, string affix ) diff --git a/Server/Items/Container.cs b/Server/Items/Container.cs index c19ea6cc3..afaccc4f0 100644 --- a/Server/Items/Container.cs +++ b/Server/Items/Container.cs @@ -1667,7 +1667,7 @@ namespace Server.Items base.OnSingleClick( from ); if ( CheckContentDisplay( from ) ) - LabelTo( from, "({0} item{2}, {1} stones)", TotalItems, TotalWeight, TotalItems != 1 ? "s" : String.Empty ); + LabelTo( from, "({0} item{2}, {1} stones)", TotalItems, TotalWeight, TotalItems != 1 ? "s" : string.Empty ); //LabelTo( from, 1050044, String.Format( "{0}\t{1}", TotalItems.ToString(), TotalWeight.ToString() ) ); } diff --git a/Server/Items/VirtualCheck.cs b/Server/Items/VirtualCheck.cs index c3533516c..27e7d6933 100644 --- a/Server/Items/VirtualCheck.cs +++ b/Server/Items/VirtualCheck.cs @@ -328,12 +328,12 @@ namespace Server var platText = info.GetTextEntry(0).Text; var goldText = info.GetTextEntry(1).Text; - if (!Int32.TryParse(platText, out _Plat)) + if (!int.TryParse(platText, out _Plat)) { User.SendMessage("That is not a valid amount of platinum."); refresh = true; } - else if (!Int32.TryParse(goldText, out _Gold)) + else if (!int.TryParse(goldText, out _Gold)) { User.SendMessage("That is not a valid amount of gold."); refresh = true; diff --git a/Server/Main.cs b/Server/Main.cs index 1056fd1e4..77c1e53b1 100644 --- a/Server/Main.cs +++ b/Server/Main.cs @@ -178,7 +178,7 @@ namespace Server public static string FindDataFile( string format, params object[] args ) { - return FindDataFile( String.Format( format, args ) ); + return FindDataFile( string.Format( format, args ) ); } #region Expansions @@ -789,7 +789,7 @@ namespace Server public override void WriteLine(string line, params object[] args) { - WriteLine(String.Format(line, args)); + WriteLine(string.Format(line, args)); } public override Encoding Encoding => Encoding.Default; diff --git a/Server/Map.cs b/Server/Map.cs index 2d8689038..19372c494 100644 --- a/Server/Map.cs +++ b/Server/Map.cs @@ -338,7 +338,7 @@ namespace Server public static Map Parse(string value) { - if (String.IsNullOrWhiteSpace(value)) + if (string.IsNullOrWhiteSpace(value)) { return null; } @@ -348,7 +348,7 @@ namespace Server return Internal; } - if (!Int32.TryParse(value, out int index)) + if (!int.TryParse(value, out int index)) { return m_Maps.FirstOrDefault(m => m != null && Insensitive.Equals(m.Name, value)); } diff --git a/Server/Network/NetState.cs b/Server/Network/NetState.cs index 5ab27004e..a362b161d 100644 --- a/Server/Network/NetState.cs +++ b/Server/Network/NetState.cs @@ -333,7 +333,7 @@ namespace Server.Network { } public void WriteConsole( string format, params object[] args ) { - WriteConsole( String.Format( format, args ) ); + WriteConsole( string.Format( format, args ) ); } public void AddMenu( IMenu menu ) { diff --git a/Server/Network/PacketReader.cs b/Server/Network/PacketReader.cs index 44bac05c2..3c4e1be48 100644 --- a/Server/Network/PacketReader.cs +++ b/Server/Network/PacketReader.cs @@ -222,7 +222,7 @@ namespace Server.Network if ( m_Index >= m_Size ) { m_Index += fixedLength; - return String.Empty; + return string.Empty; } int bound = m_Index + fixedLength; @@ -270,7 +270,7 @@ namespace Server.Network public string ReadUTF8StringSafe() { if ( m_Index >= m_Size ) - return String.Empty; + return string.Empty; int count = 0; int index = m_Index; @@ -310,7 +310,7 @@ namespace Server.Network public string ReadUTF8String() { if ( m_Index >= m_Size ) - return String.Empty; + return string.Empty; int count = 0; int index = m_Index; diff --git a/Server/Network/PacketWriter.cs b/Server/Network/PacketWriter.cs index 39b2540c9..65bb1ce2b 100644 --- a/Server/Network/PacketWriter.cs +++ b/Server/Network/PacketWriter.cs @@ -203,7 +203,7 @@ namespace Server.Network if ( value == null ) { Console.WriteLine( "Network: Attempted to WriteAsciiFixed() with null value" ); - value = String.Empty; + value = string.Empty; } int length = value.Length; @@ -239,7 +239,7 @@ namespace Server.Network if ( value == null ) { Console.WriteLine( "Network: Attempted to WriteAsciiNull() with null value" ); - value = String.Empty; + value = string.Empty; } int length = value.Length; @@ -263,7 +263,7 @@ namespace Server.Network if ( value == null ) { Console.WriteLine( "Network: Attempted to WriteLittleUniNull() with null value" ); - value = String.Empty; + value = string.Empty; } int length = value.Length; @@ -290,7 +290,7 @@ namespace Server.Network if ( value == null ) { Console.WriteLine( "Network: Attempted to WriteLittleUniFixed() with null value" ); - value = String.Empty; + value = string.Empty; } size *= 2; @@ -330,7 +330,7 @@ namespace Server.Network if ( value == null ) { Console.WriteLine( "Network: Attempted to WriteBigUniNull() with null value" ); - value = String.Empty; + value = string.Empty; } int length = value.Length; @@ -357,7 +357,7 @@ namespace Server.Network if ( value == null ) { Console.WriteLine( "Network: Attempted to WriteBigUniFixed() with null value" ); - value = String.Empty; + value = string.Empty; } size *= 2; diff --git a/Server/Network/Packets.cs b/Server/Network/Packets.cs index 66700ef74..577e592c0 100644 --- a/Server/Network/Packets.cs +++ b/Server/Network/Packets.cs @@ -2435,7 +2435,7 @@ namespace Server.Network string v = strings[i]; if ( v == null ) - v = String.Empty; + v = string.Empty; m_Strings.Write( (ushort) v.Length ); m_Strings.WriteBigUniFixed( v, v.Length ); @@ -2593,7 +2593,7 @@ namespace Server.Network string v = text[i]; if ( v == null ) - v = String.Empty; + v = string.Empty; int length = (ushort) v.Length; diff --git a/Server/ObjectPropertyList.cs b/Server/ObjectPropertyList.cs index 6609a8907..f9c6a57f2 100644 --- a/Server/ObjectPropertyList.cs +++ b/Server/ObjectPropertyList.cs @@ -127,22 +127,22 @@ namespace Server public void Add( int number, string format, object arg0 ) { - Add( number, String.Format( format, arg0 ) ); + Add( number, string.Format( format, arg0 ) ); } public void Add( int number, string format, object arg0, object arg1 ) { - Add( number, String.Format( format, arg0, arg1 ) ); + Add( number, string.Format( format, arg0, arg1 ) ); } public void Add( int number, string format, object arg0, object arg1, object arg2 ) { - Add( number, String.Format( format, arg0, arg1, arg2 ) ); + Add( number, string.Format( format, arg0, arg1, arg2 ) ); } public void Add( int number, string format, params object[] args ) { - Add( number, String.Format( format, args ) ); + Add( number, string.Format( format, args ) ); } // Each of these are localized to "~1_NOTHING~" which allows the string argument to be used @@ -163,22 +163,22 @@ namespace Server public void Add( string format, string arg0 ) { - Add( GetStringNumber(), String.Format( format, arg0 ) ); + Add( GetStringNumber(), string.Format( format, arg0 ) ); } public void Add( string format, string arg0, string arg1 ) { - Add( GetStringNumber(), String.Format( format, arg0, arg1 ) ); + Add( GetStringNumber(), string.Format( format, arg0, arg1 ) ); } public void Add( string format, string arg0, string arg1, string arg2 ) { - Add( GetStringNumber(), String.Format( format, arg0, arg1, arg2 ) ); + Add( GetStringNumber(), string.Format( format, arg0, arg1, arg2 ) ); } public void Add( string format, params object[] args ) { - Add( GetStringNumber(), String.Format( format, args ) ); + Add( GetStringNumber(), string.Format( format, args ) ); } } diff --git a/Server/Serialization.cs b/Server/Serialization.cs index 630dbc447..aa34aa381 100644 --- a/Server/Serialization.cs +++ b/Server/Serialization.cs @@ -384,7 +384,7 @@ namespace Server public override void Write( decimal value ) { - int[] bits = Decimal.GetBits( value ); + int[] bits = decimal.GetBits( value ); for( int i = 0; i < bits.Length; ++i ) Write( bits[i] ); diff --git a/Server/Utility.cs b/Server/Utility.cs index b6a504b62..7beb6cdf3 100644 --- a/Server/Utility.cs +++ b/Server/Utility.cs @@ -69,9 +69,9 @@ namespace Server if ( str == null ) return null; else if ( str.Length == 0 ) - return String.Empty; + return string.Empty; - return String.Intern( str ); + return string.Intern( str ); } public static void Intern( ref string str ) diff --git a/Server/World.cs b/Server/World.cs index 0025f27fc..9d470c971 100644 --- a/Server/World.cs +++ b/Server/World.cs @@ -110,7 +110,7 @@ namespace Server { } public static void Broadcast( int hue, bool ascii, string format, params object[] args ) { - Broadcast( hue, ascii, String.Format( format, args ) ); + Broadcast( hue, ascii, string.Format( format, args ) ); } private interface IEntityEntry { @@ -607,7 +607,7 @@ namespace Server { } private static void AppendSafetyLog( string action, IEntity entity ) { - string message = String.Format( "Warning: Attempted to {1} {2} during world save." + + string message = string.Format( "Warning: Attempted to {1} {2} during world save." + "{0}This action could cause inconsistent state." + "{0}It is strongly advised that the offending scripts be corrected.", Environment.NewLine,