aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Carrasco <manue.l@live.com.ar>2011-08-05 21:47:12 -0300
committerManuel Carrasco <manue.l@live.com.ar>2011-08-05 21:47:12 -0300
commit763d59aeec9931acbcbdd1c5f9b0fd3105ace299 (patch)
tree4cba967c3432215ecb90759933a6533fd961da8c
parent5b0b53a8c08ecc0d7478dd57de53fa19a966e2f4 (diff)
Core/Dungeon Finder: Added condition to avoid unnecessary checks to the joining result.
-rwxr-xr-xsrc/server/game/DungeonFinding/LFGMgr.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 9e9603dc5fe..87466436980 100755
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -539,14 +539,18 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
}
}
- // Expand random dungeons and check restrictions
- if (rDungeonId)
- dungeons = GetDungeonsByRandom(rDungeonId);
+ // it could be changed
+ if (joinData.result == LFG_JOIN_OK)
+ {
+ // Expand random dungeons and check restrictions
+ if (rDungeonId)
+ dungeons = GetDungeonsByRandom(rDungeonId);
- // if we have lockmap then there are no compatible dungeons
- GetCompatibleDungeons(dungeons, players, joinData.lockmap);
- if (dungeons.empty())
- joinData.result = grp ? LFG_JOIN_PARTY_NOT_MEET_REQS : LFG_JOIN_NOT_MEET_REQS;
+ // if we have lockmap then there are no compatible dungeons
+ GetCompatibleDungeons(dungeons, players, joinData.lockmap);
+ if (dungeons.empty())
+ joinData.result = grp ? LFG_JOIN_PARTY_NOT_MEET_REQS : LFG_JOIN_NOT_MEET_REQS;
+ }
}
// Can't join. Send result