feat(Config): Max gold on change faction (#11147)

* feat(Config): Max gold on change faction

* build
This commit is contained in:
Nefertumm
2022-04-02 11:46:57 -03:00
committed by GitHub
parent ff654397e8
commit 0ef2781ede
4 changed files with 14 additions and 7 deletions

View File

@@ -398,6 +398,7 @@ enum WorldIntConfigs
CONFIG_LOOT_NEED_BEFORE_GREED_ILVL_RESTRICTION,
CONFIG_LFG_MAX_KICK_COUNT,
CONFIG_LFG_KICK_PREVENTION_TIMER,
CONFIG_CHANGE_FACTION_MAX_MONEY,
INT_CONFIG_VALUE_COUNT
};

View File

@@ -1263,6 +1263,8 @@ void World::LoadConfigSettings(bool reload)
m_bool_configs[CONFIG_ALLOW_JOIN_BG_AND_LFG] = sConfigMgr->GetOption<bool>("JoinBGAndLFG.Enable", false);
m_int_configs[CONFIG_CHANGE_FACTION_MAX_MONEY] = sConfigMgr->GetOption<uint32>("ChangeFaction.MaxMoney", 0);
///- 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) != '\\'))