mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Player: New PartyLevelReq setting (#17707)
This commit is contained in:
@@ -113,6 +113,12 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!player->GetSocial()->HasFriend(GetPlayer()->GetGUID().GetCounter()) && player->getLevel() < sWorld->getIntConfig(CONFIG_PARTY_LEVEL_REQ))
|
||||
{
|
||||
SendPartyResult(PARTY_OP_INVITE, membername, ERR_INVITE_RESTRICTED);
|
||||
return;
|
||||
}
|
||||
|
||||
Group* group = GetPlayer()->GetGroup();
|
||||
if (group && group->isBGGroup())
|
||||
group = GetPlayer()->GetOriginalGroup();
|
||||
|
||||
@@ -596,6 +596,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_int_configs[CONFIG_CHAT_CHANNEL_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Channel", 1);
|
||||
m_int_configs[CONFIG_CHAT_WHISPER_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Whisper", 1);
|
||||
m_int_configs[CONFIG_CHAT_SAY_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Say", 1);
|
||||
m_int_configs[CONFIG_PARTY_LEVEL_REQ] = sConfigMgr->GetIntDefault("PartyLevelReq", 1);
|
||||
m_int_configs[CONFIG_TRADE_LEVEL_REQ] = sConfigMgr->GetIntDefault("LevelReq.Trade", 1);
|
||||
m_int_configs[CONFIG_TICKET_LEVEL_REQ] = sConfigMgr->GetIntDefault("LevelReq.Ticket", 1);
|
||||
m_int_configs[CONFIG_AUCTION_LEVEL_REQ] = sConfigMgr->GetIntDefault("LevelReq.Auction", 1);
|
||||
|
||||
@@ -282,6 +282,7 @@ enum WorldIntConfigs
|
||||
CONFIG_CHAT_CHANNEL_LEVEL_REQ,
|
||||
CONFIG_CHAT_WHISPER_LEVEL_REQ,
|
||||
CONFIG_CHAT_SAY_LEVEL_REQ,
|
||||
CONFIG_PARTY_LEVEL_REQ,
|
||||
CONFIG_TRADE_LEVEL_REQ,
|
||||
CONFIG_TICKET_LEVEL_REQ,
|
||||
CONFIG_AUCTION_LEVEL_REQ,
|
||||
|
||||
@@ -1760,6 +1760,15 @@ ChatLevelReq.Whisper = 1
|
||||
|
||||
ChatLevelReq.Say = 1
|
||||
|
||||
#
|
||||
# PartyLevelReq
|
||||
# Description: Minimum level at which players can invite to group, even if they aren't on
|
||||
# the invitee friends list. (Players who are on that friend list can always
|
||||
# invite despite having lower level)
|
||||
# Default: 1
|
||||
|
||||
PartyLevelReq = 1
|
||||
|
||||
#
|
||||
# PreserveCustomChannels
|
||||
# Description: Store custom chat channel settings like password, automatic ownership handout
|
||||
|
||||
Reference in New Issue
Block a user