diff --git a/cmake/MangosParams.cmake b/cmake/MangosParams.cmake index 546b8c162..27e274a29 100644 --- a/cmake/MangosParams.cmake +++ b/cmake/MangosParams.cmake @@ -1,5 +1,5 @@ set(MANGOS_EXP "CLASSIC") set(MANGOS_PKG "Mangos Zero") -set(MANGOS_WORLD_VER 2023031100) +set(MANGOS_WORLD_VER 2023053000) set(MANGOS_REALM_VER 2021010100) set(MANGOS_AHBOT_VER 2021010100) diff --git a/src/game/Object/Player.cpp b/src/game/Object/Player.cpp index e96f4ee54..52487b45e 100644 --- a/src/game/Object/Player.cpp +++ b/src/game/Object/Player.cpp @@ -3661,12 +3661,11 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) UpdateFreeTalentPoints(false); } - // update free primary prof.points (if not overflow setting, can be in case GM use before .learn prof. learning) + // update free primary prof.points (if any, can be none in case GM .learn prof. learning) if (sSpellMgr.IsPrimaryProfessionFirstRankSpell(spell_id)) { uint32 freeProfs = GetFreePrimaryProfessionPoints() + 1; - 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 <= sWorld.getConfig(CONFIG_UINT32_MAX_PRIMARY_TRADE_SKILL)) { SetFreePrimaryProfessions(freeProfs); } @@ -4313,8 +4312,6 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell return TRAINER_SPELL_RED; } - bool prof = SpellMgr::IsProfessionSpell(trainer_spell->spell); - // check level requirement uint32 spellLevel = reqLevel ? reqLevel : TriggerSpell->spellLevel; if (getLevel() < spellLevel) @@ -4338,11 +4335,11 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell } // check skill requirement - 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; - } + bool prof = SpellMgr::IsProfessionSpell(trainer_spell->spell); + if (prof || trainer_spell->reqSkill && GetBaseSkillValue(trainer_spell->reqSkill) < trainer_spell->reqSkillValue) + { + return TRAINER_SPELL_RED; + } // exist, already checked at loading @@ -20817,9 +20814,7 @@ void Player::UpdateVisibilityOf(WorldObject const* viewPoint, WorldObject* targe void Player::InitPrimaryProfessions() { - 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); + SetFreePrimaryProfessions(sWorld.getConfig(CONFIG_UINT32_MAX_PRIMARY_TRADE_SKILL)); } void Player::SetComboPoints() diff --git a/src/game/WorldHandlers/World.cpp b/src/game/WorldHandlers/World.cpp index cf6fae1b5..cc054b9be 100644 --- a/src/game/WorldHandlers/World.cpp +++ b/src/game/WorldHandlers/World.cpp @@ -649,10 +649,6 @@ void World::LoadConfigSettings(bool reload) setConfigMinMax(CONFIG_UINT32_MAX_PRIMARY_TRADE_SKILL, "MaxPrimaryTradeSkill", 2, 0, 10); - setConfigMinMax(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_MAX_PRIMARY_COUNT, "TradeSkill.GMIgnore.MaxPrimarySkillsCount", SEC_CONSOLE, SEC_PLAYER, SEC_CONSOLE); - setConfigMinMax(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_LEVEL, "TradeSkill.GMIgnore.Level", SEC_CONSOLE, SEC_PLAYER, SEC_CONSOLE); - setConfigMinMax(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_SKILL, "TradeSkill.GMIgnore.Skill", SEC_CONSOLE, SEC_PLAYER, SEC_CONSOLE); - setConfigMinMax(CONFIG_UINT32_MIN_PETITION_SIGNS, "MinPetitionSigns", 9, 0, 9); setConfig(CONFIG_UINT32_GM_LOGIN_STATE, "GM.LoginState", 2); diff --git a/src/game/WorldHandlers/World.h b/src/game/WorldHandlers/World.h index 14ba76f8f..a8e4a2b85 100644 --- a/src/game/WorldHandlers/World.h +++ b/src/game/WorldHandlers/World.h @@ -120,9 +120,6 @@ enum eConfigUInt32Values CONFIG_UINT32_TRAIN_EPIC_MOUNT_COST, CONFIG_UINT32_RABBIT_DAY, CONFIG_UINT32_MAX_PRIMARY_TRADE_SKILL, - CONFIG_UINT32_TRADE_SKILL_GMIGNORE_MAX_PRIMARY_COUNT, - CONFIG_UINT32_TRADE_SKILL_GMIGNORE_LEVEL, - CONFIG_UINT32_TRADE_SKILL_GMIGNORE_SKILL, CONFIG_UINT32_MIN_PETITION_SIGNS, CONFIG_UINT32_GM_LOGIN_STATE, CONFIG_UINT32_GM_VISIBLE_STATE, diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 2ce5e1be9..9120ea38b 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -715,18 +715,6 @@ SD3ErrorLogFile = "scriptdev3-errors.log" # Default: 2 # Max : 10 # -# TradeSkill.GMIgnore.MaxPrimarySkillsCount -# GM level starting from max primary skill count requirement ignored. -# Default: 4 (Console as noneone) -# -# TradeSkill.GMIgnore.Level -# GM level starting from trade skill level requirement ignored. -# Default: 4 (Console as noneone) -# -# TradeSkill.GMIgnore.Skill -# GM level starting from trade skill skill requirement ignored. -# Default: 4 (Console as noneone) -# # MinPetitionSigns # Min signatures count to creating guild (0..9). # Default: 9 @@ -836,9 +824,6 @@ TimerBar.Breath.Max = 60 TimerBar.Fire.GMLevel = 4 TimerBar.Fire.Max = 1 MaxPrimaryTradeSkill = 2 -TradeSkill.GMIgnore.MaxPrimarySkillsCount = 4 -TradeSkill.GMIgnore.Level = 4 -TradeSkill.GMIgnore.Skill = 4 MinPetitionSigns = 9 MaxGroupXPDistance = 74 MailDeliveryDelay = 3600