- Improved TextDefinition formatting for staff use (props gump, set gump, get command).
- Improved parsing of TextDefinition from string.
This commit is contained in:
parent
a0e13d5007
commit
2f06b89f8f
4 changed files with 49 additions and 4 deletions
|
|
@ -317,6 +317,8 @@ namespace Server.Commands
|
|||
toString = String.Format( "'{0}' ({1} [0x{1:X}])", value, (int) value );
|
||||
else if ( IsString( type ) )
|
||||
toString = ( (string) value == "null" ? @"@""null""" : String.Format( "\"{0}\"", value ) );
|
||||
else if ( IsText( type ) )
|
||||
toString = ( (TextDefinition) value ).Format( false );
|
||||
else
|
||||
toString = value.ToString();
|
||||
|
||||
|
|
@ -377,6 +379,13 @@ namespace Server.Commands
|
|||
return ( t == typeofString );
|
||||
}
|
||||
|
||||
private static Type typeofText = typeof( TextDefinition );
|
||||
|
||||
private static bool IsText( Type t )
|
||||
{
|
||||
return ( t == typeofText );
|
||||
}
|
||||
|
||||
private static bool IsEnum( Type t )
|
||||
{
|
||||
return t.IsEnum;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue