[11643] Restore skill/level checks at traning non-prof spells.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
SeTM 2011-06-18 17:10:02 +04:00 committed by VladimirMangos
parent 74e7d5ddcd
commit 9300842b04
2 changed files with 3 additions and 3 deletions

View file

@ -4104,7 +4104,7 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
bool prof = SpellMgr::IsProfessionSpell(trainer_spell->learnedSpell); bool prof = SpellMgr::IsProfessionSpell(trainer_spell->learnedSpell);
// check level requirement // check level requirement
if (prof && GetSession()->GetSecurity() < AccountTypes(sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_LEVEL))) if (!prof || GetSession()->GetSecurity() < AccountTypes(sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_LEVEL)))
if (getLevel() < trainer_spell->reqLevel) if (getLevel() < trainer_spell->reqLevel)
return TRAINER_SPELL_RED; return TRAINER_SPELL_RED;
@ -4120,7 +4120,7 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
} }
// check skill requirement // check skill requirement
if (prof && GetSession()->GetSecurity() < AccountTypes(sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_SKILL))) if (!prof || GetSession()->GetSecurity() < AccountTypes(sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_SKILL)))
if (trainer_spell->reqSkill && GetBaseSkillValue(trainer_spell->reqSkill) < trainer_spell->reqSkillValue) if (trainer_spell->reqSkill && GetBaseSkillValue(trainer_spell->reqSkill) < trainer_spell->reqSkillValue)
return TRAINER_SPELL_RED; return TRAINER_SPELL_RED;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11642" #define REVISION_NR "11643"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__