fix(Core/Players): Fixed obtaining extra (custom) talent points only … (#13526)

fix(Core/Players): Fixed obtaining extra (custom) talent points only for DK class.

Fixes #4327
This commit is contained in:
UltraNix
2022-10-29 12:15:32 +02:00
committed by GitHub
parent f3820bd375
commit 3da4d30371

View File

@@ -13316,14 +13316,21 @@ uint32 Player::CalculateTalentsPoints() const
{
uint32 base_talent = getLevel() < 10 ? 0 : getLevel() - 9;
uint32 talentPointsForLevel = 0;
if (getClass() != CLASS_DEATH_KNIGHT || GetMapId() != 609)
return uint32(base_talent * sWorld->getRate(RATE_TALENT));
uint32 talentPointsForLevel = getLevel() < 56 ? 0 : getLevel() - 55;
talentPointsForLevel += m_questRewardTalentCount;
if (talentPointsForLevel > base_talent)
{
talentPointsForLevel = base_talent;
}
else
{
talentPointsForLevel = getLevel() < 56 ? 0 : getLevel() - 55;
talentPointsForLevel += m_questRewardTalentCount;
if (talentPointsForLevel > base_talent)
{
talentPointsForLevel = base_talent;
}
}
talentPointsForLevel += m_extraBonusTalentCount;
return uint32(talentPointsForLevel * sWorld->getRate(RATE_TALENT));