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

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

View file

@ -49,7 +49,7 @@ namespace Server.Engines.Chat
{
newValue = value.Trim();
if ( String.IsNullOrEmpty( newValue ) )
if ( string.IsNullOrEmpty( newValue ) )
newValue = null;
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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<Item> m_Levers;
private List<Item> 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; } */

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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