[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);
// 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)
return TRAINER_SPELL_RED;
@ -4120,7 +4120,7 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
}
// 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)
return TRAINER_SPELL_RED;