From ad0fa5ab4a3627f46645eb1ab4d1a19d9a76cc2f Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 19 Dec 2020 00:48:22 +0100 Subject: [PATCH] Core/Quests: Fixed min level calculation --- src/server/game/Entities/Player/Player.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 63ea33b9b2d..45f7a5829f7 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -14940,8 +14940,9 @@ int32 Player::GetQuestMinLevel(Quest const* quest) const if (Optional questLevels = sDB2Manager.GetContentTuningData(quest->GetContentTuningId(), m_playerData->CtrOptions->ContentTuningConditionMask)) { ChrRacesEntry const* race = sChrRacesStore.AssertEntry(getRace()); - FactionTemplateEntry const* raceFaction = sFactionTemplateStore.LookupEntry(race->FactionID); - if (!raceFaction || raceFaction->FactionGroup != sContentTuningStore.AssertEntry(quest->GetContentTuningId())->GetScalingFactionGroup()) + FactionTemplateEntry const* raceFaction = sFactionTemplateStore.AssertEntry(race->FactionID); + int32 questFactionGroup = sContentTuningStore.AssertEntry(quest->GetContentTuningId())->GetScalingFactionGroup(); + if (questFactionGroup && raceFaction->FactionGroup != questFactionGroup) return questLevels->MaxLevel; return questLevels->MinLevelWithDelta;