mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
fix(Core/Player): Use SkillLineAbility.dbc to determine player initia… (#6015)
* fix(Core/Player): Use SkillLineAbility.dbc to determine player initial spells - skill assignment done in a new table `playercreateinfo_skills` * Cherry-pick2a3546ca36* Cherry-Pickd28b66bca8* Cherry-Pick193408f335- Closes https://github.com/azerothcore/azerothcore-wotlk/issues/1659 - Closes https://github.com/azerothcore/azerothcore-wotlk/issues/6036 - Closes https://github.com/chromiecraft/chromiecraft/issues/693 Co-Authored-By: Shauren shauren.trinity@gmail.com Co-Authored-By: Rothend 67004168+Rothend@users.noreply.github.com Co-Authored-By: claudiodfc claudio.daniel.f.c@gmail.com
This commit is contained in:
@@ -970,10 +970,10 @@ bool SpellInfo::IsAbilityLearnedWithProfession() const
|
||||
for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
|
||||
{
|
||||
SkillLineAbilityEntry const* pAbility = _spell_idx->second;
|
||||
if (!pAbility || pAbility->learnOnGetSkill != ABILITY_LEARNED_ON_GET_PROFESSION_SKILL)
|
||||
if (!pAbility || pAbility->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE)
|
||||
continue;
|
||||
|
||||
if (pAbility->req_skill_value > 0)
|
||||
if (pAbility->MinSkillLineRank > 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -985,7 +985,7 @@ bool SpellInfo::IsAbilityOfSkillType(uint32 skillType) const
|
||||
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
|
||||
|
||||
for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
|
||||
if (_spell_idx->second->skillId == uint32(skillType))
|
||||
if (_spell_idx->second->SkillLine == uint32(skillType))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user