feat(Core/Config): rework config and delete ACE inherited (#4608)

This commit is contained in:
Kargatum
2021-02-28 20:37:03 +07:00
committed by GitHub
parent c2f274e06d
commit dbefa17a53
36 changed files with 1340 additions and 816 deletions

View File

@@ -30,13 +30,13 @@ PacketLog* PacketLog::instance()
void PacketLog::Initialize()
{
std::string logsDir = sConfigMgr->GetStringDefault("LogsDir", "");
std::string logsDir = sConfigMgr->GetOption<std::string>("LogsDir", "");
if (!logsDir.empty())
if ((logsDir.at(logsDir.length() - 1) != '/') && (logsDir.at(logsDir.length() - 1) != '\\'))
logsDir.push_back('/');
std::string logname = sConfigMgr->GetStringDefault("PacketLogFile", "");
std::string logname = sConfigMgr->GetOption<std::string>("PacketLogFile", "");
if (!logname.empty())
_file = fopen((logsDir + logname).c_str(), "wb");
}