aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/DungeonFinding/LFGMgr.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 4cbb16af7aa..c7fe7249b28 100755
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -615,20 +615,16 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
// if we have lockmap then there are no compatible dungeons
GetCompatibleDungeons(dungeons, players, joinData.lockmap);
- if (!joinData.lockmap.empty())
- {
- joinData.result = LFG_JOIN_PARTY_NOT_MEET_REQS;
- sLog.outDebug("LFGMgr::Join: [" UI64FMTD "] joining with %u members. result: LFG_JOIN_PARTY_NOT_MEET_REQS", guid, uint8(players.size()));
- plr->GetSession()->SendLfgJoinResult(joinData);
- return;
- }
- joinData.lockmap.clear();
+ if (dungeons.empty())
+ joinData.result = grp ? LFG_JOIN_PARTY_NOT_MEET_REQS : LFG_JOIN_NOT_MEET_REQS;
}
// Can't join. Send result
if (joinData.result != LFG_JOIN_OK)
{
sLog.outDebug("LFGMgr::Join: [" UI64FMTD "] joining with %u members. result: %u", guid, grp ? grp->GetMembersCount() : 1, joinData.result);
+ if (!dungeons.empty()) // Only should show lockmap when have no dungeons available
+ joinData.lockmap.clear();
plr->GetSession()->SendLfgJoinResult(joinData);
return;
}
@@ -1215,11 +1211,11 @@ LfgAnswer LFGMgr::GetCompatibles(std::string key)
@param[in,out] dungeons Dungeons to check restrictions
@param[in] players Set of players to check their dungeon restrictions
- @param[in] returnLockMap Determines when to return a function value (Default true)
- @param[out] Map of players Lock status info of given dungeons
+ @param[out] lockMap Map of players Lock status info of given dungeons (Empty if dungeons is not empty)
*/
void LFGMgr::GetCompatibleDungeons(LfgDungeonSet& dungeons, const PlayerSet& players, LfgLockPartyMap& lockMap)
{
+ lockMap.clear();
for (PlayerSet::const_iterator it = players.begin(); it != players.end() && dungeons.size(); ++it)
{
uint64 guid = (*it)->GetGUID();
@@ -1235,6 +1231,8 @@ void LFGMgr::GetCompatibleDungeons(LfgDungeonSet& dungeons, const PlayerSet& pla
}
}
}
+ if (dungeons.size())
+ lockMap.clear();
}
/**