本文整理匯總了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();
}
示例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();
}