refactor(Core): Make use of standard config usage for guild member limit option. (#22259)

This commit is contained in:
Benjamin Jackson
2025-06-05 14:51:19 -04:00
committed by GitHub
parent 11a4dc5ece
commit 1733c94aec
3 changed files with 4 additions and 1 deletions

View File

@@ -1444,7 +1444,7 @@ void Guild::HandleInviteMember(WorldSession* session, std::string const& name)
if (pInvitee->GetSocial()->HasIgnore(player->GetGUID()))
return;
uint32 memberLimit = sConfigMgr->GetOption<uint32>("Guild.MemberLimit", 0);
uint32 memberLimit = sWorld->getIntConfig(CONFIG_GUILD_MEMBER_LIMIT);
if (memberLimit > 0 && player->GetGuild()->GetMemberCount() >= memberLimit)
{
ChatHandler(player->GetSession()).PSendSysMessage("Your guild has reached the maximum amount of members ({}). You cannot send another invite until the guild member count is lower.", memberLimit);

View File

@@ -411,6 +411,7 @@ enum WorldIntConfigs
CONFIG_GUILD_BANK_TAB_COST_3,
CONFIG_GUILD_BANK_TAB_COST_4,
CONFIG_GUILD_BANK_TAB_COST_5,
CONFIG_GUILD_MEMBER_LIMIT,
CONFIG_GM_LEVEL_CHANNEL_MODERATION,
CONFIG_TOGGLE_XP_COST,
CONFIG_NPC_EVADE_IF_NOT_REACHABLE,

View File

@@ -844,6 +844,8 @@ void World::LoadConfigSettings(bool reload)
_int_configs[CONFIG_GUILD_BANK_TAB_COST_4] = sConfigMgr->GetOption<int32>("Guild.BankTabCost4", 25000000);
_int_configs[CONFIG_GUILD_BANK_TAB_COST_5] = sConfigMgr->GetOption<int32>("Guild.BankTabCost5", 50000000);
_int_configs[CONFIG_GUILD_MEMBER_LIMIT] = sConfigMgr->GetOption<uint32>("Guild.MemberLimit", 0);
_bool_configs[CONFIG_DETECT_POS_COLLISION] = sConfigMgr->GetOption<bool>("DetectPosCollision", true);
_bool_configs[CONFIG_RESTRICTED_LFG_CHANNEL] = sConfigMgr->GetOption<bool>("Channel.RestrictedLfg", true);