general cleanup, fixed a slightly improbably crash issue

This commit is contained in:
mark 2007-08-12 07:19:44 +00:00
parent 6780b3c2e7
commit b9e3476d8b
26 changed files with 62 additions and 67 deletions

View file

@ -235,7 +235,7 @@ namespace Server.Gumps
{
Mobile from = state.Mobile;
if ( !Server.Commands.Generic.BaseCommand.IsAccessible( from, m_Object ) )
if ( !BaseCommand.IsAccessible( from, m_Object ) )
{
from.SendMessage( "You may no longer access their properties." );
return;
@ -315,10 +315,12 @@ namespace Server.Gumps
}
else if( HasAttribute( type, typeofPropertyObject, true ) )
{
object o = prop.GetValue( m_Object, null );
if( o != null )
from.SendGump( new PropertiesGump( from, o, m_Stack, new StackEntry( m_Object, prop ) ) );
object obj = prop.GetValue( m_Object, null );
if ( obj != null )
from.SendGump( new PropertiesGump( from, obj, m_Stack, new StackEntry( m_Object, prop ) ) );
else
from.SendGump( new PropertiesGump( from, m_Object, m_Stack, m_List, m_Page ) );
}
}
@ -489,7 +491,7 @@ namespace Server.Gumps
}
else if ( o is Item )
{
return String.Format( "(I) 0x{0:X}", ((Item)o).Serial.Value );
return String.Format( "(I) 0x{0:X}", ((Item)o).Serial );
}
else if ( o is Type )
{
@ -671,7 +673,7 @@ namespace Server.Gumps
}
else if ( o is Item )
{
return String.Format( "(I) 0x{0:X}", ((Item)o).Serial.Value );
return String.Format( "(I) 0x{0:X}", ((Item)o).Serial );
}
else if ( o is Type )
{

View file

@ -267,7 +267,7 @@ namespace Server.Gumps
if ( obj == null )
m_Mobile.SendMessage( "The property is null and so you cannot view its properties." );
else if ( !Server.Commands.Generic.BaseCommand.IsAccessible( m_Mobile, obj ) )
else if ( !BaseCommand.IsAccessible( m_Mobile, obj ) )
m_Mobile.SendMessage( "You may not view their properties." );
else
viewProps = obj;

View file

@ -134,7 +134,6 @@ namespace Server.Gumps
toSet = TimeSpan.Zero;
}
shouldSet = shouldSend = successfulParse;
break;