Fixes casting checks

This commit is contained in:
Kamron Batman 2018-08-19 01:38:55 +08:00
parent 7ea00fbf4f
commit 03dd5f1926
431 changed files with 5616 additions and 6250 deletions

View file

@ -38,12 +38,12 @@ namespace Server.Guilds
base.PopulateGump();
List<T> list = m_List;
if( WillFilter )
if ( WillFilter )
{
m_List = new List<T>();
for( int i = 0; i < list.Count; i++ )
{
if( !IsFiltered( list[i], m_Filter ) )
if ( !IsFiltered( list[i], m_Filter ) )
m_List.Add( list[i] );
}
}
@ -79,12 +79,12 @@ namespace Server.Guilds
width += (f.Width + 12);
}
if( m_StartNumber <= 0 )
if ( m_StartNumber <= 0 )
AddButton( 65, 80, 0x15E3, 0x15E7, 0, GumpButtonType.Page, 0 );
else
AddButton( 65, 80, 0x15E3, 0x15E7, 6, GumpButtonType.Reply, 0 ); // Back
if( m_StartNumber + itemsPerPage > m_List.Count )
if ( m_StartNumber + itemsPerPage > m_List.Count )
AddButton( 95, 80, 0x15E1, 0x15E5, 0, GumpButtonType.Page, 0 );
else
AddButton( 95, 80, 0x15E1, 0x15E5, 7, GumpButtonType.Reply, 0 ); // Forward
@ -93,7 +93,7 @@ namespace Server.Guilds
int itemNumber = 0;
if( m_Ascending )
if ( m_Ascending )
for( int i = m_StartNumber; i < m_StartNumber + itemsPerPage && i < m_List.Count; i++ )
DrawEntry( m_List[i], i, itemNumber++ );
else //descending, go from bottom of list to the top
@ -126,7 +126,7 @@ namespace Server.Guilds
width += (f.Width + 12);
}
if( HasRelationship( o ) )
if ( HasRelationship( o ) )
AddButton( 40, 143 + itemNumber * 28, 0x8AF, 0x8AF, 200 + index, GumpButtonType.Reply, 0 ); //Info Button
else
AddButton( 40, 143 + itemNumber * 28, 0x4B9, 0x4BA, 200 + index, GumpButtonType.Reply, 0 ); //Info Button
@ -141,7 +141,7 @@ namespace Server.Guilds
PlayerMobile pm = sender.Mobile as PlayerMobile;
if( pm == null || !IsMember( pm, guild ) )
if ( pm == null || !IsMember( pm, guild ) )
return;
int id = info.ButtonID;
@ -166,16 +166,16 @@ namespace Server.Guilds
}
}
if( id >= 100 && id < (100 + m_Fields.Length) )
if ( id >= 100 && id < (100 + m_Fields.Length) )
{
IComparer<T> comparer = m_Fields[id-100].Comparer;
if( m_Comparer.GetType() == comparer.GetType() )
if ( m_Comparer.GetType() == comparer.GetType() )
m_Ascending = !m_Ascending;
pm.SendGump( GetResentGump( player, guild, comparer, m_Ascending, m_Filter, 0 ) );
}
else if( id >= 200 && id < ( 200 + m_List.Count ) )
else if ( id >= 200 && id < ( 200 + m_List.Count ) )
{
pm.SendGump( GetObjectInfoGump( player, guild, m_List[id - 200] ) );
}