mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
refactor(Core): Make use of standard config usage for guild member limit option. (#22259)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user