public MoongateGump( Mobile mobile, Item moongate ) : base( 100, 100 )
{
m_Mobile = mobile;
m_Moongate = moongate;
PMList[] checkLists;
if ( mobile.Player )
{
if ( Factions.Sigil.ExistsOn( mobile ) )
{
checkLists = PMList.SigilLists;
}
else if ( mobile.Kills >= 5 )
{
checkLists = PMList.RedLists;
}
else
{
int flags = mobile.NetState == null ? 0 : mobile.NetState.Flags;
bool young = mobile is PlayerMobile ? ((PlayerMobile)mobile).Young : false;
//Do the following below here
/*if ( Core.SE && (flags & 0x10) != 0 )
checkLists = young ? PMList.SEListsYoung : PMList.SELists;
else if ( Core.AOS && (flags & 0x8) != 0 )
checkLists = young ? PMList.AOSListsYoung : PMList.AOSLists;
else if ( (flags & 0x4) != 0 )
checkLists = young ? PMList.LBRListsYoung : PMList.LBRLists;
else*/
checkLists = young ? PMList.UORListsYoung : PMList.UORLists;
}
}
else
{
checkLists = PMList.SELists;
}
m_Lists = new PMList[checkLists.Length];
for ( int i = 0; i < m_Lists.Length; ++i )
m_Lists[i] = checkLists[i];
for ( int i = 0; i < m_Lists.Length; ++i )
{
if ( m_Lists[i].Map == mobile.Map )
{
PMList temp = m_Lists[i];
m_Lists[i] = m_Lists[0];
m_Lists[0] = temp;
break;
}
}
AddPage( 0 );
AddBackground( 0, 0, 380, 280, 5054 );
AddButton( 10, 210, 4005, 4007, 1, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 45, 210, 140, 25, 1011036, false, false ); // OKAY
AddButton( 10, 235, 4005, 4007, 0, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 45, 235, 140, 25, 1011012, false, false ); // CANCEL
AddHtmlLocalized( 5, 5, 200, 20, 1012011, false, false ); // Pick your destination:
for ( int i = 0; i < checkLists.Length; ++i )
{
AddButton( 10, 35 + (i * 25), 2117, 2118, 0, GumpButtonType.Page, Array.IndexOf( m_Lists, checkLists[i] ) + 1 );
AddHtmlLocalized( 30, 35 + (i * 25), 150, 20, checkLists[i].Number, false, false );
}
for ( int i = 0; i < m_Lists.Length; ++i )
RenderPage( i, Array.IndexOf( checkLists, m_Lists[i] ) );
}