diff options
| author | joschiwald <joschiwald@online.de> | 2013-07-24 15:18:24 -0700 |
|---|---|---|
| committer | joschiwald <joschiwald@online.de> | 2013-07-24 15:18:24 -0700 |
| commit | c4a1ad2810a1c2e2c2f2e2cbf26033ac3fbdc796 (patch) | |
| tree | 7aff3fda4aa4c013c96c8cbb91f67e61b1cf9c67 /src/server/scripts | |
| parent | 8a87ab04ee8fbe869093a1b2b1c48fca6439d164 (diff) | |
| parent | 10390465f2e964bbdaa892e3900980f50470c6c8 (diff) | |
Merge pull request #10342 from joschiwald/spellinfo_corrections
Core/Spells: operate spell correction on SpellInfo store instead of dbc ...
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_learn.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 09060e2e01b..baebc3d0bd5 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -116,8 +116,7 @@ public: else targetPlayer->learnSpell(spell, false); - uint32 firstSpell = sSpellMgr->GetFirstSpellInChain(spell); - if (GetTalentSpellCost(firstSpell)) + if (GetTalentSpellCost(spellInfo->GetFirstRankSpell()->Id)) targetPlayer->SendTalentsInfoData(false); return true; @@ -178,8 +177,7 @@ public: continue; // skip spells with first rank learned as talent (and all talents then also) - uint32 firstRank = sSpellMgr->GetFirstSpellInChain(spellInfo->Id); - if (GetTalentSpellCost(firstRank) > 0) + if (GetTalentSpellCost(spellInfo->GetFirstRankSpell()->Id) > 0) continue; // skip broken spells @@ -493,7 +491,7 @@ public: } if (allRanks) - spellId = sSpellMgr->GetFirstSpellInChain (spellId); + spellId = sSpellMgr->GetFirstSpellInChain(spellId); if (target->HasSpell(spellId)) target->removeSpell(spellId, false, !allRanks); |
