mirror of
https://github.com/NathanHandley/mod-ah-bot-plus.git
synced 2026-01-16 10:30:29 +00:00
First commit for skeleton module
DB part must be implemented yet
This commit is contained in:
26
src/MyWorld.cpp
Normal file
26
src/MyWorld.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "Configuration/Config.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
class MyWorld : public WorldScript
|
||||
{
|
||||
public:
|
||||
MyWorld() : WorldScript("MyWorld") { }
|
||||
|
||||
void OnBeforeConfigLoad(bool reload) override
|
||||
{
|
||||
if (!reload) {
|
||||
std::string conf_path = _CONF_DIR;
|
||||
std::string cfg_file = conf_path + "/my_custom.conf";
|
||||
std::string cfg_def_file = cfg_file +".dist";
|
||||
|
||||
sConfigMgr->LoadMore(cfg_def_file.c_str());
|
||||
|
||||
sConfigMgr->LoadMore(cfg_file.c_str());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void AddMyWorldScripts()
|
||||
{
|
||||
new MyWorld();
|
||||
}
|
||||
Reference in New Issue
Block a user