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

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

public CheckLeader ( ) : void
Результат void
		public void CheckLeader()
		{
			if( m_Leader == null || m_Leader.Disbanded )
			{
				CalculateAllianceLeader();

				if( m_Leader == null )
					Disband();
			}
		}

Usage Example

Пример #1
0
		private void VerifyGuild_Callback()
		{
			if ((!NewGuildSystem && m_Guildstone == null) || m_Members.Count == 0)
			{
				Disband();
			}

			CheckExpiredWars();

			AllianceInfo alliance = Alliance;

			if (alliance != null)
			{
				alliance.CheckLeader();
			}

			alliance = Alliance; //CheckLeader could possibly change the value of this.Alliance

			if (alliance != null && !alliance.IsMember(this) && !alliance.IsPendingMember(this))
				//This block is there to fix a bug in the code in an older version.  
			{
				Alliance = null;
					//Will call Alliance.RemoveGuild which will set it null & perform all the pertient checks as far as alliacne disbanding
			}
		}