aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSpp <none@none>2010-12-22 13:20:18 +0100
committerSpp <none@none>2010-12-22 13:20:18 +0100
commit80a5cda77f360632baef0f99f317bc186566214c (patch)
tree35dae950d57907dc3b314e4070450149fb40a49e /src
parent09afac28389838a26b42eafce0b1856d60a10d74 (diff)
Core/Dungeon Finder: Fix wrong join result when joining with random dungeons and there are disabled dungeons. If no disabled dungeons players also got the same problem if they have done an heroic dungeon today
Thanks to j4r0d for the help spotting the error and testing --HG-- branch : trunk
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();
}
/**