Server.Guilds.AllianceInfo.RemoveGuild C# (CSharp) Метод

RemoveGuild() публичный Метод

public RemoveGuild ( Guild g ) : void
g Guild
Результат void
		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();
		}