@@ -3661,11 +3661,12 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
3661
3661
UpdateFreeTalentPoints(false);
3662
3662
}
3663
3663
3664
- // update free primary prof.points (if any , can be none in case GM .learn prof. learning)
3664
+ // update free primary prof.points (if not overflow setting , can be in case GM use before .learn prof. learning)
3665
3665
if (sSpellMgr.IsPrimaryProfessionFirstRankSpell(spell_id))
3666
3666
{
3667
3667
uint32 freeProfs = GetFreePrimaryProfessionPoints() + 1;
3668
- if (freeProfs <= sWorld.getConfig(CONFIG_UINT32_MAX_PRIMARY_TRADE_SKILL))
3668
+ uint32 maxProfs = GetSession()->GetSecurity() < AccountTypes(sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_MAX_PRIMARY_COUNT)) ? sWorld.getConfig(CONFIG_UINT32_MAX_PRIMARY_TRADE_SKILL) : 10;
3669
+ if (freeProfs <= maxProfs)
3669
3670
{
3670
3671
SetFreePrimaryProfessions(freeProfs);
3671
3672
}
@@ -4312,6 +4313,8 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
4312
4313
return TRAINER_SPELL_RED;
4313
4314
}
4314
4315
4316
+ bool prof = SpellMgr::IsProfessionSpell(trainer_spell->spell);
4317
+
4315
4318
// check level requirement
4316
4319
uint32 spellLevel = reqLevel ? reqLevel : TriggerSpell->spellLevel;
4317
4320
if (getLevel() < spellLevel)
@@ -4335,11 +4338,11 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
4335
4338
}
4336
4339
4337
4340
// check skill requirement
4338
- bool prof = SpellMgr::IsProfessionSpell(trainer_spell->spell);
4339
- if (prof || trainer_spell->reqSkill && GetBaseSkillValue(trainer_spell->reqSkill) < trainer_spell->reqSkillValue)
4340
- {
4341
- return TRAINER_SPELL_RED;
4342
- }
4341
+ if (! prof || GetSession()->GetSecurity() < AccountTypes(sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_SKILL)))
4342
+ if ( trainer_spell->reqSkill && GetBaseSkillValue(trainer_spell->reqSkill) < trainer_spell->reqSkillValue)
4343
+ {
4344
+ return TRAINER_SPELL_RED;
4345
+ }
4343
4346
4344
4347
// exist, already checked at loading
4345
4348
@@ -20814,7 +20817,9 @@ void Player::UpdateVisibilityOf(WorldObject const* viewPoint, WorldObject* targe
20814
20817
20815
20818
void Player::InitPrimaryProfessions()
20816
20819
{
20817
- SetFreePrimaryProfessions(sWorld.getConfig(CONFIG_UINT32_MAX_PRIMARY_TRADE_SKILL));
20820
+ uint32 maxProfs = GetSession()->GetSecurity() < AccountTypes(sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_MAX_PRIMARY_COUNT))
20821
+ ? sWorld.getConfig(CONFIG_UINT32_MAX_PRIMARY_TRADE_SKILL) : 10;
20822
+ SetFreePrimaryProfessions(maxProfs);
20818
20823
}
20819
20824
20820
20825
void Player::SetComboPoints()
0 commit comments