aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAscathor <Ascathor@web.de>2014-02-17 01:05:19 +0100
committerAscathor <Break_the_Chain@web.de>2014-02-17 01:22:45 +0100
commitc223b88da2500f9fa23b26ab08d6a19dd78849e3 (patch)
treea09a96434c4fb989b41870cc3e0a4644317fdefe
parent52ac6567926236f75c07454dc466b00882c318d7 (diff)
Core/LFR: Fix a theoretical error with item_level
Despite the check never happening (player->GetAverageItemLevel() < 0 is impossible), it is more efficient. Also improves codestyle consistency. Original fix by @emsy.
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 1665eae0fcc..822ae904ef1 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -405,7 +405,7 @@ void LFGMgr::InitializeLockedDungeons(Player* player, uint8 level /* = 0 */)
lockData = LFG_LOCKSTATUS_NOT_IN_SEASON;
else if (AccessRequirement const* ar = sObjectMgr->GetAccessRequirement(dungeon->map, Difficulty(dungeon->difficulty)))
{
- if (player->GetAverageItemLevel() < ar->item_level)
+ if (ar->item_level && player->GetAverageItemLevel() < ar->item_level)
lockData = LFG_LOCKSTATUS_TOO_LOW_GEAR_SCORE;
else if (ar->achievement && !player->HasAchieved(ar->achievement))
lockData = LFG_LOCKSTATUS_MISSING_ACHIEVEMENT;