feat(Core/Config): allow initial (free) amount of Guild Bank tabs (#4290)

This commit is contained in:
Francesco Borzì
2021-01-20 11:19:09 +01:00
committed by GitHub
parent ec974e7306
commit ce4dbbce76
4 changed files with 15 additions and 0 deletions

View File

@@ -1203,6 +1203,11 @@ bool Guild::Create(Player* pLeader, std::string const& name)
_CreateDefaultGuildRanks(pLeaderSession->GetSessionDbLocaleIndex()); // Create default ranks
bool ret = AddMember(m_leaderGuid, GR_GUILDMASTER); // Add guildmaster
for (short i = 0; i < static_cast<short>(sWorld->getIntConfig(CONFIG_GUILD_BANK_INITIAL_TABS)); i++)
{
_CreateNewBankTab();
}
if (ret)
sScriptMgr->OnGuildCreate(this, pLeader, name);

View File

@@ -362,6 +362,7 @@ enum WorldIntConfigs
CONFIG_CHARTER_COST_ARENA_5v5,
CONFIG_MAX_WHO_LIST_RETURN,
CONFIG_WAYPOINT_MOVEMENT_STOP_TIME_FOR_PLAYER,
CONFIG_GUILD_BANK_INITIAL_TABS,
CONFIG_GUILD_BANK_TAB_COST_0,
CONFIG_GUILD_BANK_TAB_COST_1,
CONFIG_GUILD_BANK_TAB_COST_2,

View File

@@ -1075,6 +1075,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_GUILD_RESET_HOUR] = 6;
}
m_int_configs[CONFIG_GUILD_BANK_INITIAL_TABS] = sConfigMgr->GetIntDefault("Guild.BankInitialTabs", 0);
m_int_configs[CONFIG_GUILD_BANK_TAB_COST_0] = sConfigMgr->GetIntDefault("Guild.BankTabCost0", 1000000);
m_int_configs[CONFIG_GUILD_BANK_TAB_COST_1] = sConfigMgr->GetIntDefault("Guild.BankTabCost1", 2500000);
m_int_configs[CONFIG_GUILD_BANK_TAB_COST_2] = sConfigMgr->GetIntDefault("Guild.BankTabCost2", 5000000);

View File

@@ -3311,6 +3311,14 @@ NoResetTalentsCost = 0
Guild.AllowMultipleGuildMaster = 0
#
# Guild.BankInitialTabs
# Description: Changes the amounts of available tabs of the guild bank on guild creation
# Default: 0 (no tabs given for free)
# 1-6 (amount of tabs of the guild bank at guild creation)
Guild.BankInitialTabs = 0
#
# Guild.BankTabCost0-5
# Description: Changes the price of the guild tabs. Note that the client will still show the default values.