diff options
| -rw-r--r-- | src/server/game/DungeonFinding/LFGMgr.cpp | 28 | ||||
| -rw-r--r-- | src/server/game/DungeonFinding/LFGMgr.h | 5 |
2 files changed, 15 insertions, 18 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 7f30b04e293..e5f46a234c1 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -42,19 +42,19 @@ namespace lfg { -LFGDungeonData::LFGDungeonData() : id(0), name(), map(0), type(0), expansion(0), group(0), contentTuningId(0), +LFGDungeonData::LFGDungeonData() : id(0), name(), map(0), type(0), expansion(0), group(0), minLevel(0), maxLevel(0), difficulty(DIFFICULTY_NONE), seasonal(false), x(0.0f), y(0.0f), z(0.0f), o(0.0f), requiredItemLevel(0), finalDungeonEncounterId(0) { } LFGDungeonData::LFGDungeonData(LFGDungeonsEntry const* dbc) : id(dbc->ID), name(dbc->Name[sWorld->GetDefaultDbcLocale()]), map(dbc->MapID), type(uint8(dbc->TypeID)), expansion(uint8(dbc->ExpansionLevel)), group(uint8(dbc->GroupID)), - contentTuningId(0), difficulty(Difficulty(dbc->DifficultyID)), + minLevel(dbc->MinLevel), maxLevel(dbc->MaxLevel), difficulty(Difficulty(dbc->DifficultyID)), seasonal((dbc->Flags[0] & LFG_FLAG_SEASONAL) != 0), x(0.0f), y(0.0f), z(0.0f), o(0.0f), - requiredItemLevel(0), finalDungeonEncounterId(0) + requiredItemLevel(dbc->MinGear), finalDungeonEncounterId(0) { - //if (JournalEncounterEntry const* journalEncounter = sJournalEncounterStore.LookupEntry(dbc->FinalEncounterID)) - // finalDungeonEncounterId = journalEncounter->DungeonEncounterID; + if (JournalEncounterEntry const* journalEncounter = sJournalEncounterStore.LookupEntry(dbc->FinalEncounterID)) + finalDungeonEncounterId = journalEncounter->DungeonEncounterID; } LFGMgr::LFGMgr() : m_QueueTimer(0), m_lfgProposalId(1), @@ -1761,13 +1761,10 @@ LfgLockMap LFGMgr::GetLockedDungeons(ObjectGuid guid) return LFG_LOCKSTATUS_RAID_LOCKED; if (sInstanceLockMgr.FindActiveInstanceLock(guid, { dungeon->map, Difficulty(dungeon->difficulty) })) return LFG_LOCKSTATUS_RAID_LOCKED; - if (Optional<ContentTuningLevels> levels = sDB2Manager.GetContentTuningData(dungeon->contentTuningId, 0 /*player->m_playerData->CtrOptions->ContentTuningConditionMask*/)) - { - if (levels->MinLevel > level) - return LFG_LOCKSTATUS_TOO_LOW_LEVEL; - if (levels->MaxLevel < level) - return LFG_LOCKSTATUS_TOO_HIGH_LEVEL; - } + if (dungeon->minLevel > level) + return LFG_LOCKSTATUS_TOO_LOW_LEVEL; + if (dungeon->maxLevel < level) + return LFG_LOCKSTATUS_TOO_HIGH_LEVEL; if (dungeon->seasonal && !IsSeasonActive(dungeon->id)) return LFG_LOCKSTATUS_NOT_IN_SEASON; if (dungeon->requiredItemLevel > player->GetAverageItemLevel()) @@ -2202,7 +2199,7 @@ uint32 LFGMgr::GetLFGDungeonEntry(uint32 id) return 0; } -LfgDungeonSet LFGMgr::GetRandomAndSeasonalDungeons(uint8 level, uint8 expansion, uint32 contentTuningReplacementConditionMask) +LfgDungeonSet LFGMgr::GetRandomAndSeasonalDungeons(uint8 level, uint8 expansion) { LfgDungeonSet randomDungeons; for (lfg::LFGDungeonContainer::const_iterator itr = LfgDungeonStore.begin(); itr != LfgDungeonStore.end(); ++itr) @@ -2214,9 +2211,8 @@ LfgDungeonSet LFGMgr::GetRandomAndSeasonalDungeons(uint8 level, uint8 expansion, if (dungeon.expansion > expansion) continue; - if (Optional<ContentTuningLevels> levels = sDB2Manager.GetContentTuningData(dungeon.contentTuningId, contentTuningReplacementConditionMask)) - if (levels->MinLevel > level || level > levels->MaxLevel) - continue; + if (dungeon.minLevel > level || level > dungeon.maxLevel) + continue; randomDungeons.insert(dungeon.Entry()); } diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index b33bbba451e..b9650e8c80f 100644 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -302,7 +302,8 @@ struct LFGDungeonData uint8 type; uint8 expansion; uint8 group; - uint32 contentTuningId; + uint8 minLevel; + uint8 maxLevel; Difficulty difficulty; bool seasonal; float x, y, z, o; @@ -408,7 +409,7 @@ class TC_GAME_API LFGMgr /// Gets the random dungeon reward corresponding to given dungeon and player level LfgReward const* GetRandomDungeonReward(uint32 dungeon, uint8 level); /// Returns all random and seasonal dungeons for given level and expansion - LfgDungeonSet GetRandomAndSeasonalDungeons(uint8 level, uint8 expansion, uint32 contentTuningReplacementConditionMask); + LfgDungeonSet GetRandomAndSeasonalDungeons(uint8 level, uint8 expansion); /// Teleport a player to/from selected dungeon void TeleportPlayer(Player* player, bool out, bool fromOpcode = false); /// Inits new proposal to boot a player |
