diff options
author | QAston <none@none> | 2009-07-07 18:51:24 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-07 18:51:24 +0200 |
commit | 8d1abccd87644416b808b7cc6c7fa004dec0cbd0 (patch) | |
tree | 758a9dd3d8e25687ef0c1d0e4f90a7a813c4c185 /src | |
parent | 6e3b4b5a4f059796f8c5e5cf796a94f15a237047 (diff) |
*Fix the problem with sub-profs unlearning.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index ea0c66843a8..a3f784ac292 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -19158,8 +19158,10 @@ void Player::learnQuestRewardedSpells(Quest const* quest) if(!learnedInfo) return; + uint32 profSpell = spellmgr.GetSpellRequired(learned_0); + // specialization - if(learnedInfo->Effect[0]==SPELL_EFFECT_TRADE_SKILL && learnedInfo->Effect[1]==0) + if(learnedInfo->Effect[0]==SPELL_EFFECT_TRADE_SKILL && learnedInfo->Effect[1]==0 && profSpell) { // search other specialization for same prof for(PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr) @@ -19176,11 +19178,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest) continue; // compare same chain spells - if(spellmgr.GetFirstSpellInChain(itr->first) != first_spell) - continue; - - // now we have 2 specialization, learn possible only if found is lesser specialization rank - if(!spellmgr.IsHighRankOfSpell(learned_0,itr->first)) + if (spellmgr.GetSpellRequired(itr->first) == profSpell) return; } } |