Replaces types with built-in types.

This commit is contained in:
Kamron Batman 2018-09-14 13:22:16 -07:00
parent fee83ce560
commit 22ab83ea9e
98 changed files with 248 additions and 248 deletions

View file

@ -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 ) );
}
}

View file

@ -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

View file

@ -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 );

View file

@ -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;

View file

@ -97,7 +97,7 @@ namespace Server.Items
}
if ( m_Dipper != null )
m_Dipper = String.Intern( m_Dipper );
m_Dipper = string.Intern( m_Dipper );
}
}
}

View file

@ -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 )

View file

@ -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;
}
}

View file

@ -88,7 +88,7 @@ namespace Server
{
string type = element.GetAttribute( "type" );
if ( String.IsNullOrEmpty( type ) )
if ( string.IsNullOrEmpty( type ) )
continue;
try

View file

@ -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;
}

View file

@ -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 );
}
/// <summary>

View file

@ -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( "<a href=\"{0}\">{0}</a>", m.Groups[2].Value );
return string.Format( "<a href=\"{0}\">{0}</a>", m.Groups[2].Value );
}
return m.Value;

View file

@ -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}\"";

View file

@ -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;

View file

@ -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)
{