diff options
Diffstat (limited to 'src/game/Level3.cpp')
-rw-r--r-- | src/game/Level3.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index f66cab42c66..15d9f8f02d2 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -1769,12 +1769,16 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(const char* /*args*/) static void learnAllHighRanks(Player* player, uint32 spellid) { - SpellChainMapNext const& nextMap = spellmgr.GetSpellChainNext(); - for(SpellChainMapNext::const_iterator itr = nextMap.lower_bound(spellid); itr != nextMap.upper_bound(spellid); ++itr) + SpellChainNode const* node; + do { - player->learnSpell(itr->second); - learnAllHighRanks(player,itr->second); + node = spellmgr.GetSpellChainNode(spellid); + player->learnSpell(spellid); + if (!node) + break; + spellid=node->next; } + while (node->next); } bool ChatHandler::HandleLearnAllMyTalentsCommand(const char* /*args*/) |