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-pick 2a3546ca36

* Cherry-Pick d28b66bca8

* Cherry-Pick 193408f335

- 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:
Kitzunu
2021-06-21 21:23:18 +02:00
committed by GitHub
parent eeab4f5de6
commit 1be561e03b
17 changed files with 579 additions and 251 deletions

View File

@@ -111,7 +111,7 @@ void LoadSkillDiscoveryTable()
}
for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
SkillDiscoveryStore[-int32(_spell_idx->second->skillId)].push_back(SkillDiscoveryEntry(spellId, reqSkillValue, chance));
SkillDiscoveryStore[-int32(_spell_idx->second->SkillLine)].push_back(SkillDiscoveryEntry(spellId, reqSkillValue, chance));
}
else
{
@@ -153,7 +153,7 @@ uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player)
return 0;
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellId);
uint32 skillvalue = bounds.first != bounds.second ? player->GetSkillValue(bounds.first->second->skillId) : uint32(0);
uint32 skillvalue = bounds.first != bounds.second ? player->GetSkillValue(bounds.first->second->SkillLine) : uint32(0);
float full_chance = 0;
for (SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)