mirror of
https://github.com/azerothcore/mod-transmog
synced 2025-11-29 22:48:30 +08:00
fix(Config): del useless loading config (#29)
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
|
||||
# Add cpp files
|
||||
AC_ADD_SCRIPT("${CMAKE_CURRENT_LIST_DIR}/src/transmog_scripts.cpp")
|
||||
AC_ADD_SCRIPT("${CMAKE_CURRENT_LIST_DIR}/src/Transmogrification.cpp")
|
||||
|
||||
# Add scripts to script loader
|
||||
AC_ADD_SCRIPT_LOADER("Transmog" "${CMAKE_CURRENT_LIST_DIR}/src/transmog_scripts_loader.h" "SC_Npc_VisualWeapon")
|
||||
|
||||
# Add config file
|
||||
AC_ADD_CONFIG_FILE("${CMAKE_CURRENT_LIST_DIR}/conf/transmog.conf.dist")
|
||||
|
||||
@@ -436,8 +436,7 @@ public:
|
||||
|
||||
void OnAfterConfigLoad(bool reload) override
|
||||
{
|
||||
if (reload)
|
||||
sT->LoadConfig(reload);
|
||||
sT->LoadConfig(reload);
|
||||
}
|
||||
|
||||
void OnStartup() override
|
||||
@@ -452,19 +451,6 @@ public:
|
||||
CharacterDatabase.Execute("DELETE FROM `custom_transmogrification_sets` WHERE NOT EXISTS(SELECT 1 FROM characters WHERE characters.guid = custom_transmogrification_sets.Owner)");
|
||||
#endif
|
||||
}
|
||||
|
||||
void OnBeforeConfigLoad(bool reload) override
|
||||
{
|
||||
if (!reload) {
|
||||
std::string conf_path = _CONF_DIR;
|
||||
std::string cfg_file = conf_path + "/transmog.conf";
|
||||
std::string cfg_def_file = cfg_file +".dist";
|
||||
|
||||
sConfigMgr->LoadMore(cfg_def_file.c_str());
|
||||
|
||||
sConfigMgr->LoadMore(cfg_file.c_str());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class global_transmog_script : public GlobalScript {
|
||||
|
||||
Reference in New Issue
Block a user