mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Core/Achievement: correctly credit progress for skill-related achievements when learning a new skill. (#23249)
(cherry picked from commit 0a25069db4)
This commit is contained in:
@@ -5853,9 +5853,6 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal)
|
||||
|
||||
if (newVal)
|
||||
{
|
||||
UpdateCriteria(CriteriaType::SkillRaised, id);
|
||||
UpdateCriteria(CriteriaType::AchieveSkillStep, id);
|
||||
|
||||
// temporary bonuses
|
||||
for (AuraEffect* effect : GetAuraEffectsByType(SPELL_AURA_MOD_SKILL))
|
||||
if (effect->GetMiscValue() == int32(id))
|
||||
@@ -5872,6 +5869,8 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal)
|
||||
|
||||
// Learn all spells for skill
|
||||
LearnSkillRewardedSpells(id, newVal);
|
||||
UpdateCriteria(CriteriaType::SkillRaised, id);
|
||||
UpdateCriteria(CriteriaType::AchieveSkillStep, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user