mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 07:17:57 +00:00
feat(Core/Player): Implement ACCOUNT_FLAG_TRIAL (#26064)
Co-authored-by: Ludwig <sudlud@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -67,7 +67,7 @@ enum AccountFlag
|
||||
ACCOUNT_FLAG_GM = 0x1, // Account is GM
|
||||
ACCOUNT_FLAG_NOKICK = 0x2, // NYI UNK
|
||||
ACCOUNT_FLAG_COLLECTOR = 0x4, // NYI Collector's Edition
|
||||
ACCOUNT_FLAG_TRIAL = 0x8, // NYI Trial account
|
||||
ACCOUNT_FLAG_TRIAL = 0x8, // Trial account
|
||||
ACCOUNT_FLAG_CANCELLED = 0x10, // NYI UNK
|
||||
ACCOUNT_FLAG_IGR = 0x20, // NYI Internet Game Room (Internet cafe?)
|
||||
ACCOUNT_FLAG_WHOLESALER = 0x40, // NYI UNK
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
# GAME SETTINGS
|
||||
# GAME MASTER
|
||||
# CHEAT
|
||||
# ACCOUNT
|
||||
# CHARACTER DATABASE
|
||||
# CHARACTER DELETE
|
||||
# CHARACTER CREATION
|
||||
@@ -1718,6 +1719,98 @@ InstantLogout = 1
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
###################################################################################################
|
||||
# ACCOUNT
|
||||
#
|
||||
# Trial.LevelCap
|
||||
# Description: Maximum level a trial account can reach. XP gain stops once this level is reached.
|
||||
# Default: 20
|
||||
# 0 - (Disabled, no cap)
|
||||
|
||||
Trial.LevelCap = 20
|
||||
|
||||
#
|
||||
# Trial.MoneyCap
|
||||
# Description: Maximum money a trial account can hold, in copper.
|
||||
# Default: 100000 - (10 gold)
|
||||
# 0 - (Disabled, no cap)
|
||||
|
||||
Trial.MoneyCap = 100000
|
||||
|
||||
#
|
||||
# Trial.TradeSkillCap
|
||||
# Description: Maximum value any profession skill can reach on a trial account.
|
||||
# Default: 100
|
||||
# 0 - (Disabled, no cap)
|
||||
|
||||
Trial.TradeSkillCap = 100
|
||||
|
||||
#
|
||||
# Trial.Restriction.Chat
|
||||
# Description: Restrict trial accounts from using whisper/channel/guild chats.
|
||||
# Whispers are only allowed when the trial player is on the recipients friendslist
|
||||
# or when the trial account was messaged first.
|
||||
# Default: 1 - (Enabled)
|
||||
# 0 - (Disabled)
|
||||
|
||||
Trial.Restriction.Chat = 1
|
||||
|
||||
#
|
||||
# Trial.Restriction.Mail
|
||||
# Description: Restrict trial accounts from sending mail.
|
||||
# Default: 1 - (Enabled)
|
||||
# 0 - (Disabled)
|
||||
|
||||
Trial.Restriction.Mail = 1
|
||||
|
||||
#
|
||||
# Trial.Restriction.Trade
|
||||
# Description: Restrict trial accounts from initiating or being the target of in-game trade.
|
||||
# Default: 1 - (Enabled)
|
||||
# 0 - (Disabled)
|
||||
|
||||
Trial.Restriction.Trade = 1
|
||||
|
||||
#
|
||||
# Trial.Restriction.Auction
|
||||
# Description: Restrict trial accounts from selling, bidding, or cancelling auctions at the auction house.
|
||||
# Default: 1 - (Enabled)
|
||||
# 0 - (Disabled)
|
||||
|
||||
Trial.Restriction.Auction = 1
|
||||
|
||||
#
|
||||
# Trial.Restriction.Party
|
||||
# Description: Restrict trial accounts from inviting players to a party, and from accepting
|
||||
# an invite to a party whose existing members are above Trial.LevelCap.
|
||||
# The join check is skipped when Trial.LevelCap is 0.
|
||||
# Default: 1 - (Enabled)
|
||||
# 0 - (Disabled)
|
||||
|
||||
Trial.Restriction.Party = 1
|
||||
|
||||
#
|
||||
# Trial.Restriction.Guild
|
||||
# Description: Restrict trial accounts from joining a guild (accepting an invite) and from
|
||||
# creating one (buying, signing, or turning in a guild charter).
|
||||
# Default: 1 - (Enabled)
|
||||
# 0 - (Disabled)
|
||||
|
||||
Trial.Restriction.Guild = 1
|
||||
|
||||
#
|
||||
# Trial.Restriction.Queue
|
||||
# Description: Force trial accounts through the world session queue even if their account
|
||||
# flags would otherwise grant skip-queue priority. The RBAC_PERM_SKIP_QUEUE
|
||||
# permission and recent-disconnect grace are still honored.
|
||||
# Default: 1 - (Enabled)
|
||||
# 0 - (Disabled)
|
||||
|
||||
Trial.Restriction.Queue = 1
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
###################################################################################################
|
||||
# CHARACTER DATABASE
|
||||
#
|
||||
|
||||
@@ -2388,7 +2388,14 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate, bool isLFGReward)
|
||||
// Favored experience increase END
|
||||
|
||||
// XP to money conversion processed in Player::RewardQuest
|
||||
if (level >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
uint32 maxLevel = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
|
||||
|
||||
// Trial account level cap (0 disables the cap)
|
||||
if (uint32 trialLevelCap = sWorld->getIntConfig(CONFIG_TRIAL_LEVEL_CAP))
|
||||
if (GetSession()->IsTrialAccount())
|
||||
maxLevel = std::min(maxLevel, trialLevelCap);
|
||||
|
||||
if (level >= maxLevel)
|
||||
return;
|
||||
|
||||
uint32 bonus_xp = 0;
|
||||
@@ -2413,11 +2420,11 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate, bool isLFGReward)
|
||||
uint32 nextLvlXP = GetUInt32Value(PLAYER_NEXT_LEVEL_XP);
|
||||
uint32 newXP = curXP + xp + bonus_xp;
|
||||
|
||||
while (newXP >= nextLvlXP && level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
while (newXP >= nextLvlXP && level < maxLevel)
|
||||
{
|
||||
newXP -= nextLvlXP;
|
||||
|
||||
if (level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
if (level < maxLevel)
|
||||
GiveLevel(level + 1);
|
||||
|
||||
level = GetLevel();
|
||||
@@ -11500,6 +11507,17 @@ bool Player::ModifyMoney(int32 amount, bool sendError /*= true*/)
|
||||
SetMoney (GetMoney() > uint32(-amount) ? GetMoney() + amount : 0);
|
||||
else
|
||||
{
|
||||
// Trial account money cap (0 disables the cap)
|
||||
if (uint32 trialMoneyCap = sWorld->getIntConfig(CONFIG_TRIAL_MONEY_CAP))
|
||||
{
|
||||
if (GetSession()->IsTrialAccount() && GetMoney() + uint32(amount) > trialMoneyCap)
|
||||
{
|
||||
if (sendError)
|
||||
SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, nullptr, nullptr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (GetMoney() < uint32(MAX_MONEY_AMOUNT - amount))
|
||||
SetMoney(GetMoney() + amount);
|
||||
else
|
||||
|
||||
@@ -939,6 +939,11 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
|
||||
if (!MaxValue || !SkillValue || SkillValue >= MaxValue)
|
||||
return false;
|
||||
|
||||
// Trial account trade-skill cap (0 disables the cap)
|
||||
if (uint32 trialSkillCap = sWorld->getIntConfig(CONFIG_TRIAL_TRADE_SKILL_CAP))
|
||||
if (GetSession()->IsTrialAccount() && SkillValue >= trialSkillCap)
|
||||
return false;
|
||||
|
||||
int32 Roll = irand(1, 1000);
|
||||
|
||||
if (Roll <= Chance)
|
||||
|
||||
@@ -132,6 +132,13 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_AUCTION) && IsTrialAccount())
|
||||
{
|
||||
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_RESTRICTED_ACCOUNT);
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
|
||||
for (uint32 i = 0; i < itemsCount; ++i)
|
||||
{
|
||||
recvData >> itemGUIDs[i];
|
||||
@@ -426,6 +433,12 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
|
||||
if (!auctionId || !price)
|
||||
return; //check for cheaters
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_AUCTION) && IsTrialAccount())
|
||||
{
|
||||
SendAuctionCommandResult(0, AUCTION_PLACE_BID, ERR_AUCTION_RESTRICTED_ACCOUNT);
|
||||
return;
|
||||
}
|
||||
|
||||
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
|
||||
if (!creature)
|
||||
{
|
||||
@@ -578,6 +591,12 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
|
||||
recvData >> auctioneer;
|
||||
recvData >> auctionId;
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_AUCTION) && IsTrialAccount())
|
||||
{
|
||||
SendAuctionCommandResult(0, AUCTION_CANCEL, ERR_AUCTION_RESTRICTED_ACCOUNT);
|
||||
return;
|
||||
}
|
||||
|
||||
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
|
||||
if (!creature)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "Util.h"
|
||||
@@ -112,6 +113,18 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
}
|
||||
}
|
||||
|
||||
// Trial accounts cannot speak in chat channels or guild/officer chat. Whisper is handled later.
|
||||
// Addon traffic (LANG_ADDON) is excluded; it carries the Warden Lua check response over guild chat.
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_CHAT) && IsTrialAccount() && lang != LANG_ADDON
|
||||
&& (type == CHAT_MSG_CHANNEL || type == CHAT_MSG_GUILD || type == CHAT_MSG_OFFICER))
|
||||
{
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_RESTRICTED, LANG_UNIVERSAL, sender, sender, "");
|
||||
SendPacket(&data);
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
|
||||
// pussywizard: chatting on most chat types requires 2 hours played to prevent spam/abuse
|
||||
if (!HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHAT_CHANNEL_REQ))
|
||||
{
|
||||
@@ -398,6 +411,17 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
// Trial accounts can only whisper players who have them on their friend list, or players who whispered them first.
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_CHAT) && IsTrialAccount() && receiver != sender
|
||||
&& !receiver->GetSocial()->HasFriend(sender->GetGUID())
|
||||
&& !sender->IsInWhisperWhiteList(receiver->GetGUID()))
|
||||
{
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_RESTRICTED, LANG_UNIVERSAL, sender, sender, "");
|
||||
SendPacket(&data);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT) && senderIsPlayer && receiverIsPlayer)
|
||||
if (GetPlayer()->GetTeamId() != receiver->GetTeamId())
|
||||
{
|
||||
@@ -417,6 +441,10 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
(HasPermission(rbac::RBAC_PERM_CAN_FILTER_WHISPERS) && !sender->isAcceptWhispers() && !sender->IsInWhisperWhiteList(receiver->GetGUID())))
|
||||
sender->AddWhisperWhiteList(receiver->GetGUID());
|
||||
|
||||
// Allow a trial-account recipient to whisper back without being on the sender's friend list.
|
||||
if (receiver->GetSession()->IsTrialAccount() && !receiver->IsInWhisperWhiteList(sender->GetGUID()))
|
||||
receiver->AddWhisperWhiteList(sender->GetGUID());
|
||||
|
||||
GetPlayer()->Whisper(msg, Language(lang), receiver);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -89,6 +89,12 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
|
||||
if (!sScriptMgr->OnPlayerCanGroupInvite(invitingPlayer, membername))
|
||||
return;
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_PARTY) && IsTrialAccount())
|
||||
{
|
||||
SendPartyResult(PARTY_OP_INVITE, membername, ERR_INVITE_RESTRICTED);
|
||||
return;
|
||||
}
|
||||
|
||||
if (invitingPlayer->IsSpectator() || invitedPlayer->IsSpectator())
|
||||
{
|
||||
SendPartyResult(PARTY_OP_INVITE, membername, ERR_INVITE_RESTRICTED);
|
||||
@@ -244,6 +250,40 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recvData)
|
||||
if (!sScriptMgr->OnPlayerCanGroupAccept(GetPlayer(), group))
|
||||
return;
|
||||
|
||||
Player* leader = ObjectAccessor::FindConnectedPlayer(group->GetLeaderGUID());
|
||||
|
||||
// Trial accounts cannot join a group whose existing members are above the trial level cap.
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_PARTY) && IsTrialAccount())
|
||||
{
|
||||
if (uint32 trialLevelCap = sWorld->getIntConfig(CONFIG_TRIAL_LEVEL_CAP))
|
||||
{
|
||||
uint8 leaderLevel = leader ? leader->GetLevel() : sCharacterCache->GetCharacterLevelByGuid(group->GetLeaderGUID());
|
||||
if (leaderLevel > trialLevelCap)
|
||||
{
|
||||
SendPartyResult(PARTY_OP_INVITE, "", ERR_INVITE_RESTRICTED);
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto const& slot : group->GetMemberSlots())
|
||||
{
|
||||
if (slot.guid == GetPlayer()->GetGUID())
|
||||
continue;
|
||||
|
||||
uint8 memberLevel = 0;
|
||||
if (Player* member = ObjectAccessor::FindConnectedPlayer(slot.guid))
|
||||
memberLevel = member->GetLevel();
|
||||
else
|
||||
memberLevel = sCharacterCache->GetCharacterLevelByGuid(slot.guid);
|
||||
|
||||
if (memberLevel > trialLevelCap)
|
||||
{
|
||||
SendPartyResult(PARTY_OP_INVITE, "", ERR_INVITE_RESTRICTED);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (group->GetLeaderGUID() == GetPlayer()->GetGUID())
|
||||
{
|
||||
LOG_ERROR("network.opcode", "HandleGroupAcceptOpcode: player {} ({}) tried to accept an invite to his own group",
|
||||
@@ -258,8 +298,6 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
Player* leader = ObjectAccessor::FindConnectedPlayer(group->GetLeaderGUID());
|
||||
|
||||
// Forming a new group, create it
|
||||
if (!group->IsCreated())
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
void WorldSession::HandleGuildQueryOpcode(WorldPackets::Guild::QueryGuildInfo& query)
|
||||
@@ -59,6 +60,14 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPackets::Guild::AcceptGuildInvit
|
||||
{
|
||||
LOG_DEBUG("guild", "CMSG_GUILD_ACCEPT [{}]", GetPlayer()->GetName());
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_GUILD) && IsTrialAccount())
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_INVITE, ERR_GUILD_PERMISSIONS);
|
||||
GetPlayer()->SetGuildIdInvited(0);
|
||||
GetPlayer()->SetInGuild(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!GetPlayer()->GetGuildId())
|
||||
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildIdInvited()))
|
||||
guild->HandleAcceptMember(this);
|
||||
|
||||
@@ -117,6 +117,12 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
|
||||
|
||||
Player* player = _player;
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_MAIL) && IsTrialAccount())
|
||||
{
|
||||
player->SendMailResult(0, MAIL_SEND, MAIL_ERR_DISABLED_FOR_TRIAL_ACC);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player->GetLevel() < sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ))
|
||||
{
|
||||
ChatHandler(this).SendNotification(LANG_MAIL_SENDER_REQ, sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ));
|
||||
|
||||
@@ -84,6 +84,12 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
|
||||
if (_player->GetGuildId())
|
||||
return;
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_GUILD) && IsTrialAccount())
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_PERMISSIONS);
|
||||
return;
|
||||
}
|
||||
|
||||
charterid = GUILD_CHARTER;
|
||||
cost = sWorld->getIntConfig(CONFIG_CHARTER_COST_GUILD);
|
||||
type = GUILD_CHARTER_TYPE;
|
||||
@@ -455,6 +461,12 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_GUILD) && IsTrialAccount())
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_INVITE, ERR_GUILD_PERMISSIONS);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_player->GetGuildId())
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_INVITE, ERR_ALREADY_IN_GUILD_S, _player->GetName());
|
||||
@@ -678,6 +690,12 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
|
||||
// Petition type (guild/arena) specific checks
|
||||
if (type == GUILD_CHARTER_TYPE)
|
||||
{
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_GUILD) && IsTrialAccount())
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_PERMISSIONS);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if player is already in a guild
|
||||
if (_player->GetGuildId())
|
||||
{
|
||||
|
||||
@@ -675,6 +675,13 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
|
||||
return;
|
||||
}
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_TRADE) && IsTrialAccount())
|
||||
{
|
||||
info.Status = TRADE_STATUS_TRIAL_ACCOUNT;
|
||||
SendTradeStatus(info);
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetPlayer()->IsSpectator())
|
||||
return;
|
||||
|
||||
@@ -722,6 +729,13 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
|
||||
return;
|
||||
}
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_TRADE) && pOther->GetSession()->IsTrialAccount())
|
||||
{
|
||||
info.Status = TRADE_STATUS_TRIAL_ACCOUNT;
|
||||
SendTradeStatus(info);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pOther->GetTeamId() != _player->GetTeamId() &&
|
||||
!GetPlayer()->GetSession()->HasPermission(rbac::RBAC_PERM_ALLOW_TWO_SIDE_TRADE))
|
||||
{
|
||||
|
||||
@@ -324,7 +324,12 @@ void WorldSessionMgr::AddSession_(WorldSession* session)
|
||||
// don't count this session when checking player limit
|
||||
--Sessions;
|
||||
|
||||
if (pLimit > 0 && Sessions >= pLimit && !session->HasPermission(rbac::RBAC_PERM_SKIP_QUEUE) && !session->CanSkipQueue() && !HasRecentlyDisconnected(session))
|
||||
// Trial accounts do not get account-flag queue priority. RBAC_PERM_SKIP_QUEUE is still honored
|
||||
// since it can be granted intentionally to specific accounts.
|
||||
bool trialQueueRestricted = sWorld->getBoolConfig(CONFIG_TRIAL_RESTRICTION_QUEUE) && session->IsTrialAccount();
|
||||
bool canSkipQueue = session->HasPermission(rbac::RBAC_PERM_SKIP_QUEUE) || (!trialQueueRestricted && session->CanSkipQueue());
|
||||
|
||||
if (pLimit > 0 && Sessions >= pLimit && !canSkipQueue && !HasRecentlyDisconnected(session))
|
||||
{
|
||||
AddQueuedPlayer(session);
|
||||
UpdateMaxSessionCounters();
|
||||
|
||||
@@ -348,6 +348,17 @@ void WorldConfig::BuildConfigCache()
|
||||
SetConfigValue<bool>(CONFIG_CHAT_MUTE_FIRST_LOGIN, "Chat.MuteFirstLogin", false);
|
||||
SetConfigValue<uint32>(CONFIG_CHAT_TIME_MUTE_FIRST_LOGIN, "Chat.MuteTimeFirstLogin", 120);
|
||||
|
||||
SetConfigValue<bool>(CONFIG_TRIAL_RESTRICTION_CHAT, "Trial.Restriction.Chat", true);
|
||||
SetConfigValue<bool>(CONFIG_TRIAL_RESTRICTION_MAIL, "Trial.Restriction.Mail", true);
|
||||
SetConfigValue<bool>(CONFIG_TRIAL_RESTRICTION_TRADE, "Trial.Restriction.Trade", true);
|
||||
SetConfigValue<bool>(CONFIG_TRIAL_RESTRICTION_AUCTION, "Trial.Restriction.Auction", true);
|
||||
SetConfigValue<bool>(CONFIG_TRIAL_RESTRICTION_PARTY, "Trial.Restriction.Party", true);
|
||||
SetConfigValue<bool>(CONFIG_TRIAL_RESTRICTION_GUILD, "Trial.Restriction.Guild", true);
|
||||
SetConfigValue<bool>(CONFIG_TRIAL_RESTRICTION_QUEUE, "Trial.Restriction.Queue", true);
|
||||
SetConfigValue<uint32>(CONFIG_TRIAL_LEVEL_CAP, "Trial.LevelCap", 20);
|
||||
SetConfigValue<uint32>(CONFIG_TRIAL_MONEY_CAP, "Trial.MoneyCap", 100000); // copper, 10 gold
|
||||
SetConfigValue<uint32>(CONFIG_TRIAL_TRADE_SKILL_CAP, "Trial.TradeSkillCap", 100);
|
||||
|
||||
SetConfigValue<uint32>(CONFIG_EVENT_ANNOUNCE, "Event.Announce", 0);
|
||||
|
||||
SetConfigValue<float>(CONFIG_CREATURE_LEASH_RADIUS, "CreatureLeashRadius", 30.0f);
|
||||
|
||||
@@ -501,6 +501,16 @@ enum ServerConfigs
|
||||
CONFIG_ACHIEVEMENT_REALM_FIRST_KILL_WINDOW,
|
||||
CONFIG_ACHIEVEMENT_REALM_FIRST_RACE_LIMIT_ONE_PER_CHARACTER,
|
||||
CONFIG_CHATLOG_ENABLED,
|
||||
CONFIG_TRIAL_RESTRICTION_CHAT,
|
||||
CONFIG_TRIAL_RESTRICTION_MAIL,
|
||||
CONFIG_TRIAL_RESTRICTION_TRADE,
|
||||
CONFIG_TRIAL_RESTRICTION_AUCTION,
|
||||
CONFIG_TRIAL_RESTRICTION_PARTY,
|
||||
CONFIG_TRIAL_RESTRICTION_GUILD,
|
||||
CONFIG_TRIAL_RESTRICTION_QUEUE,
|
||||
CONFIG_TRIAL_LEVEL_CAP,
|
||||
CONFIG_TRIAL_MONEY_CAP,
|
||||
CONFIG_TRIAL_TRADE_SKILL_CAP,
|
||||
|
||||
MAX_NUM_SERVER_CONFIGS
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user