Replaces types with built-in types.
This commit is contained in:
parent
fee83ce560
commit
22ab83ea9e
98 changed files with 248 additions and 248 deletions
|
|
@ -223,15 +223,15 @@ namespace Server.Misc
|
|||
return ( IPTable[ip] < MaxAccountsPerIP );
|
||||
}
|
||||
|
||||
private static Dictionary<IPAddress, Int32> m_IPTable;
|
||||
private static Dictionary<IPAddress, int> m_IPTable;
|
||||
|
||||
public static Dictionary<IPAddress, Int32> IPTable
|
||||
public static Dictionary<IPAddress, int> IPTable
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_IPTable == null )
|
||||
{
|
||||
m_IPTable = new Dictionary<IPAddress, Int32>();
|
||||
m_IPTable = new Dictionary<IPAddress, int>();
|
||||
|
||||
foreach ( Account a in Accounts.GetAccounts() )
|
||||
if ( a.LoginIPs.Length > 0 )
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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}"(<x value>, <y value>, <z value>)"" }
|
||||
|
|
@ -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" ) )
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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." ) )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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} " +
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace Server.Engines.Chat
|
|||
{
|
||||
newValue = value.Trim();
|
||||
|
||||
if ( String.IsNullOrEmpty( newValue ) )
|
||||
if ( string.IsNullOrEmpty( newValue ) )
|
||||
newValue = null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) );
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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" ) );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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" );
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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; } */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
||||
|
|
|
|||
|
|
@ -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~
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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})");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -2323,7 +2323,7 @@ namespace Server.Gumps
|
|||
break;
|
||||
|
||||
if ( rads.Count > 0 )
|
||||
from.SendGump( new WarningGump( 1060635, 30720, String.Format( "You are about to <em><basefont color=red>permanently delete</basefont></em> {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.<br><br>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 <em><basefont color=red>permanently delete</basefont></em> {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.<br><br>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 } ) );
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ namespace Server.Items
|
|||
1041361,
|
||||
"",
|
||||
AffixType.Append,
|
||||
String.Concat(" ", m_Worth.ToString()),
|
||||
string.Concat(" ", m_Worth.ToString()),
|
||||
"")); // A bank check:
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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( "<basefont color=#FFFFFF>Scroll of Alacrity:</basefont>" );
|
||||
public override string DefaultTitle => string.Format( "<basefont color=#FFFFFF>Scroll of Alacrity:</basefont>" );
|
||||
|
||||
public ScrollofAlacrity() : this( SkillName.Alchemy )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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~
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ) ); */
|
||||
|
|
|
|||
|
|
@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
if ( m_Dipper != null )
|
||||
m_Dipper = String.Intern( m_Dipper );
|
||||
m_Dipper = string.Intern( m_Dipper );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ namespace Server
|
|||
{
|
||||
string type = element.GetAttribute( "type" );
|
||||
|
||||
if ( String.IsNullOrEmpty( type ) )
|
||||
if ( string.IsNullOrEmpty( type ) )
|
||||
continue;
|
||||
|
||||
try
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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}\"";
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<BankCheck>();
|
||||
|
||||
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<Gold>().Aggregate(0L, (c, t) => c + t.Amount);
|
||||
if (balance >= Int32.MaxValue) { return Int32.MaxValue; }
|
||||
if (balance >= int.MaxValue) { return int.MaxValue; }
|
||||
balance += checks.OfType<BankCheck>().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)
|
||||
|
|
|
|||
|
|
@ -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<String>(), ts );
|
||||
from.Prompt = new TownCrierLinesPrompt( m_Owner, null, new List<string>(), ts );
|
||||
}
|
||||
|
||||
public override void OnCancel( Mobile from )
|
||||
|
|
@ -167,10 +167,10 @@ namespace Server.Mobiles
|
|||
{
|
||||
private ITownCrierEntryList m_Owner;
|
||||
private TownCrierEntry m_Entry;
|
||||
private List<String> m_Lines;
|
||||
private List<string> m_Lines;
|
||||
private TimeSpan m_Duration;
|
||||
|
||||
public TownCrierLinesPrompt( ITownCrierEntryList owner, TownCrierEntry entry, List<String> lines, TimeSpan duration )
|
||||
public TownCrierLinesPrompt( ITownCrierEntryList owner, TownCrierEntry entry, List<string> 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<String>(), ts );
|
||||
m_From.Prompt = new TownCrierLinesPrompt( m_Owner, tce, new List<string>(), ts );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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 - <br>Seller's Description:<br>"~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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ namespace Server.Regions
|
|||
}
|
||||
}
|
||||
|
||||
private static List<Int32> m_SpawnBuffer1 = new List<Int32>();
|
||||
private static List<int> m_SpawnBuffer1 = new List<int>();
|
||||
private static List<Item> m_SpawnBuffer2 = new List<Item>();
|
||||
|
||||
public Point3D RandomSpawnLocation( int spawnHeight, bool land, bool water, Point3D home, int range )
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ namespace Server.Spells
|
|||
|
||||
public static void ClearAllMoves( Mobile m )
|
||||
{
|
||||
foreach ( KeyValuePair<Int32, SpecialMove> kvp in SpellRegistry.SpecialMoves )
|
||||
foreach ( KeyValuePair<int, SpecialMove> kvp in SpellRegistry.SpecialMoves )
|
||||
{
|
||||
int moveID = kvp.Key;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ namespace Server.Spells
|
|||
}
|
||||
}
|
||||
|
||||
private static Dictionary<Type, Int32> m_IDsFromTypes = new Dictionary<Type, Int32>( m_Types.Length );
|
||||
private static Dictionary<Type, int> m_IDsFromTypes = new Dictionary<Type, int>( m_Types.Length );
|
||||
|
||||
private static Dictionary<Int32, SpecialMove> m_SpecialMoves = new Dictionary<Int32, SpecialMove>();
|
||||
public static Dictionary<Int32, SpecialMove> SpecialMoves => m_SpecialMoves;
|
||||
private static Dictionary<int, SpecialMove> m_SpecialMoves = new Dictionary<int, SpecialMove>();
|
||||
public static Dictionary<int, SpecialMove> SpecialMoves => m_SpecialMoves;
|
||||
|
||||
public static int GetRegistryNumber( ISpell s )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 ) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,9 +103,9 @@ namespace Server.Spells.Fourth
|
|||
FinishSequence();
|
||||
}
|
||||
|
||||
private static Dictionary<Mobile, Int32> _Table = new Dictionary<Mobile, Int32>();
|
||||
private static Dictionary<Mobile, int> _Table = new Dictionary<Mobile, int>();
|
||||
|
||||
private static void AddEntry( Mobile m, Int32 v )
|
||||
private static void AddEntry( Mobile m, int v )
|
||||
{
|
||||
_Table[m] = v;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue