diff options
| author | ihm-tswow <76849026+ihm-tswow@users.noreply.github.com> | 2022-09-02 15:11:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-02 15:11:51 +0200 |
| commit | 44ac5cbbea4f8e17be978412681634130f006d16 (patch) | |
| tree | cf8baf68730073aa9337000869f9a478ecd21886 /src/server/scripts/Commands | |
| parent | d86dcce1c855c5d2d5b48c00ef0e929f87b8b36e (diff) | |
Core/Misc: Store skillline abilities grouped by skill id (#28199)
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 86e625f9d1b..57fe66a981f 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -435,16 +435,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 != skillId) - continue; + std::vector<SkillLineAbilityEntry const*> const* skillLineAbilities = GetSkillLineAbilitiesBySkill(skillId); + if (!skillLineAbilities) + return; + for (SkillLineAbilityEntry const* skillLine : *skillLineAbilities) + { // not high rank if (skillLine->SupercededBySpell) continue; |
