*Fix the dead loop in Player::removeSpell, or at least optimize the cycle.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-01-30 15:57:41 +01:00
parent a120426f9f
commit 1b92277e8c
+1 -1
View File
@@ -3438,7 +3438,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
if (SpellChainNode const* node = spellmgr.GetSpellChainNode(spell_id)) if (SpellChainNode const* node = spellmgr.GetSpellChainNode(spell_id))
{ {
if (HasSpell(node->next) && !GetTalentSpellPos(node->next)) if (HasSpell(node->next) && !GetTalentSpellPos(node->next))
removeSpell(node->next,disabled); removeSpell(node->next,disabled, false);
} }
//unlearn spells dependent from recently removed spells //unlearn spells dependent from recently removed spells
SpellsRequiringSpellMap const &reqMap = spellmgr.GetSpellsRequiringSpell(); SpellsRequiringSpellMap const &reqMap = spellmgr.GetSpellsRequiringSpell();