feat(Core/PvP): Set 30 sec timer before turn off FFA PvP flag. (#5090)

This commit is contained in:
UltraNix
2021-04-08 13:00:45 +02:00
committed by GitHub
parent 143fad42c7
commit 54e371e0e7
5 changed files with 109 additions and 45 deletions

View File

@@ -378,6 +378,7 @@ enum WorldIntConfigs
CONFIG_TOGGLE_XP_COST,
CONFIG_NPC_EVADE_IF_NOT_REACHABLE,
CONFIG_NPC_REGEN_TIME_IF_NOT_REACHABLE_IN_RAID,
CONFIG_FFA_PVP_TIMER,
INT_CONFIG_VALUE_COUNT
};

View File

@@ -1240,6 +1240,8 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_ITEMDELETE_QUALITY] = sConfigMgr->GetOption<int32>("ItemDelete.Quality", 3);
m_int_configs[CONFIG_ITEMDELETE_ITEM_LEVEL] = sConfigMgr->GetOption<int32>("ItemDelete.ItemLevel", 80);
m_int_configs[CONFIG_FFA_PVP_TIMER] = sConfigMgr->GetOption<int32>("FFAPvPTimer", 30);
///- Read the "Data" directory from the config file
std::string dataPath = sConfigMgr->GetOption<std::string>("DataDir", "./");
if (dataPath.empty() || (dataPath.at(dataPath.length() - 1) != '/' && dataPath.at(dataPath.length() - 1) != '\\'))