mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/Player: New PartyLevelReq setting
This commit is contained in:
@@ -145,6 +145,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;
|
||||
}
|
||||
|
||||
ObjectGuid invitedGuid = player->GetGUID();
|
||||
|
||||
Group* group = GetPlayer()->GetGroup();
|
||||
|
||||
@@ -604,6 +604,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);
|
||||
|
||||
@@ -289,6 +289,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,
|
||||
|
||||
@@ -1662,6 +1662,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