diff options
author | QAston <none@none> | 2008-12-14 23:01:02 +0100 |
---|---|---|
committer | QAston <none@none> | 2008-12-14 23:01:02 +0100 |
commit | 42d52c1e1782b9f9bbccf37541fe32865c34cfe5 (patch) | |
tree | 2ba45b5a2783b6f86a90abb283ba0d44857cb365 /src/game/Level3.cpp | |
parent | 9948e98703d8d9044a3b8ad6dbd70a16e6181dc0 (diff) |
*Use prev_spell data calculated on startup instead of sql column.
*Changed map structure of req spell.
*Added precalculated data for next spell in rank and last one.
*Removed duplicated rank entries for some spells and used req_spell column instead.
*Allow required spell to have required spell.
--HG--
branch : trunk
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*/) |