private static int GetFloorZ( Item item )
{
Map map = item.Map;
if ( map == null )
return int.MinValue;
StaticTile[] tiles = map.Tiles.GetStaticTiles( item.X, item.Y, true );
int z = int.MinValue;
for ( int i = 0; i < tiles.Length; ++i )
{
StaticTile tile = tiles[i];
ItemData id = TileData.ItemTable[tile.ID & TileData.MaxItemValue];
int top = tile.Z; // Confirmed : no height checks here
if ( id.Surface && !id.Impassable && top > z && top <= item.Z )
z = top;
}
return z;
}
}