46 uint32 dungeon = slot & 0x00FFFFFF;
48 newDungeons.insert(dungeon);
60 TC_LOG_DEBUG(
"lfg",
"CMSG_DF_LEAVE {} in group: {} sent guid {}.",
70 TC_LOG_DEBUG(
"lfg",
"CMSG_LFG_PROPOSAL_RESULT {} proposal: {} accept: {}",
86 TC_LOG_DEBUG(
"lfg",
"CMSG_DF_SET_ROLES: Group {}, Player {}, Roles: {}",
94 TC_LOG_DEBUG(
"lfg",
"CMSG_LFG_SET_BOOT_VOTE {} agree: {}",
110 if (dfGetSystemInfo.
Player)
146 std::span<uint32 const> contentTuningReplacementConditionMask =
GetPlayer()->
m_playerData->CtrOptions->ConditionalFlags;
153 lfgPlayerInfo.
BlackList.
Slot.emplace_back(lock.first, lock.second.lockStatus, lock.second.requiredItemLevel, lock.second.currentItemLevel, 0);
155 for (
uint32 slot : randomDungeons)
157 lfgPlayerInfo.
Dungeon.emplace_back();
159 playerDungeonInfo.
Slot = slot;
177 if (
Quest const* quest =
sObjectMgr->GetQuestTemplate(reward->firstQuest))
181 quest =
sObjectMgr->GetQuestTemplate(reward->otherQuest);
188 if (
uint32 itemId = quest->RewardItemId[i])
189 playerDungeonInfo.
Rewards.
Item.emplace_back(itemId, quest->RewardItemCount[i]);
192 if (
uint32 curencyId = quest->RewardCurrencyId[i])
193 playerDungeonInfo.
Rewards.
Currency.emplace_back(curencyId, quest->RewardCurrencyCount[i]);
214 Player* plrg = itr.GetSource();
219 lfgPartyInfo.
Player.emplace_back();
222 for (
auto const& lock :
sLFGMgr->GetLockedDungeons(pguid))
223 lfgBlackList.
Slot.emplace_back(lock.first, lock.second.lockStatus, lock.second.requiredItemLevel, lock.second.currentItemLevel, 0);
256 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_UPDATE_STATUS {} updatetype: {}, party {}",
261 lfgUpdateStatus.
Ticket = *ticket;
264 lfgUpdateStatus.Reason = updateData.
updateType;
265 std::transform(updateData.
dungeons.begin(), updateData.
dungeons.end(), std::back_inserter(lfgUpdateStatus.Slots), [](
uint32 dungeonId)
267 return sLFGMgr->GetLFGDungeonEntry(dungeonId);
271 lfgUpdateStatus.IsParty = party;
272 lfgUpdateStatus.NotifyUI =
true;
273 lfgUpdateStatus.Joined = join;
275 lfgUpdateStatus.Queued = queued;
283 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_ROLE_CHOSEN {} guid: {} roles: {}",
305 std::transform(dungeons.begin(), dungeons.end(), std::back_inserter(lfgRoleCheckUpdate.
JoinSlots), [](
uint32 dungeonId)
307 return sLFGMgr->GetLFGDungeonEntry(dungeonId);
310 if (!roleCheck.
roles.empty())
316 for (lfg::LfgRolesMap::const_iterator it = roleCheck.
roles.begin(); it != roleCheck.
roles.end(); ++it)
318 if (it->first == roleCheck.
leader)
331 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_JOIN_RESULT {} checkResult: {} checkValue: {}",
336 lfgJoinResult.
Ticket = *ticket;
343 for (lfg::LfgLockPartyMap::const_iterator it = joinData.
lockmap.begin(); it != joinData.
lockmap.end(); ++it)
349 for (lfg::LfgLockMap::const_iterator itr = it->second.begin(); itr != it->second.end(); ++itr)
351 TC_LOG_TRACE(
"lfg",
"SendLfgJoinResult:: {} DungeonID: {} Lock status: {} Required itemLevel: {} Current itemLevel: {}",
352 it->first.ToString(), (itr->first & 0x00FFFFFF), itr->second.lockStatus, itr->second.requiredItemLevel, itr->second.currentItemLevel);
354 blackList.
Slot.emplace_back(itr->first, itr->second.lockStatus, itr->second.requiredItemLevel, itr->second.currentItemLevel, 0);
363 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_QUEUE_STATUS {} state: {}, dungeon: {}, waitTime: {}, "
364 "avgWaitTime: {}, waitTimeTanks: {}, waitTimeHealer: {}, waitTimeDps: {}, "
365 "queuedTime: {}, tanks: {}, healers: {}, dps: {}",
372 lfgQueueStatus.
Ticket = *ticket;
391 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_PLAYER_REWARD {} rdungeonEntry: {}, sdungeonEntry: {}, done: {}",
417 for (
const auto& vote : boot.
votes)
426 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_BOOT_PROPOSAL_UPDATE {} inProgress: {} - "
427 "didVote: {} - agree: {} - victim: {} votes: {} - agrees: {} - left: {} - "
428 "needed: {} - reason {}",
451 bool silent = !proposal.
isNew && gguid == proposal.
group;
454 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_PROPOSAL_UPDATE {} state: {}",
461 if (playerDungeons.find(proposal.
dungeonId) == playerDungeons.end())
462 dungeonEntry = (*playerDungeons.begin());
467 lfgProposalUpdate.
Ticket = *ticket;
470 lfgProposalUpdate.
Slot =
sLFGMgr->GetLFGDungeonEntry(dungeonEntry);
477 for (
auto const& player : proposal.
players)
479 lfgProposalUpdate.
Players.emplace_back();
480 auto& proposalPlayer = lfgProposalUpdate.
Players.back();
481 proposalPlayer.Roles = player.second.role;
482 proposalPlayer.Me = player.first == guid;
483 proposalPlayer.MyParty = !player.second.group.
IsEmpty() && player.second.group == proposal.
group;
484 proposalPlayer.SameParty = !player.second.group.
IsEmpty() && player.second.group == gguid;
500 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_OFFER_CONTINUE {} dungeon entry: {}",
507 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_TELEPORT_DENIED {} reason: {}",
DB2Storage< LFGDungeonsEntry > sLFGDungeonsStore("LFGDungeons.db2", &LfgDungeonsLoadInfo::Instance)
#define ASSERT_NOTNULL(pointer)
#define TC_LOG_DEBUG(filterType__, message__,...)
#define TC_LOG_TRACE(filterType__, message__,...)
#define QUEST_REWARD_ITEM_COUNT
#define QUEST_REWARD_CURRENCY_COUNT
ObjectGuid const & GetGUID() const
ObjectGuid GetGUID() const
GroupRefManager & GetMembers()
ObjectGuid GetLeaderGUID() const
std::string ToString() const
UF::UpdateField< UF::PlayerData, int32(WowCS::EntityFragment::CGObject), TYPEID_PLAYER > m_playerData
uint32 GetQuestXPReward(Quest const *quest)
bool CanRewardQuest(Quest const *quest, bool msg) const
uint32 GetQuestMoneyReward(Quest const *quest) const
Group * GetGroup(Optional< uint8 > partyIndex)
std::array< uint32, QUEST_REWARD_CURRENCY_COUNT > RewardCurrencyId
std::array< uint32, QUEST_REWARD_ITEM_COUNT > RewardItemId
std::array< uint32, QUEST_REWARD_ITEM_COUNT > RewardItemCount
std::array< uint32, QUEST_REWARD_CURRENCY_COUNT > RewardCurrencyCount
Array< uint32, 50 > Slots
std::vector< std::string_view > BlackListNames
WorldPacket const * Write() override
std::vector< LFGBlackList > BlackList
WorldPacket const * Write() override
std::vector< LFGPlayerRewards > Rewards
WorldPacket const * Write() override
std::vector< LFGProposalUpdatePlayer > Players
WorldPacket const * Write() override
uint32 AvgWaitTimeByRole[3]
WorldPacket const * Write() override
std::vector< LFGRoleCheckUpdateMember > Members
WorldPacket const * Write() override
std::vector< uint32 > JoinSlots
int32 GroupFinderActivityID
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< LFGBlackList > Player
std::vector< LfgPlayerDungeonInfo > Dungeon
WorldPacket const * Write() override
WorldPacket const * Write() override
void SendLfgPartyLockInfo()
void HandleDFGetSystemInfo(WorldPackets::LFG::DFGetSystemInfo &dfGetSystemInfo)
void HandleLfgProposalResultOpcode(WorldPackets::LFG::DFProposalResponse &dfProposalResponse)
void SendLfgJoinResult(lfg::LfgJoinResultData const &joinData)
void HandleLfgSetBootVoteOpcode(WorldPackets::LFG::DFBootPlayerVote &dfBootPlayerVote)
void SendLfgQueueStatus(lfg::LfgQueueStatusData const &queueData)
void SendLfgTeleportError(lfg::LfgTeleportResult err)
void HandleLfgSetRolesOpcode(WorldPackets::LFG::DFSetRoles &dfSetRoles)
std::string GetPlayerInfo() const
void SendLfgPlayerReward(lfg::LfgPlayerRewardData const &lfgPlayerRewardData)
Player * GetPlayer() const
void SendLfgOfferContinue(uint32 dungeonEntry)
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
void HandleLfgJoinOpcode(WorldPackets::LFG::DFJoin &dfJoin)
void SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const &pRoleCheck)
void HandleLfgLeaveOpcode(WorldPackets::LFG::DFLeave &dfLeave)
uint8 GetExpansion() const
void SendLfgRoleChosen(ObjectGuid guid, uint8 roles)
void SendLfgBootProposalUpdate(lfg::LfgPlayerBoot const &boot)
void SendLfgPlayerLockInfo()
void HandleDFGetJoinStatus(WorldPackets::LFG::DFGetJoinStatus &dfGetJoinStatus)
void HandleLfgTeleportOpcode(WorldPackets::LFG::DFTeleport &dfTeleport)
void SendLfgUpdateProposal(lfg::LfgProposal const &proposal)
void SendLfgUpdateStatus(lfg::LfgUpdateData const &updateData, bool party)
@ LFG_OPTION_ENABLE_DUNGEON_FINDER
@ LFG_OPTION_ENABLE_RAID_BROWSER
@ LFG_UPDATETYPE_ADDED_TO_QUEUE
@ LFG_UPDATETYPE_UPDATE_STATUS
@ LFG_UPDATETYPE_REMOVED_FROM_QUEUE
@ LFG_UPDATETYPE_PROPOSAL_BEGIN
@ LFG_UPDATETYPE_JOIN_QUEUE
@ LFG_UPDATETYPE_JOIN_QUEUE_INITIAL
@ LFG_GROUP_KICK_VOTES_NEEDED
LfgAnswer
Answer state (Also used to check compatibilites)
std::string GetStateString(LfgState state)
LfgTeleportResult
Teleport errors.
std::set< uint32 > LfgDungeonSet
@ LFG_JOIN_ROLE_CHECK_FAILED
Optional< ObjectGuid > PlayerGuid
std::vector< LFGBlackListSlot > Slot
LfgPlayerQuestReward Rewards
int32 PurseWeeklyQuantity
int32 CompletionCurrencyID
std::vector< LfgPlayerQuestRewardCurrency > Currency
std::vector< LfgPlayerQuestRewardItem > Item
std::vector< std::string_view > playersMissingRequirement
Stores information of a current vote to kick someone from a group.
std::string reason
Player guid to be kicked (can't vote)
LfgAnswerContainer votes
Vote in progress.
bool inProgress
Time left to vote.
ObjectGuid victim
Player votes (-1 not answer | 0 Not agree | 1 agree)
Stores group data related to proposal to join.
uint32 dungeonId
Proposal Id.
uint32 encounters
Time when we will cancel this proposal.
LfgProposalPlayerContainer players
Show order in update window.
bool isNew
Dungeon Encounters.
LfgProposalState state
Dungeon to join.
ObjectGuid group
State of the proposal.
Stores all rolecheck info of a group that wants to join.
LfgDungeonSet dungeons
State of the rolecheck.
LfgRolesMap roles
Time when the rolecheck will fail.
LfgRoleCheckState state
Player selected roles.
ObjectGuid leader
Random Dungeon Id.
uint32 rDungeonId
Dungeons group is applying for (expanded random dungeons)