general cleanup, fixed a slightly improbably crash issue
This commit is contained in:
parent
6780b3c2e7
commit
b9e3476d8b
26 changed files with 62 additions and 67 deletions
|
|
@ -515,7 +515,7 @@ namespace Server.Gumps
|
|||
{
|
||||
if ( m_List == null )
|
||||
{
|
||||
m_List = new ArrayList( (ICollection)NetState.Instances );
|
||||
m_List = new ArrayList( NetState.Instances );
|
||||
m_List.Sort( NetStateComparer.Instance );
|
||||
}
|
||||
|
||||
|
|
@ -1119,7 +1119,7 @@ namespace Server.Gumps
|
|||
|
||||
AccountComment c = a.Comments[i];
|
||||
|
||||
sb.AppendFormat( "[{0} on {1}]<BR>{2}", c.AddedBy, c.LastModified,c.Content );
|
||||
sb.AppendFormat( "[{0} on {1}]<BR>{2}", c.AddedBy, c.LastModified, c.Content );
|
||||
}
|
||||
|
||||
AddHtml( 20, 180, 380, 190, sb.ToString(), true, true );
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ using Server;
|
|||
using Server.Accounting;
|
||||
using Server.Network;
|
||||
using Server.Targets;
|
||||
using Server.Gumps;
|
||||
using Server.Commands;
|
||||
using Server.Commands.Generic;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -134,7 +134,6 @@ namespace Server.Gumps
|
|||
toSet = TimeSpan.Zero;
|
||||
}
|
||||
|
||||
|
||||
shouldSet = shouldSend = successfulParse;
|
||||
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
|
||||
|
|
@ -186,7 +185,7 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
|
||||
if( m_FromSacrifice && !from.Criminal && from is PlayerMobile )
|
||||
if( m_FromSacrifice && from is PlayerMobile )
|
||||
{
|
||||
((PlayerMobile)from).AvailableResurrects -= 1;
|
||||
|
||||
|
|
@ -237,7 +236,6 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if( from.Alive && m_HitsScalar > 0 )
|
||||
from.Hits = (int)(from.HitsMax * m_HitsScalar);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue