From f83adad61c144ca11740fea95369e577fd393c3a Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 2 Mar 2021 13:34:09 +0300 Subject: [PATCH 1/3] fix for last PR ACE remove https://github.com/azerothcore/azerothcore-wotlk/pull/4608 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 062efbf..932d526 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,4 +4,4 @@ AC_ADD_SCRIPT("${CMAKE_CURRENT_LIST_DIR}/src/mod_achievements.cpp") AC_ADD_SCRIPT_LOADER("AccountAchievements" "${CMAKE_CURRENT_LIST_DIR}/src/loader_achievements.h") -CU_ADD_HOOK(AFTER_WORLDSERVER_CMAKE "${CMAKE_CURRENT_LIST_DIR}/src/cmake/after_ws_install.cmake") \ No newline at end of file +AC_ADD_CONFIG_FILE("${CMAKE_CURRENT_LIST_DIR}/conf/mod_achievements.conf.dist") From 2754b15c7cebfebbe6313fd867022680eb05f19a Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 2 Mar 2021 13:34:25 +0300 Subject: [PATCH 2/3] Delete after_ws_install.cmake --- src/cmake/after_ws_install.cmake | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 src/cmake/after_ws_install.cmake diff --git a/src/cmake/after_ws_install.cmake b/src/cmake/after_ws_install.cmake deleted file mode 100644 index f0712a2..0000000 --- a/src/cmake/after_ws_install.cmake +++ /dev/null @@ -1,15 +0,0 @@ -if( WIN32 ) - if ( MSVC ) - add_custom_command(TARGET worldserver - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_MOD_ACHIEVEMENTS_DIR}/conf/mod_achievements.conf.dist" ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/ - ) - elseif ( MINGW ) - add_custom_command(TARGET worldserver - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_MOD_ACHIEVEMENTS_DIR}/conf/mod_achievements.conf.dist" ${CMAKE_BINARY_DIR}/bin/ - ) - endif() -endif() - -install(FILES "${CMAKE_MOD_ACHIEVEMENTS_DIR}/conf/mod_achievements.conf.dist" DESTINATION ${CONF_DIR}) \ No newline at end of file From 78c35e2f70e628c21b78ff36c3806612a53d6e0d Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 2 Mar 2021 13:34:48 +0300 Subject: [PATCH 3/3] Update mod_achievements.cpp --- src/mod_achievements.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/mod_achievements.cpp b/src/mod_achievements.cpp index ce3d7ff..19154ff 100644 --- a/src/mod_achievements.cpp +++ b/src/mod_achievements.cpp @@ -85,29 +85,7 @@ public: } }; -class AccountAchievementsWorld : public WorldScript -{ -public: - AccountAchievementsWorld() : WorldScript("AccountAchievementsWorld") { } - - void OnBeforeConfigLoad(bool reload) override - { - if (!reload) { - std::string conf_path = _CONF_DIR; - std::string cfg_file = conf_path + "/mod_achievements.conf"; -#ifdef WIN32 - cfg_file = "mod_achievements.conf"; -#endif - std::string cfg_def_file = cfg_file + ".dist"; - sConfigMgr->LoadMore(cfg_def_file.c_str()); - - sConfigMgr->LoadMore(cfg_file.c_str()); - } - } -}; - void AddAccountAchievementsScripts() { - new AccountAchievementsWorld; new AccountAchievements; }