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)
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();
222 lfgPartyInfo.
Player.emplace_back();
225 for (
auto const& lock :
sLFGMgr->GetLockedDungeons(pguid))
226 lfgBlackList.
Slot.emplace_back(lock.first, lock.second.lockStatus, lock.second.requiredItemLevel, lock.second.currentItemLevel, 0);
259 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_UPDATE_STATUS {} updatetype: {}, party {}",
264 lfgUpdateStatus.
Ticket = *ticket;
268 std::transform(updateData.
dungeons.begin(), updateData.
dungeons.end(), std::back_inserter(lfgUpdateStatus.
Slots), [](
uint32 dungeonId)
270 return sLFGMgr->GetLFGDungeonEntry(dungeonId);
274 lfgUpdateStatus.
IsParty = party;
276 lfgUpdateStatus.
Joined = join;
278 lfgUpdateStatus.
Queued = queued;
286 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_ROLE_CHOSEN {} guid: {} roles: {}",
308 std::transform(dungeons.begin(), dungeons.end(), std::back_inserter(lfgRoleCheckUpdate.
JoinSlots), [](
uint32 dungeonId)
310 return sLFGMgr->GetLFGDungeonEntry(dungeonId);
313 if (!roleCheck.
roles.empty())
319 for (lfg::LfgRolesMap::const_iterator it = roleCheck.
roles.begin(); it != roleCheck.
roles.end(); ++it)
321 if (it->first == roleCheck.
leader)
334 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_JOIN_RESULT {} checkResult: {} checkValue: {}",
339 lfgJoinResult.
Ticket = *ticket;
346 for (lfg::LfgLockPartyMap::const_iterator it = joinData.
lockmap.begin(); it != joinData.
lockmap.end(); ++it)
352 for (lfg::LfgLockMap::const_iterator itr = it->second.begin(); itr != it->second.end(); ++itr)
354 TC_LOG_TRACE(
"lfg",
"SendLfgJoinResult:: {} DungeonID: {} Lock status: {} Required itemLevel: {} Current itemLevel: {}",
355 it->first.ToString(), (itr->first & 0x00FFFFFF), itr->second.lockStatus, itr->second.requiredItemLevel, itr->second.currentItemLevel);
357 blackList.
Slot.emplace_back(itr->first, itr->second.lockStatus, itr->second.requiredItemLevel, itr->second.currentItemLevel, 0);
366 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_QUEUE_STATUS {} state: {}, dungeon: {}, waitTime: {}, "
367 "avgWaitTime: {}, waitTimeTanks: {}, waitTimeHealer: {}, waitTimeDps: {}, "
368 "queuedTime: {}, tanks: {}, healers: {}, dps: {}",
375 lfgQueueStatus.
Ticket = *ticket;
394 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_PLAYER_REWARD {} rdungeonEntry: {}, sdungeonEntry: {}, done: {}",
420 for (
const auto& vote : boot.
votes)
429 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_BOOT_PROPOSAL_UPDATE {} inProgress: {} - "
430 "didVote: {} - agree: {} - victim: {} votes: {} - agrees: {} - left: {} - "
431 "needed: {} - reason {}",
454 bool silent = !proposal.
isNew && gguid == proposal.
group;
457 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_PROPOSAL_UPDATE {} state: {}",
464 if (playerDungeons.find(proposal.
dungeonId) == playerDungeons.end())
465 dungeonEntry = (*playerDungeons.begin());
470 lfgProposalUpdate.
Ticket = *ticket;
473 lfgProposalUpdate.
Slot =
sLFGMgr->GetLFGDungeonEntry(dungeonEntry);
480 for (
auto const& player : proposal.
players)
482 lfgProposalUpdate.
Players.emplace_back();
483 auto& proposalPlayer = lfgProposalUpdate.
Players.back();
484 proposalPlayer.Roles = player.second.role;
485 proposalPlayer.Me = player.first == guid;
486 proposalPlayer.MyParty = !player.second.group.
IsEmpty() && player.second.group == proposal.
group;
487 proposalPlayer.SameParty = !player.second.group.
IsEmpty() && player.second.group == gguid;
503 TC_LOG_DEBUG(
"lfg",
"SMSG_LFG_OFFER_CONTINUE {} dungeon entry: {}",
510 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__,...)
#define TC_LOG_TRACE(filterType__,...)
#define QUEST_REWARD_ITEM_COUNT
#define QUEST_REWARD_CURRENCY_COUNT
ObjectGuid GetGUID() const
GroupReference * GetFirstMember()
ObjectGuid GetLeaderGUID() const
std::string ToString() const
static ObjectGuid GetGUID(Object const *o)
UF::UpdateField< UF::PlayerData, 0, 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 const * > 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
std::vector< uint32 > Slots
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 const * > 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)