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


C# Guild.IsMember方法代码示例

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


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

示例1: BadMember

        public static bool BadMember(Mobile m, Guild g)
        {
            if (m.Deleted || g.Disbanded || (m.AccessLevel < AccessLevel.GameMaster && !g.IsMember(m)))
                return true;

            Item stone = g.Guildstone;

            return (stone == null || stone.Deleted || !m.InRange(stone.GetWorldLocation(), 2));
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:9,代码来源:GuildMenu.cs

示例2: GuildGump

		public GuildGump( Mobile beholder, Guild guild ) : base( 20, 30 )
		{
			m_Mobile = beholder;
			m_Guild = guild;

			Dragable = false;

			AddPage( 0 );
			AddBackground( 0, 0, 550, 400, 5054 );
			AddBackground( 10, 10, 530, 380, 3000 );

			AddHtml( 20, 15, 200, 35, guild.Name, false, false );

			Mobile leader = guild.Leader;

			if ( leader != null )
			{
				string leadTitle;

				if ( (leadTitle = leader.GuildTitle) != null && (leadTitle = leadTitle.Trim()).Length > 0 )
					leadTitle += ": ";
				else
					leadTitle = "";

				string leadName;

				if ( (leadName = leader.Name) == null || (leadName = leadName.Trim()).Length <= 0 )
					leadName = "(empty)";

				AddHtml( 220, 15, 250, 35, leadTitle + leadName, false, false );
			}

			AddButton( 20, 50, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 55, 50, 100, 20, 1013022, false, false ); // Loyal to

			Mobile fealty = beholder.GuildFealty;

			if ( fealty == null || !guild.IsMember( fealty ) )
				fealty = leader;

			if ( fealty == null )
				fealty = beholder;

			string fealtyName;

			if ( fealty == null || (fealtyName = fealty.Name) == null || (fealtyName = fealtyName.Trim()).Length <= 0 )
				fealtyName = "(empty)";

			if ( beholder == fealty )
				AddHtmlLocalized( 55, 70, 470, 20, 1018002, false, false ); // yourself
			else
				AddHtml( 55, 70, 470, 20, fealtyName, false, false );

			AddButton( 215, 50, 4005, 4007, 2, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 250, 50, 170, 20, 1013023, false, false ); // Display guild abbreviation
			AddHtmlLocalized( 250, 70, 50, 20, beholder.DisplayGuildTitle ? 1011262 : 1011263, false, false ); // on/off

			AddButton( 20, 100, 4005, 4007, 3, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 55, 100, 470, 30, 1011086, false, false ); // View the current roster.

			AddButton( 20, 130, 4005, 4007, 4, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 55, 130, 470, 30, 1011085, false, false ); // Recruit someone into the guild.

			if ( guild.Candidates.Count > 0 )
			{
				AddButton( 20, 160, 4005, 4007, 5, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 55, 160, 470, 30, 1011093, false, false ); // View list of candidates who have been sponsored to the guild.
			}
			else
			{
				AddImage( 20, 160, 4020 );
				AddHtmlLocalized( 55, 160, 470, 30, 1013031, false, false ); // There are currently no candidates for membership.
			}

			AddButton( 20, 220, 4005, 4007, 6, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 55, 220, 470, 30, 1011087, false, false ); // View the guild's charter.

			AddButton( 20, 250, 4005, 4007, 7, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 55, 250, 470, 30, 1011092, false, false ); // Resign from the guild.

			AddButton( 20, 280, 4005, 4007, 8, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 55, 280, 470, 30, 1011095, false, false ); // View list of guilds you are at war with.

			if ( beholder.AccessLevel >= AccessLevel.GameMaster || beholder == leader )
			{
				AddButton( 20, 310, 4005, 4007, 9, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 55, 310, 470, 30, 1011094, false, false ); // Access guildmaster functions.
			}
			else
			{
				AddImage( 20, 310, 4020 );
				AddHtmlLocalized( 55, 310, 470, 30, 1018013, false, false ); // Reserved for guildmaster
			}

			AddButton( 20, 360, 4005, 4007, 0, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 55, 360, 470, 30, 1011441, false, false ); // EXIT
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:97,代码来源:GuildGump.cs

示例3: IsMember

 public static bool IsMember(Mobile m, Guild g)
 {
     return !(m.Deleted || g.Disbanded || !(m is PlayerMobile) || (m.AccessLevel < AccessLevel.GameMaster && !g.IsMember(m)));
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:4,代码来源:BaseGuildGump.cs

示例4: LoyaltyCheck

        public string LoyaltyCheck(Mobile beholder, Guild guild)
        {
            Mobile fealty = beholder.GuildFealty;
            Mobile leader = guild.Leader;

            if (fealty == null || !guild.IsMember(fealty))
                fealty = leader;

            if (fealty == null)
                fealty = beholder;

            string fealtyName;

            if (fealty == null || (fealtyName = fealty.Name) == null || (fealtyName = fealtyName.Trim()).Length <= 0)
                return "(empty)";

            if (beholder == fealty)
                return "yourself";
            else
                return fealtyName;
        }
开发者ID:Godkong,项目名称:Origins,代码行数:21,代码来源:Guildstone.cs

示例5: validJoin

        public bool validJoin(Mobile from, Guild stoneGuild)
        {
            if (from == null || from.Deleted)
                return false;

            if (!from.InRange(GetWorldLocation(), 2))
            {
                from.SendMessage("The stone is not in range. Step closer to it.");
                return false;
            }

            if (stoneGuild.IsMember(from))
            {
                from.SendMessage(0x35, "You already joined Chaos via this stone, to resign say 'I resign from my guild'.");
                return false;
            }

            if (from.Guild != null)
            {
                from.SendMessage(0x35, "You are already member of a guild.");
                return false;
            }

            PlayerState joinerState = PlayerState.Find(from);
            if (joinerState != null)
            {
                from.SendMessage(0x35, "You cant join this guild as a faction member.");
                return false;
            }

            PlayerMobile mp_from = (PlayerMobile)from as PlayerMobile;
            if (mp_from.NpcGuild == NpcGuild.ThievesGuild)
            {
                from.SendMessage(0x35, "You cant join this gate as a member of the thieves guild.");
                return false;
            }

            return true;
        }
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:39,代码来源:OrderStone.cs

示例6: RosterGump


//.........这里部分代码省略.........

                        break;
                    }

                case 4:
                    {
                        FindText = FindText.ToLower();
                        int j2 = 0;
                        while ( j2 < m_List.Count )
                        {
                            if ( ( (Mobile) m_List[j2] ).Name.ToLower().IndexOf( FindText ) < 0 )
                                m_List.Remove( m_List[j2] );
                            else
                                j2++;
                        }

                        m_List.Sort( new ListNameSorter( updown ) );

                        break;
                    }
            }

            for ( int i = ( m_Page * 8 ), n = 0; i < m_List.Count && i < 8 + ( m_Page * 8 ); ++i, ++n )
            {
                Mobile m = (Mobile) m_List[i];

                AddButton( 40, 143 + ( n * 28 ), 0x4B9, 0x4BA, i + 1000, GumpButtonType.Reply, 0 );

                AddImageTiled( 65, 138 + ( n * 28 ), 140, 26, 0xA40 );
                AddImageTiled( 67, 140 + ( n * 28 ), 136, 22, 0xBBC );

                Mobile fealty = from.GuildFealty;

                if ( fealty == null || !guild.IsMember( fealty ) )
                    fealty = guild.Leader;

                GameClient ns = ( (Mobile) m_List[i] ).Client;

                string name;
                if ( ( name = m.Name ) != null && ( name = name.Trim() ).Length <= 0 )
                    name = "";

                if ( name == from.Name )
                {
                    if ( fealty == from && ( from != guild.Leader ) )
                        AddHtml( 70, 141 + ( n * 28 ), 130, 20, "<basefont color=#006600>" + name + " *</basefont>", false, false );
                    else
                        AddHtml( 70, 141 + ( n * 28 ), 130, 20, "<basefont color=#006600>" + name + "</basefont>", false, false );
                }
                if ( ns != null && ( m != from ) )
                {
                    if ( m == fealty && ( m != guild.Leader ) )
                        AddHtml( 70, 141 + ( n * 28 ), 130, 20, "<basefont color=#0000CC>" + name + " *</basefont>", false, false );
                    else
                        AddHtml( 70, 141 + ( n * 28 ), 130, 20, "<basefont color=#0000CC>" + name + "</basefont>", false, false );
                }
                if ( ns == null && ( m != from ) )
                {
                    if ( m == fealty && ( m != guild.Leader ) )
                        AddHtml( 70, 141 + ( n * 28 ), 130, 20, "" + name + " *", false, false );
                    else
                        AddHtml( 70, 141 + ( n * 28 ), 130, 20, name, false, false );
                }

                AddImageTiled( 207, 138 + ( ( n % 8 ) * 28 ), 90, 26, 0xA40 );
                AddImageTiled( 209, 140 + ( ( n % 8 ) * 28 ), 86, 22, 0xBBC );
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:67,代码来源:RosterGump.cs

示例7: GuildGump

		public GuildGump( Mobile beholder, Guild guild ) : base( 20, 30 )
		{
			m_Mobile = beholder;
			m_Guild = guild;

			Dragable = false;

			AddPage( 0 );
			AddBackground( 0, 0, 550, 420, 5054 );
			AddBackground( 10, 10, 530, 400, 3000 );

			AddHtml( 20, 15, 200, 35, guild.Name, false, false );

			Mobile leader = guild.Leader;

			if ( leader != null )
			{
				string leadTitle;

				if ( (leadTitle = leader.GuildTitle) != null && (leadTitle = leadTitle.Trim()).Length > 0 )
					leadTitle += ": ";
				else
					leadTitle = "";

				string leadName;

				if ( (leadName = leader.Name) == null || (leadName = leadName.Trim()).Length <= 0 )
					leadName = "(empty)";

				AddHtml( 220, 15, 250, 35, leadTitle + leadName, false, false );
			}

			AddButton( 20, 50, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			//AddHtmlLocalized( 55, 50, 100, 20, 1013022, false, false ); // Loyal to

			Mobile fealty = beholder.GuildFealty;

			//Pix: ensure that GuildFealty if set is a member of the guild - otherwise, null it.
			if (fealty != null)
			{
				if (!guild.IsMember(fealty))
				{
					beholder.GuildFealty = null;
					fealty = null;
				}
			}

			if (fealty == null)
			{
				fealty = beholder;
			}

			string fealtyName;

			if (fealty == null
				 || (fealtyName = fealty.Name) == null
				 || (fealtyName = fealtyName.Trim()).Length <= 0)
			{
				fealtyName = "(empty)";
			}

            if (beholder == fealty)
            {
                fealtyName = "Yourself";
            }

            AddHtml(55, 50, 300, 20, "Loyal to: " + fealtyName, false, false);
		    //AddHtml(55, 70, 470, 20, "Loyal to: " + fealtyName, false, false);

            int votesForMe = m_Guild.GetVotesFor(beholder);
            AddHtml(55, 70, 300, 20, "Votes for you: " + votesForMe.ToString(), false, false);


			AddButton( 215, 50, 4005, 4007, 2, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 250, 50, 170, 20, 1013023, false, false ); // Display guild abbreviation
			AddHtmlLocalized( 250, 70, 50, 20, beholder.DisplayGuildTitle ? 1011262 : 1011263, false, false ); // on/off

			AddButton( 20, 100, 4005, 4007, 3, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 55, 100, 470, 30, 1011086, false, false ); // View the current roster.

			if (m_Guild.IsNoCountingGuild)
			{
				AddHtml(320, 100, 470, 20, "Guildmembers cannot report murders.", false, false);
			}
			else
			{
				AddHtml(320, 100, 470, 20, "Guildmembers can report murders.", false, false);
			}



			AddButton( 20, 130, 4005, 4007, 4, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 55, 130, 470, 30, 1011085, false, false ); // Recruit someone into the guild.

			if ( guild.Candidates.Count > 0 )
			{
				AddButton( 20, 160, 4005, 4007, 5, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 55, 160, 470, 30, 1011093, false, false ); // View list of candidates who have been sponsored to the guild.
			}
			else
//.........这里部分代码省略.........
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:GuildGump.cs

示例8: GuildGump

        public GuildGump( Mobile beholder, Guild guild )
            : base(20, 30)
        {
            m_Mobile = beholder;
            m_Guild = guild;

            Dragable = true;

            AddPage( 0 );
            AddBackground(0, 0, 550, 400, 9270);
            //AddBackground(10, 10, 530, 380, 9270); // AddBackground(10, 10, 530, 380, 3000);

            AddHtml( 20, 15, 200, 35, "Guilda: " + guild.Name, false, false );

            Mobile leader = guild.Leader;

            if ( leader != null )
            {
                string leadTitle;

                if ( (leadTitle = leader.GuildTitle) != null && (leadTitle = leadTitle.Trim()).Length > 0 )
                    leadTitle += ": ";
                else
                    leadTitle = "";

                string leadName;

                if ( (leadName = leader.Name) == null || (leadName = leadName.Trim()).Length <= 0 )
                    leadName = "(empty)";

                AddHtml( 220, 15, 250, 35, leadTitle + leadName, false, false );
            }

            //AddButton( 20, 50, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            //AddHtml( 55, 50, 100, 20, "Leal a ", false, false ); // Loyal to

            Mobile fealty = beholder.GuildFealty;

            if ( fealty == null || !guild.IsMember( fealty ) )
                fealty = leader;

            if ( fealty == null )
                fealty = beholder;

            string fealtyName;

            if ( fealty == null || (fealtyName = fealty.Name) == null || (fealtyName = fealtyName.Trim()).Length <= 0 )
                fealtyName = "(empty)";

            //if ( beholder == fealty )
            //    AddHtmlLocalized( 55, 70, 470, 20, 1018002, false, false ); // yourself
            //else
            //    AddHtml( 55, 70, 470, 20, fealtyName, false, false );

            AddButton(20, 50, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtml(55, 50, 100, 20, "Leal a: " + fealtyName, false, false); // Loyal to

            AddButton( 215, 50, 4005, 4007, 2, GumpButtonType.Reply, 0 );
            //AddHtmlLocalized( 250, 50, 170, 20, 1013023, false, false ); // Display guild abbreviation
            //AddHtmlLocalized( 250, 70, 50, 20, beholder.DisplayGuildTitle ? 1011262 : 1011263, false, false ); // on/off
            AddHtml(250, 50, 170, 20, "Exibir Tag da Guilda: " + (beholder.DisplayGuildTitle ? "Sim" : "Não"), false, false); // Display guild abbreviation
            //AddHtml(250, 70, 50, 20, beholder.DisplayGuildTitle ? "Sim" : "Não", false, false); // on/off

            AddButton( 20, 100, 4005, 4007, 3, GumpButtonType.Reply, 0 );
            //AddHtmlLocalized( 55, 100, 470, 30, 1011086, false, false ); // View the current roster.
            AddHtml(55, 100, 470, 30, "Exibir Lista de membros", false, false); // View the current roster.

            AddButton( 20, 130, 4005, 4007, 4, GumpButtonType.Reply, 0 );
            //AddHtmlLocalized( 55, 130, 470, 30, 1011085, false, false ); // Recruit someone into the guild.
            AddHtml(55, 130, 470, 30, "Recrutar Alguém para a Guilda", false, false); // Recruit someone into the guild.

            if ( guild.Candidates.Count > 0 )
            {
                AddButton( 20, 160, 4005, 4007, 5, GumpButtonType.Reply, 0 );
                //AddHtmlLocalized( 55, 160, 470, 30, 1011093, false, false ); // View list of candidates who have been sponsored to the guild.
                AddHtml(55, 160, 470, 30, "Exibir Lista de Candidatos Inscritos para Guilda", false, false); // View list of candidates who have been sponsored to the guild.
            }
            else
            {
                AddImage( 20, 160, 4020 );
                //AddHtmlLocalized( 55, 160, 470, 30, 1013031, false, false ); // There are currently no candidates for membership.
                AddHtml(55, 160, 470, 30, "Não Existem Candidatos para Guilda", false, false); // There are currently no candidates for membership.
            }

            //AddButton( 20, 220, 4005, 4007, 6, GumpButtonType.Reply, 0 );
            ////AddHtmlLocalized( 55, 220, 470, 30, 1011087, false, false ); // View the guild's charter.
            //AddHtml(55, 220, 470, 30, "Exibir Patente da Guilda", false, false); // View the guild's charter.

            AddButton( 20, 250, 4005, 4007, 7, GumpButtonType.Reply, 0 );
            //AddHtmlLocalized( 55, 250, 470, 30, 1011092, false, false ); // Resign from the guild.
            AddHtml(55, 250, 470, 30, "Renunciar Guilda", false, false); // Resign from the guild.

            AddButton( 20, 280, 4005, 4007, 8, GumpButtonType.Reply, 0 );
            //AddHtmlLocalized( 55, 280, 470, 30, 1011095, false, false ); // View list of guilds you are at war with.
            AddHtml(55, 280, 470, 30, "Exibir Lista de Guildas em Guerra", false, false); // View list of guilds you are at war with.

            if ( beholder.AccessLevel >= AccessLevel.GameMaster || beholder == leader )
            {
                AddButton( 20, 310, 4005, 4007, 9, GumpButtonType.Reply, 0 );
                //AddHtmlLocalized( 55, 310, 470, 30, 1011094, false, false ); // Access guildmaster functions.
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:101,代码来源:GuildGump.cs


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