diff options
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_learn.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index deba00eac0d..d06cce75a78 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -423,16 +423,12 @@ public: { uint32 classmask = player->GetClassMask(); - for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) - { - SkillLineAbilityEntry const* skillLine = sSkillLineAbilityStore.LookupEntry(j); - if (!skillLine) - continue; - - // wrong skill - if (skillLine->SkillLine != int32(skillId)) - continue; + std::vector<SkillLineAbilityEntry const*> const* skillLineAbilities = sDB2Manager.GetSkillLineAbilitiesBySkill(skillId); + if (!skillLineAbilities) + return; + for (SkillLineAbilityEntry const* skillLine : *skillLineAbilities) + { // not high rank if (skillLine->SupercedesSpell) continue; |
