Skip to content

Commit

Permalink
Core/Quests: Fixed min level calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Shauren committed Dec 18, 2020
1 parent b100917 commit ad0fa5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14940,8 +14940,9 @@ int32 Player::GetQuestMinLevel(Quest const* quest) const
if (Optional<ContentTuningLevels> 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;
Expand Down

0 comments on commit ad0fa5a

Please sign in to comment.