aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/LFGHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/LFGHandler.cpp')
-rw-r--r--src/server/game/Handlers/LFGHandler.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp
index 2ba9dff0b6e..33952a1dfda 100644
--- a/src/server/game/Handlers/LFGHandler.cpp
+++ b/src/server/game/Handlers/LFGHandler.cpp
@@ -91,14 +91,14 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPackets::LFG::LFGLeave& /*packet*/)
void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recvData)
{
- uint32 lfgGroupID; // Internal lfgGroupID
- bool accept; // Accept to join?
- recvData >> lfgGroupID;
+ uint32 proposalID; // Proposal ID
+ bool accept;
+ recvData >> proposalID;
recvData >> accept;
TC_LOG_DEBUG("lfg", "CMSG_LFG_PROPOSAL_RESULT {} proposal: {} accept: {}",
- GetPlayerInfo(), lfgGroupID, accept ? 1 : 0);
- sLFGMgr->UpdateProposal(lfgGroupID, GetPlayer()->GetGUID(), accept);
+ GetPlayerInfo(), proposalID, accept ? 1 : 0);
+ sLFGMgr->UpdateProposal(proposalID, GetPlayer()->GetGUID(), accept);
}
void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
@@ -153,10 +153,16 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData)
void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*/)
{
- ObjectGuid guid = GetPlayer()->GetGUID();
TC_LOG_DEBUG("lfg", "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST {}",
GetPlayerInfo());
+ SendLfgPlayerLockInfo();
+}
+
+void WorldSession::SendLfgPlayerLockInfo()
+{
+ ObjectGuid guid = GetPlayer()->GetGUID();
+
// Get Random dungeons that can be done at a certain level and expansion
uint8 level = GetPlayer()->GetLevel();
lfg::LfgDungeonSet const& randomDungeons =
@@ -224,9 +230,15 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*/)
{
- ObjectGuid guid = GetPlayer()->GetGUID();
TC_LOG_DEBUG("lfg", "CMSG_LFG_PARTY_LOCK_INFO_REQUEST {}", GetPlayerInfo());
+ SendLfgPartyLockInfo();
+}
+
+void WorldSession::SendLfgPartyLockInfo()
+{
+ ObjectGuid guid = GetPlayer()->GetGUID();
+
Group* group = GetPlayer()->GetGroup();
if (!group)
return;
@@ -575,6 +587,7 @@ void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
for (lfg::LfgProposalPlayerContainer::const_iterator it = proposal.players.begin(); it != proposal.players.end(); ++it)
{
lfg::LfgProposalPlayer const& player = it->second;
+
data << uint32(player.role); // Role
data << uint8(it->first == guid); // Self player
if (!player.group) // Player not it a group
@@ -587,6 +600,7 @@ void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
data << uint8(player.group == proposal.group); // In dungeon (silent)
data << uint8(player.group == gguid); // Same Group than player
}
+
data << uint8(player.accept != lfg::LFG_ANSWER_PENDING);// Answered
data << uint8(player.accept == lfg::LFG_ANSWER_AGREE); // Accepted
}