mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -1469,6 +1469,14 @@ void Guild::HandleInviteMember(WorldSession* session, std::string const& name)
|
||||
if (pInvitee->GetSocial()->HasIgnore(player->GetGUID()))
|
||||
return;
|
||||
|
||||
uint32 memberLimit = sConfigMgr->GetOption<uint32>("Guild.MemberLimit", 0);
|
||||
if (memberLimit > 0 && player->GetGuild()->GetMemberCount() >= memberLimit)
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("Your guild has reached the maximum amount of members (%u). You cannot send another invite until the guild member count is lower.", memberLimit);
|
||||
SendCommandResult(session, GUILD_COMMAND_INVITE, ERR_GUILD_INTERNAL, name);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && pInvitee->GetTeamId(true) != player->GetTeamId(true))
|
||||
{
|
||||
SendCommandResult(session, GUILD_COMMAND_INVITE, ERR_GUILD_NOT_ALLIED, name);
|
||||
|
||||
Reference in New Issue
Block a user