當前位置: 首頁>>代碼示例>>C#>>正文


C# Guild.GuildMessage方法代碼示例

本文整理匯總了C#中Server.Guilds.Guild.GuildMessage方法的典型用法代碼示例。如果您正苦於以下問題:C# Guild.GuildMessage方法的具體用法?C# Guild.GuildMessage怎麽用?C# Guild.GuildMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Guilds.Guild的用法示例。


在下文中一共展示了Guild.GuildMessage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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.Alliance.InvalidateMemberProperties();
        }
開發者ID:Leodinas,項目名稱:uolite,代碼行數:12,代碼來源:Guild.cs

示例2: 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


注:本文中的Server.Guilds.Guild.GuildMessage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。