当前位置: 首页>>代码示例>>C#>>正文


C# Guild.IsMember方法代码示例

本文整理汇总了C#中Guild.IsMember方法的典型用法代码示例。如果您正苦于以下问题:C# Guild.IsMember方法的具体用法?C# Guild.IsMember怎么用?C# Guild.IsMember使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Guild的用法示例。


在下文中一共展示了Guild.IsMember方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RosterMiscGump

        public RosterMiscGump( Mobile from, Mobile target, Guild guild, bool newleader )
            : base(10, 40)
        {
            /* Assignations */
            m_Mobile = from;
            m_Guild = from.Guild as Guild;
            m_Target = target;
            m_NewLeader = newleader;

            /* Declarations */
            int t_Rank = ( m_Target as PlayerMobile ).GuildRank;

            Mobile fealty = from.GuildFealty;
            if ( fealty == null || !guild.IsMember( fealty ) )
                fealty = m_Guild.Leader;

            bool selfmember = ( fealty == target ) && ( target != m_Guild.Leader );

            string name;
            if ( ( name = target.Name ) != null && ( name = name.Trim() ).Length <= 0 )
                name = "";
            if ( selfmember )
                name = name + " *";

            string title;
            if ( ( title = target.GuildTitle ) != null && ( title = title.Trim() ).Length <= 0 )
                title = "";

            /* Intern Strings */
            /*0*/
            Intern( "Unknown Name" );
            /*1*/
            Intern( "None" );
            /*2*/
            Intern( name );
            /*3*/
            Intern( title );

            /* Build Gump */
            AddPage( 0 );

            AddBackground( 0, 0, 350, 255, 0x242C );
            AddHtmlLocalized( 20, 15, 310, 26, 1063018, false, false );
            AddImageTiled( 20, 40, 310, 2, 0x2711 );

            AddHtmlLocalized( 20, 50, 150, 26, 1062955, true, false );
            AddHtmlIntern( 180, 53, 150, 26, 2, false, false );

            AddHtmlLocalized( 20, 80, 150, 26, 1062956, true, false );

            if ( target != null )
            {
                if ( t_Rank == 5 )
                    AddHtmlLocalized( 180, 83, 150, 26, 1062959, false, false ); // Guild Leader
                else if ( t_Rank == 4 )
                    AddHtmlLocalized( 180, 83, 150, 26, 1062960, false, false ); // Warlord
                else if ( t_Rank == 3 )
                    AddHtmlLocalized( 180, 83, 150, 26, 1062961, false, false ); // Emissary
                else if ( t_Rank == 2 )
                    AddHtmlLocalized( 180, 83, 150, 26, 1062962, false, false ); // Member
                else
                    AddHtmlLocalized( 180, 83, 150, 26, 1062963, false, false ); // Ronin
            }

            AddHtmlLocalized( 20, 110, 150, 26, 1062953, true, false );
            AddHtmlIntern( 180, 113, 150, 26, 3, false, false );

            AddImageTiled( 20, 142, 310, 2, 0x2711 );

            AddBackground( 20, 150, 310, 26, 0x2486 );
            if ( selfmember )
            {
                AddButton( 25, 155, 0x845, 0x846, 103, GumpButtonType.Reply, 0 );
                AddHtmlLocalized( 50, 153, 270, 26, 1063082, false, false );
            }
            else
            {
                AddButton( 25, 155, 0x845, 0x846, 103, GumpButtonType.Reply, 0 );
                AddHtmlLocalized( 50, 153, 270, 26, 1062996, false, false ); // Cast Vote for This Member
            }

            AddBackground( 20, 180, 150, 26, 0x2486 );
            AddButton( 25, 185, 0x845, 0x846, newleader ? 105 : 100, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 50, 183, 110, 26, 1062993, newleader ? 0x6400 : 0x0, false, false ); // Promote

            AddBackground( 180, 180, 150, 26, 0x2486 );
            AddButton( 185, 185, 0x845, 0x846, 102, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 210, 183, 110, 26, 1062995, false, false ); // Set Guild Title

            AddBackground( 20, 210, 150, 26, 0x2486 );
            AddButton( 25, 215, 0x845, 0x846, 101, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 50, 213, 110, 26, 1062994, false, false ); // Demote

            AddBackground( 180, 210, 150, 26, 0x2486 );
            AddButton( 185, 215, 0x845, 0x846, 104, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 210, 213, 110, 26, 1062997, false, false ); // Kick Member

            //AddMasterGump( 725 );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:99,代码来源:RosterMiscGump.cs


注:本文中的Guild.IsMember方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。