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

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 "11641" #define REVISION_NR "11642"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__