Eluna: load the configuration file using the new method. (#1546)

This commit is contained in:
ayase
2019-03-03 15:24:43 +08:00
committed by Viste(Кирилл)
parent 1b62af3e14
commit be3abe21d9

View File

@@ -456,6 +456,16 @@ void World::LoadConfigSettings(bool reload)
}
LoadModuleConfigSettings();
#ifdef ELUNA
///- Initialize Lua Engine
if (!reload)
{
sLog->outString("Initialize Eluna Lua Engine...");
Eluna::Initialize();
}
#endif
sScriptMgr->OnBeforeConfigLoad(reload);
// Reload log levels and filters
@@ -1331,21 +1341,6 @@ void World::SetInitialWorldSettings()
vmmgr2->GetLiquidFlagsPtr = &GetLiquidFlags;
}
#ifdef ELUNA
///- Initialize Lua Engine
sLog->outString("Initialize Eluna Lua Engine...");
std::string conf_path = _CONF_DIR;
std::string cfg_file = conf_path + "/mod_LuaEngine.conf";
#ifdef WIN32
cfg_file = "mod_LuaEngine.conf";
#endif
std::string cfg_def_file = cfg_file + ".dist";
sConfigMgr->LoadMore(cfg_def_file.c_str());
sConfigMgr->LoadMore(cfg_file.c_str());
Eluna::Initialize();
#endif
///- Initialize config settings
LoadConfigSettings();