Fix: Give the correct amount of talent points when leveling up after a talent reset - patch by Liberate

Fixes issue #1568, fixes issue #765, fixes issue #772

--HG--
branch : trunk
This commit is contained in:
click
2010-05-02 16:19:38 +02:00
parent 5ebee9fbd0
commit e0cce6984c
+2 -2
View File
@@ -3890,11 +3890,11 @@ bool Player::resetTalents(bool no_cost)
// skip non-existant talent ranks
if (talentInfo->RankID[rank] == 0)
continue;
removeSpell(talentInfo->RankID[rank], true);
removeSpell(talentInfo->RankID[rank]);
if (const SpellEntry *_spellEntry = sSpellStore.LookupEntry(talentInfo->RankID[rank]))
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) // search through the SpellEntry for valid trigger spells
if (_spellEntry->EffectTriggerSpell[i] > 0 && _spellEntry->Effect[i] == SPELL_EFFECT_LEARN_SPELL)
removeSpell(_spellEntry->EffectTriggerSpell[i], true); // and remove any spells that the talent teaches
removeSpell(_spellEntry->EffectTriggerSpell[i]); // and remove any spells that the talent teaches
// if this talent rank can be found in the PlayerTalentMap, mark the talent as removed so it gets deleted
PlayerTalentMap::iterator plrTalent = m_talents[m_activeSpec]->find(talentInfo->RankID[rank]);
if (plrTalent != m_talents[m_activeSpec]->end())