[11642] Fixed some added in prev commit warnings.

This commit is contained in:
VladimirMangos 2011-06-18 06:07:24 +04:00
parent 1a25a19309
commit 74e7d5ddcd
2 changed files with 5 additions and 5 deletions

View file

@ -3464,7 +3464,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank, bo
if(sSpellMgr.IsPrimaryProfessionFirstRankSpell(spell_id))
{
uint32 freeProfs = GetFreePrimaryProfessionPoints()+1;
uint32 maxProfs = GetSession()->GetSecurity() < sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_MAX_PRIMARY_COUNT) ? sWorld.getConfig(CONFIG_UINT32_MAX_PRIMARY_TRADE_SKILL) : 10;
uint32 maxProfs = GetSession()->GetSecurity() < AccountTypes(sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_MAX_PRIMARY_COUNT)) ? sWorld.getConfig(CONFIG_UINT32_MAX_PRIMARY_TRADE_SKILL) : 10;
if(freeProfs <= maxProfs)
SetFreePrimaryProfessions(freeProfs);
}
@ -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() < 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() < 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;
@ -20020,7 +20020,7 @@ void Player::SetPhaseMask(uint32 newPhaseMask, bool update)
void Player::InitPrimaryProfessions()
{
uint32 maxProfs = GetSession()->GetSecurity() < sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_MAX_PRIMARY_COUNT)
uint32 maxProfs = GetSession()->GetSecurity() < AccountTypes(sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_MAX_PRIMARY_COUNT))
? sWorld.getConfig(CONFIG_UINT32_MAX_PRIMARY_TRADE_SKILL) : 10;
SetFreePrimaryProfessions(maxProfs);
}