fix(Core/Worldsession): add option to prevent logout when AFK in a sanctuary zone (#2205)

This commit is contained in:
mik1893
2019-09-09 22:53:37 +01:00
committed by Stoabrogga
parent ee09fb8f9d
commit 67d180ea77
4 changed files with 21 additions and 2 deletions

View File

@@ -1323,6 +1323,9 @@ void World::LoadConfigSettings(bool reload)
// Player can join LFG anywhere
m_bool_configs[CONFIG_LFG_LOCATION_ALL] = sConfigMgr->GetBoolDefault("LFG.Location.All", false);
// Prevent players AFK from being logged out
m_int_configs[CONFIG_AFK_PREVENT_LOGOUT] = sConfigMgr->GetIntDefault("PreventAFKLogout", 0);
// call ScriptMgr if we're reloading the configuration
sScriptMgr->OnAfterConfigLoad(reload);
}

View File

@@ -339,6 +339,7 @@ enum WorldIntConfigs
CONFIG_BIRTHDAY_TIME,
CONFIG_SOCKET_TIMEOUTTIME_ACTIVE,
CONFIG_INSTANT_TAXI,
CONFIG_AFK_PREVENT_LOGOUT,
INT_CONFIG_VALUE_COUNT
};