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:
+2
-2
@@ -3890,11 +3890,11 @@ bool Player::resetTalents(bool no_cost)
|
|||||||
// skip non-existant talent ranks
|
// skip non-existant talent ranks
|
||||||
if (talentInfo->RankID[rank] == 0)
|
if (talentInfo->RankID[rank] == 0)
|
||||||
continue;
|
continue;
|
||||||
removeSpell(talentInfo->RankID[rank], true);
|
removeSpell(talentInfo->RankID[rank]);
|
||||||
if (const SpellEntry *_spellEntry = sSpellStore.LookupEntry(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
|
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)
|
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
|
// 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]);
|
PlayerTalentMap::iterator plrTalent = m_talents[m_activeSpec]->find(talentInfo->RankID[rank]);
|
||||||
if (plrTalent != m_talents[m_activeSpec]->end())
|
if (plrTalent != m_talents[m_activeSpec]->end())
|
||||||
|
|||||||
Reference in New Issue
Block a user