Merge pull request #2 from azerothcore/BarbzYHOOL-fix-config
CONFIG - Fixed for Linux
This commit is contained in:
commit
6de8866088
1 changed files with 23 additions and 1 deletions
|
|
@ -262,7 +262,29 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CongratsOnLevelWorld : public WorldScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CongratsOnLevelWorld() : WorldScript("CongratsOnLevelWorld") { }
|
||||||
|
|
||||||
|
void OnBeforeConfigLoad(bool reload) override
|
||||||
|
{
|
||||||
|
if (!reload) {
|
||||||
|
std::string conf_path = _CONF_DIR;
|
||||||
|
std::string cfg_file = conf_path + "/mod_congratsonlevel.conf";
|
||||||
|
#ifdef WIN32
|
||||||
|
cfg_file = "mod_congratsonlevel.conf";
|
||||||
|
#endif
|
||||||
|
std::string cfg_def_file = cfg_file + ".dist";
|
||||||
|
sConfigMgr->LoadMore(cfg_def_file.c_str());
|
||||||
|
|
||||||
|
sConfigMgr->LoadMore(cfg_file.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddCongratsOnLevelScripts()
|
void AddCongratsOnLevelScripts()
|
||||||
{
|
{
|
||||||
|
new CongratsOnLevelWorld();
|
||||||
new CongratsOnLevel();
|
new CongratsOnLevel();
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue