Server.Multis.BaseHouse.HandleDeletion C# (CSharp) Méthode

HandleDeletion() public static méthode

public static HandleDeletion ( Server.Mobile mob ) : void
mob Server.Mobile
Résultat void
		public static void HandleDeletion( Mobile mob )
		{
			List<BaseHouse> houses = GetHouses( mob );

			if ( houses.Count == 0 )
				return;

			Account acct = mob.Account as Account;
			Mobile trans = null;

			for ( int i = 0; i < acct.Length; ++i )
			{
				if ( acct[i] != null && acct[i] != mob )
					trans = acct[i];
			}

			for ( int i = 0; i < houses.Count; ++i )
			{
				BaseHouse house = houses[i];

				bool canClaim = false;

				if ( trans == null )
					canClaim = ( house.CoOwners.Count > 0 );
				/*{
					for ( int j = 0; j < house.CoOwners.Count; ++j )
					{
						Mobile check = house.CoOwners[j] as Mobile;

						if ( check != null && !check.Deleted && !HasAccountHouse( check ) )
						{
							canClaim = true;
							break;
						}
					}
				}*/

				if ( trans == null && !canClaim )
					Timer.DelayCall( TimeSpan.Zero, new TimerCallback( house.Delete ) );
				else
					house.Owner = trans;
			}
		}