public static bool IsValidWater( Map map, int x, int y, int z )
{
if ( !Region.Find( new Point3D( x, y, z ), map ).AllowSpawn() || !map.CanFit( x, y, z, 16, false, true, false ) )
return false;
LandTile landTile = map.Tiles.GetLandTile( x, y );
if ( landTile.Z == z && ( TileData.LandTable[landTile.ID & TileData.MaxLandValue].Flags & TileFlag.Wet ) != 0 )
return true;
StaticTile[] staticTiles = map.Tiles.GetStaticTiles( x, y, true );
for ( int i = 0; i < staticTiles.Length; ++i )
{
StaticTile staticTile = staticTiles[i];
if ( staticTile.Z == z && ( TileData.ItemTable[staticTile.ID & TileData.MaxItemValue].Flags & TileFlag.Wet ) != 0 )
return true;
}
return false;
}