aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-09-01 15:33:07 -0500
committermegamage <none@none>2009-09-01 15:33:07 -0500
commit4337d98863d8d36566a44047c2446062f51ee263 (patch)
tree97b6ac521c1e9bffcfaf2e9737ff5c02faf5f65e /src
parent69c0e34df4b95d214ed6ba46ae72a737142b4a38 (diff)
[8431] Avoid unlearn class skills at unlearn spell learned at skill learn. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index b35f5966608..6255426c11a 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -3496,7 +3496,8 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
if (!pSkill)
continue;
- if (_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL ||
+ if(_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL &&
+ pSkill->categoryId != SKILL_CATEGORY_CLASS ||// not unlearn class skills (spellbook/talent pages)
// lockpicking/runeforging special case, not have ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL
(pSkill->id==SKILL_LOCKPICKING || pSkill->id==SKILL_RUNEFORGING) && _spell_idx->second->max_value==0 )
{