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


C# Guild.InvalidateMemberProperties方法代码示例

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


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

示例1: RemoveGuild

        public void RemoveGuild( Guild g )
        {
            if( m_PendingMembers.Contains( g ) )
            {
                m_PendingMembers.Remove( g );
            }

            if( m_Members.Contains( g ) )	//Sanity, just incase someone with a custom script adds a character to BOTH arrays
            {
                m_Members.Remove( g );
                g.InvalidateMemberProperties();

                g.GuildMessage( 1070763, this.Name ); // Your Guild has been removed from the ~1_ALLIANCENAME~ Alliance.
                AllianceMessage( 1070764, g.Name ); // A Guild has left your Alliance: ~1_GUILDNAME~
            }

            //g.Alliance = null;	//NO G.Alliance call here.  Set the Guild's Alliance to null, if you JUST use RemoveGuild, it removes it from the alliance, but doesn't remove the link from the guild to the alliance.  setting g.Alliance will call this method.
            //to check on OSI: have 3 guilds, make 2 of them a member, one pending.  remove one of the memebers.  alliance still exist?
            //ANSWER: NO

            if( g == m_Leader )
            {
                CalculateAllianceLeader();

                /*
                if( m_Leader == null ) //only when m_members.count < 2
                    Disband();
                else
                    AllianceMessage( 1070765, m_Leader.Name ); // Your Alliance is now led by ~1_GUILDNAME~
                */
            }

            if( m_Members.Count < 2 )
                Disband();
        }
开发者ID:Leodinas,项目名称:uolite,代码行数:35,代码来源:Guild.cs

示例2: TurnToMember

        public void TurnToMember( Guild g )
        {
            if( g.Alliance != this || !m_PendingMembers.Contains( g ) || m_Members.Contains( g ) )
                return;

            g.GuildMessage( 1070760, this.Name ); // Your Guild has joined the ~1_ALLIANCENAME~ Alliance.
            AllianceMessage( 1070761, g.Name ); // A new Guild has joined your Alliance: ~1_GUILDNAME~

            m_PendingMembers.Remove( g );
            m_Members.Add( g );
            g.InvalidateMemberProperties();
        }
开发者ID:greeduomacro,项目名称:divinity,代码行数:12,代码来源:Guild.cs


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