From c9eee8e524c70329c4f896e0d2712244475d8ef8 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Wed, 19 Aug 2009 22:38:08 +0200 Subject: [PATCH] *Use the pre-dual spec way of unlearning talents on top of the current one, to ensure that talents don't end up in the spell storage causing unexpected behaviour in game when trying to learn a talent. Note: If your players have trouble learning specific talents, or they have an abnormal amount of talent points, force a talent reset on them after this rev and it should be resolved. --HG-- branch : trunk --- src/game/Player.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 1fc04b4051..dd22c49c72 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -3774,8 +3774,9 @@ bool Player::resetTalents(bool no_cost) // to prevent unexpected lost normal learned spell skip another class talents if( (getClassMask() & talentTabInfo->ClassMask) == 0 ) continue; - - /* for (int j = 0; j < MAX_TALENT_RANK; j++) + + // Re-use pre-dual talent way of resetting talents, to ensure talents aren't being stored in spell storage. + for (int j = 0; j < MAX_TALENT_RANK; j++) { for(PlayerSpellMap::iterator itr = GetSpellMap().begin(); itr != GetSpellMap().end();) { @@ -3804,7 +3805,8 @@ bool Player::resetTalents(bool no_cost) else ++itr; } - } */ + } + PlayerTalentMap::iterator itr2 = m_talents[m_activeSpec]->begin(); for (; itr2 != m_talents[m_activeSpec]->end(); ++itr2) {