diff --git a/Server/TileMatrix.cs b/Server/TileMatrix.cs index eff3abba8..76a70e936 100644 --- a/Server/TileMatrix.cs +++ b/Server/TileMatrix.cs @@ -399,8 +399,11 @@ namespace Server fixed ( StaticTile *pTiles = staTiles ) { +#if !MONO NativeReader.Read( m_Statics.SafeFileHandle.DangerousGetHandle(), pTiles, length ); - +#else + NativeReader.Read( m_Statics.Handle, pTiles, length ); +#endif if ( m_Lists == null ) { m_Lists = new TileList[8][]; @@ -469,7 +472,11 @@ namespace Server fixed ( LandTile *pTiles = tiles ) { +#if !MONO NativeReader.Read( m_Map.SafeFileHandle.DangerousGetHandle(), pTiles, 192 ); +#else + NativeReader.Read( m_Map.Handle, pTiles, 192 ); +#endif } return tiles; diff --git a/Server/TileMatrixPatch.cs b/Server/TileMatrixPatch.cs index 8b9ae159e..7f4e3e050 100644 --- a/Server/TileMatrixPatch.cs +++ b/Server/TileMatrixPatch.cs @@ -99,7 +99,11 @@ namespace Server fixed ( LandTile *pTiles = tiles ) { +#if !MONO NativeReader.Read( fsData.SafeFileHandle.DangerousGetHandle(), pTiles, 192 ); +#else + NativeReader.Read( fsData.Handle, pTiles, 192 ); +#endif } matrix.SetLandBlock( x, y, tiles ); @@ -164,8 +168,11 @@ namespace Server fixed ( StaticTile *pTiles = staTiles ) { +#if !MONO NativeReader.Read( fsData.SafeFileHandle.DangerousGetHandle(), pTiles, length ); - +#else + NativeReader.Read( fsData.Handle, pTiles, length ); +#endif StaticTile *pCur = pTiles, pEnd = pTiles + tileCount; while ( pCur < pEnd )