Core/Collision: Fixed false positive errors in console about vmap loading

Port From (https://github.com/TrinityCore/TrinityCore/commit/7a406db50626ba9e9a64c8c3d9b6e5b7310ac527)
This commit is contained in:
hondacrx
2020-12-13 17:33:31 -05:00
parent 4c2106781a
commit 923786c12c
4 changed files with 109 additions and 76 deletions
+5 -1
View File
@@ -169,6 +169,10 @@ namespace Game.Maps
Log.outError(LogFilter.Maps, $"VMap file '{Global.WorldMgr.GetDataPath() + "vmaps/" + name}e' couldn't b loaded");
Log.outError(LogFilter.Maps, "This is because the version of the VMap file and the version of this module are different, please re-extract the maps with the tools compiled with this module.");
return false;
case LoadResult.ReadFromFileFailed:
Log.outError(LogFilter.Maps, $"VMap file '{Global.WorldMgr.GetDataPath() + "vmaps/" + name}' couldn't be loaded");
Log.outError(LogFilter.Maps, "This is because VMAP files are corrupted, please re-extract the maps with the tools compiled with this module.");
return false;
}
}
return true;
@@ -243,7 +247,7 @@ namespace Game.Maps
if (map.GridMaps[gx][gy] != null)
Global.ScriptMgr.OnLoadGridMap(map, map.GridMaps[gx][gy], gx, gy);
else if (gridMapLoadResult == LoadResult.InvalidFile)
else if (gridMapLoadResult == LoadResult.ReadFromFileFailed)
Log.outError(LogFilter.Maps, $"Error loading map file: {fileName}");
}