예제 #1
0
 public OrganizationGump( PlayerMobile from, CustomGuildStone guild, int currentNav, int navScroll, int currentMain, int mainScroll, 
     GuildRankInfo rank, PlayerMobile member)
     : base(0, 0)
 {
     InitialSetup( from, guild, currentNav, navScroll, currentMain, mainScroll, rank, member );
     AddNavigation();
     AddMain();
 }
예제 #2
0
 public static void Serialize( GenericWriter writer, GuildRankInfo info )
 {
     writer.Write( (int) 3 ); // version
     writer.Write( (string) info.Name );
     writer.Write( (int) info.Rank );
     writer.Write( (int) info.Fee );
     writer.Write( (int) info.Pay );
     writer.Write( (string) info.Title );
     writer.Write( (string) info.Prefix );
     writer.Write( (bool) info.IsOfficer );
     writer.Write( (bool) info.IsMilitary );
     writer.Write( (bool) info.IsEconomic );
 }
예제 #3
0
        //For governments using the IsMilitary boolean and IsEconomic boolean.
        public void TryToEditRank( PlayerMobile m, GuildRankInfo rank, string name, string title, string prefix, string pay, string fee, string isOfficer, string isMilitary, string isEconomic )
        {
            if (!IsGuildLeader(m, this, true))
                return;

            if (!Ranks.ContainsKey(rank.Rank))
                return;

            int payVal = 0;
            int feeVal = 0;

            if (!ValidateString(m, name, "Name"))
                return;

            if (!ValidateString(m, pay, "Pay") || !ValidateInt(m, pay, "Pay", ref payVal))
                return;

            if (!ValidateString(m, fee, "Fee") || !ValidateInt(m, fee, "Fee", ref feeVal))
                return;

            if (!ValidateString(m, isOfficer, "Is Officer?") || !ValidateQuestion(m, isOfficer, "Is Officer?"))
                return;

            if (!ValidateString(m, isMilitary, "Is Military?") || !ValidateQuestion(m, isMilitary, "Is Military?"))
                return;

            if (!ValidateString(m, isEconomic, "Is Economic?") || !ValidateQuestion(m, isEconomic, "Is Economic?"))
                return;

            rank.Name = name;
            rank.Title = title;
            rank.Prefix = prefix;
            rank.Pay = payVal;
            rank.Fee = feeVal;
            rank.IsOfficer = isOfficer == "Yes" ? true : false;
            rank.IsMilitary = isMilitary == "Yes" ? true : false;
            rank.IsEconomic = isEconomic == "Yes" ? true : false;
            UpdateTitles( rank.Rank );
        }
예제 #4
0
        public void TryToAddRank( int rank, GuildRankInfo info )
        {
            if( m_Ranks.ContainsKey(rank) )
              				Console.WriteLine( "Duplicated key \"" + rank.ToString() + "\" on Guildstone \"" + Serial.ToString() + "\"." );

              			else
              				m_Ranks.Add( rank, info );
        }
예제 #5
0
 public GovernmentGump( PlayerMobile from, CustomGuildStone gov, int currentNav, int navScroll, int currentMain, int mainScroll,
                         GuildRankInfo rank, PlayerMobile member )
     : base(from, gov, currentNav, navScroll, currentMain, mainScroll, rank, member)
 {
 }
예제 #6
0
        public virtual void InitialSetup( PlayerMobile from, CustomGuildStone guild, int currentNav, int navScroll, int currentMain, int mainScroll, 
            GuildRankInfo rank, PlayerMobile member)
        {
            Closable = true;
            Disposable = true;
            Dragable = true;
            Resizable = false;
            m_Guild = guild;
            m_CurrentNav = currentNav;
            m_NavScroll = navScroll;
            m_CurrentMain = currentMain;
            m_MainScroll = mainScroll;
            m_Rank = rank;
            m_Member = member;
            m_ItemsPerPage = 9;
            m_Start = m_ItemsPerPage * m_NavScroll;
            m_Y = 228;
            m_LineHeight = 28;
            m_Viewer = from;
            m_Viewer.CloseGump( typeof(OrganizationGump) );
            AddPage( 0 );
            AddBackground( 64, 114, 671, 55, 9270 );
            AddLabel( 215, 132, 2010, @"Khaeros'   Government   and   Private   Organization   System" );
            AddBackground( 64, 169, 203, 338, 9270 );
            AddBackground( 267, 169, 468, 338, 9270 );
            AddBackground( 283, 185, 435, 305, 3500 );
            AddBackground( 80, 185, 170, 305, 3500 );
            AddBackground( 64, 507, 671, 55, 9270 );
            AddImage( 703, 61, 10441 );
            AddImage( 16, 61, 10440 );

            if( m_Guild != null && !String.IsNullOrEmpty(m_Guild.Name) )
                AddLabel( 82, 525, 2010, "Organization:   " + m_Guild.Name.Replace(" ", "   ") );
        }