Server.UOAMVendorGenerator.GetSpawnerZ C# (CSharp) Méthode

GetSpawnerZ() public static méthode

public static GetSpawnerZ ( int x, int y, Server.Map map ) : int
x int
y int
map Server.Map
Résultat int
		public static int GetSpawnerZ( int x, int y, Map map )
		{
			int z = map.GetAverageZ( x, y );

			if ( map.CanFit( x, y, z, 16, false, false, true ) )
				return z;

			for ( int i = 1; i <= 20; ++i )
			{
				if ( map.CanFit( x, y, z + i, 16, false, false, true ) )
					return z + i;

				if ( map.CanFit( x, y, z - i, 16, false, false, true ) )
					return z - i;
			}

			return z;
		}