Replaces types with built-in types.
This commit is contained in:
parent
fee83ce560
commit
22ab83ea9e
98 changed files with 248 additions and 248 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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() ) );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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] );
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue