[8431] Avoid unlearn class skills at unlearn spell learned at skill learn.

This commit is contained in:
VladimirMangos 2009-08-28 11:35:35 +04:00
parent 4cbaa5b186
commit e79a92cd3b
2 changed files with 3 additions and 2 deletions

View file

@ -3265,7 +3265,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 )
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8430"
#define REVISION_NR "8431"
#endif // __REVISION_NR_H__