Server.VendorGenerator.GetFloorZ C# (CSharp) Méthode

GetFloorZ() private static méthode

private static GetFloorZ ( Server.Map map, int x, int y, int &z ) : bool
map Server.Map
x int
y int
z int
Résultat bool
		private static bool GetFloorZ( Map map, int x, int y, out int z )
		{
			LandTile lt = map.Tiles.GetLandTile( x, y );

			if ( IsFloor( lt.ID ) && map.CanFit( x, y, lt.Z, 16, false, false ) )
			{
				z = lt.Z;
				return true;
			}

			StaticTile[] tiles = map.Tiles.GetStaticTiles( x, y );

			for ( int i = 0; i < tiles.Length; ++i )
			{
				StaticTile t = tiles[i];
				ItemData id = TileData.ItemTable[t.ID & TileData.MaxItemValue];

				if ( IsStaticFloor( t.ID ) && map.CanFit( x, y, t.Z + (id.Surface ? id.CalcHeight : 0), 16, false, false ) )
				{
					z = t.Z + (id.Surface ? id.CalcHeight : 0);
					return true;
				}
			}

			z = 0;
			return false;
		}