feat(Config): update to new API (#40)

This commit is contained in:
Kargatum
2021-11-03 16:43:38 +07:00
committed by GitHub
parent 5ae7d3dbc2
commit 0467ed0f51
3 changed files with 29 additions and 29 deletions

View File

@@ -52,7 +52,7 @@ public:
static bool HandleAnticheatWarnCommand(ChatHandler* handler, const char* args)
{
if (!sConfigMgr->GetBoolDefault("Anticheat.Enabled", 0))
if (!sConfigMgr->GetOption<bool>("Anticheat.Enabled", 0))
return false;
Player* pTarget = NULL;
@@ -91,7 +91,7 @@ public:
static bool HandleAnticheatJailCommand(ChatHandler* handler, const char* args)
{
if (!sConfigMgr->GetBoolDefault("Anticheat.Enabled", 0))
if (!sConfigMgr->GetOption<bool>("Anticheat.Enabled", 0))
return false;
Player* pTarget = NULL;
@@ -140,7 +140,7 @@ public:
static bool HandleAntiCheatDeleteCommand(ChatHandler* handler, const char* args)
{
if (!sConfigMgr->GetBoolDefault("Anticheat.Enabled", 0))
if (!sConfigMgr->GetOption<bool>("Anticheat.Enabled", 0))
return false;
std::string strCommand;
@@ -169,7 +169,7 @@ public:
static bool HandleAntiCheatPlayerCommand(ChatHandler* handler, const char* args)
{
if (!sConfigMgr->GetBoolDefault("Anticheat.Enabled", 0))
if (!sConfigMgr->GetOption<bool>("Anticheat.Enabled", 0))
return false;
std::string strCommand;
@@ -221,7 +221,7 @@ public:
static bool HandleAntiCheatGlobalCommand(ChatHandler* handler, const char* /* args */)
{
if (!sConfigMgr->GetBoolDefault("Anticheat.Enabled", 0))
if (!sConfigMgr->GetOption<bool>("Anticheat.Enabled", 0))
{
handler->PSendSysMessage("The Anticheat System is disabled.");
return true;