fix(Core/Player): Learn runeforging & lockpicking skills (#6612)

* cherry-pick commit (b1ac631f68)

Co-authored-by: r00ty-tc <173349+r00ty-tc@users.noreply.github.com>
This commit is contained in:
Kitzunu
2021-06-27 17:46:13 +02:00
committed by GitHub
parent b84f9b8a4b
commit ccd73918ae

View File

@@ -4108,7 +4108,9 @@ bool Player::_addSpell(uint32 spellId, uint8 addSpecMask, bool temporary, bool l
continue;
}
if (_spell_idx->second->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(pSkill->id))
// @todo confirm if rogues start wth lockpicking skill at level 1 but only recieve the spell to use it at level 16
// Added for runeforging, it is confirmed via sniff that this happens when death knights learn the spell, not on character creation.
if ((_spell_idx->second->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(pSkill->id)) || ((pSkill->id == SKILL_LOCKPICKING || pSkill->id == SKILL_RUNEFORGING) && _spell_idx->second->TrivialSkillLineRankHigh == 0))
{
LearnDefaultSkill(pSkill->id, 0);
}