Update mod_achievements.cpp

This commit is contained in:
Vitaliy
2021-03-02 13:34:48 +03:00
committed by GitHub
parent 2754b15c7c
commit 78c35e2f70

View File

@@ -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() void AddAccountAchievementsScripts()
{ {
new AccountAchievementsWorld;
new AccountAchievements; new AccountAchievements;
} }