Core/vmaps: Stop worldserver startup when gameobject models cannot be loaded

Port From (https://github.com/TrinityCore/TrinityCore/commit/a2ec80b14ced0d32e5929af6286667de63e9d0ae)
This commit is contained in:
hondacrx
2023-01-04 16:41:58 -05:00
parent 4718f88ed5
commit c686484ce5
2 changed files with 10 additions and 4 deletions
+6 -1
View File
@@ -410,7 +410,7 @@ namespace Game
|| !TerrainManager.ExistMapAndVMap(1, 10311.3f, 832.463f) || !TerrainManager.ExistMapAndVMap(1, -2917.58f, -257.98f)
|| (WorldConfig.GetIntValue(WorldCfg.Expansion) != 0 && (!TerrainManager.ExistMapAndVMap(530, 10349.6f, -6357.29f) || !TerrainManager.ExistMapAndVMap(530, -3961.64f, -13931.2f))))
{
Log.outError(LogFilter.ServerLoading, "Unable to load critical files - server shutting down !!!");
Log.outError(LogFilter.ServerLoading, "Unable to load map and vmap data for starting zones - server shutting down!");
Environment.Exit(1);
}
@@ -508,6 +508,11 @@ namespace Game
Log.outInfo(LogFilter.ServerLoading, "Loading GameObject models...");
GameObjectModel.LoadGameObjectModelList();
if (!GameObjectModel.LoadGameObjectModelList())
{
Log.outFatal(LogFilter.ServerLoading, "Unable to load gameobject models, objects using WMO models will crash the client - server shutting down!");
ShutdownServ(0, ShutdownMask.Force, ShutdownExitCode.Shutdown);
}
Log.outInfo(LogFilter.ServerLoading, "Loading Instance Template...");
Global.ObjectMgr.LoadInstanceTemplate();