aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSpp <none@none>2010-11-27 22:41:49 +0100
committerSpp <none@none>2010-11-27 22:41:49 +0100
commit74ddff0c4ec039f602d887ff33378f3ec5ce76c0 (patch)
tree29923de21049a355fb8e36cae01718cc0a762530 /src
parent777fb1a04ad303b60bb751156350d9d523397f46 (diff)
Core/Dungeon Finder: Fix role check algorithm (Some valid combinations were
being marked as invalid) --HG-- branch : trunk
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/DungeonFinding/LFGMgr.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 750bbaf585d..aa68a072225 100755
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -1425,9 +1425,6 @@ bool LFGMgr::CheckGroupRoles(LfgRolesMap &groles, bool removeLeaderFlag /*= true
if (it->second & ROLE_TANK)
{
- if (tank == LFG_TANKS_NEEDED)
- return false;
-
if (it->second != ROLE_TANK)
{
it->second -= ROLE_TANK;
@@ -1435,15 +1432,14 @@ bool LFGMgr::CheckGroupRoles(LfgRolesMap &groles, bool removeLeaderFlag /*= true
return true;
it->second += ROLE_TANK;
}
+ else if (tank == LFG_TANKS_NEEDED)
+ return false;
else
tank++;
}
if (it->second & ROLE_HEALER)
{
- if (healer == LFG_HEALERS_NEEDED)
- return false;
-
if (it->second != ROLE_HEALER)
{
it->second -= ROLE_HEALER;
@@ -1451,15 +1447,14 @@ bool LFGMgr::CheckGroupRoles(LfgRolesMap &groles, bool removeLeaderFlag /*= true
return true;
it->second += ROLE_HEALER;
}
+ else if (healer == LFG_HEALERS_NEEDED)
+ return false;
else
healer++;
}
if (it->second & ROLE_DAMAGE)
{
- if (damage == LFG_DPS_NEEDED)
- return false;
-
if (it->second != ROLE_DAMAGE)
{
it->second -= ROLE_DAMAGE;
@@ -1467,6 +1462,8 @@ bool LFGMgr::CheckGroupRoles(LfgRolesMap &groles, bool removeLeaderFlag /*= true
return true;
it->second += ROLE_DAMAGE;
}
+ else if (damage == LFG_DPS_NEEDED)
+ return false;
else
damage++;
}