Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for last PR ACE remove #4

Merged
merged 1 commit into from
Mar 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions src/pocketportal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,49 +91,7 @@ void OnGossipSelect(Player* player, Item* /*item*/, uint32 /*sender*/, uint32 ac
}
};


class pportal_world : public WorldScript
{
public:
pportal_world() : WorldScript("pportal_world") { }

void OnBeforeConfigLoad(bool reload) override
{
if (!reload)
{
std::string conf_path = _CONF_DIR;
std::string cfg_file = conf_path + "/pocketportal.conf";

#if PLATFORM == PLATFORM_WINDOWS
cfg_file = "pocketportal.conf";
#endif
std::string cfg_def_file = cfg_file + ".dist";

// Load .conf.dist config
if (!sConfigMgr->LoadMore(cfg_def_file.c_str()))
{
sLog->outString();
sLog->outError("Module config: Invalid or missing configuration dist file : %s", cfg_def_file.c_str());
sLog->outError("Module config: Verify that the file exists and has \'[worldserver]' written in the top of the file!");
sLog->outError("Module config: Use default settings!");
sLog->outString();
}

// Load .conf config
if (!sConfigMgr->LoadMore(cfg_file.c_str()))
{
sLog->outString();
sLog->outError("Module config: Invalid or missing configuration file : %s", cfg_file.c_str());
sLog->outError("Module config: Verify that the file exists and has \'[worldserver]' written in the top of the file!");
sLog->outError("Module config: Use default settings!");
sLog->outString();
}
}
}
};

void AddSC_pocket_portal()
{
new pocket_portal();
new pportal_world();
}