mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +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:
@@ -118,7 +118,7 @@ public:
|
||||
if (!entry)
|
||||
continue;
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->spellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->Spell);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
@@ -290,7 +290,8 @@ public:
|
||||
if (!handler->extractPlayerTarget((char*)args, &target))
|
||||
return false;
|
||||
|
||||
target->learnDefaultSpells();
|
||||
target->LearnDefaultSkills();
|
||||
target->LearnCustomSpells();
|
||||
target->learnQuestRewardedSpells();
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_DEFAULT_AND_QUEST, handler->GetNameLink(target).c_str());
|
||||
@@ -404,26 +405,26 @@ public:
|
||||
continue;
|
||||
|
||||
// wrong skill
|
||||
if (skillLine->skillId != skillId)
|
||||
if (skillLine->SkillLine != skillId)
|
||||
continue;
|
||||
|
||||
// not high rank
|
||||
if (skillLine->forward_spellid)
|
||||
if (skillLine->SupercededBySpell)
|
||||
continue;
|
||||
|
||||
// skip racial skills
|
||||
if (skillLine->racemask != 0)
|
||||
if (skillLine->RaceMask != 0)
|
||||
continue;
|
||||
|
||||
// skip wrong class skills
|
||||
if (skillLine->classmask && (skillLine->classmask & classmask) == 0)
|
||||
if (skillLine->ClassMask && (skillLine->ClassMask & classmask) == 0)
|
||||
continue;
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->spellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->Spell);
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo))
|
||||
continue;
|
||||
|
||||
player->learnSpell(skillLine->spellId);
|
||||
player->learnSpell(skillLine->Spell);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user