diff --git a/Source/Framework/Constants/SharedConst.cs b/Source/Framework/Constants/SharedConst.cs index 40c062386..61df16896 100644 --- a/Source/Framework/Constants/SharedConst.cs +++ b/Source/Framework/Constants/SharedConst.cs @@ -1033,7 +1033,6 @@ namespace Framework.Constants AllowTwoSideInteractionGroup, AllowTwoSideInteractionGuild, AllowTwoSideTrade, - AlwaysMaxskill, ArenaLogExtendedInfo, ArenaMaxRatingDifference, ArenaQueueAnnouncerEnable, diff --git a/Source/Game/Chat/Commands/SpellCommands.cs b/Source/Game/Chat/Commands/SpellCommands.cs index beb25197d..8fe59cbb5 100644 --- a/Source/Game/Chat/Commands/SpellCommands.cs +++ b/Source/Game/Chat/Commands/SpellCommands.cs @@ -123,21 +123,6 @@ namespace Game.Chat return true; } - [CommandNonGroup("maxskill", RBACPermissions.CommandMaxskill)] - static bool HandleMaxSkillCommand(StringArguments args, CommandHandler handler) - { - Player player = handler.GetSelectedPlayerOrSelf(); - if (!player) - { - handler.SendSysMessage(CypherStrings.NoCharSelected); - return false; - } - - // each skills that have max skill value dependent from level seted to current level max skill value - player.UpdateSkillsToMaxSkillsForLevel(); - return true; - } - [CommandNonGroup("setskill", RBACPermissions.CommandSetskill)] static bool SetSkill(StringArguments args, CommandHandler handler) { diff --git a/Source/Game/Entities/Player/Player.Spells.cs b/Source/Game/Entities/Player/Player.Spells.cs index a43e42ab5..0821dde9d 100644 --- a/Source/Game/Entities/Player/Player.Spells.cs +++ b/Source/Game/Entities/Player/Player.Spells.cs @@ -46,16 +46,13 @@ namespace Game.Entities if (Global.SpellMgr.GetSkillRangeType(rcEntry) == SkillRangeType.Level) { - ushort max = skillInfoField.SkillMaxRank[pair.Value.Pos]; - - // update only level dependent max skill values - if (max != 1) - { + if (rcEntry.Flags.HasAnyFlag(SkillRaceClassInfoFlags.AlwaysMaxValue)) SetSkillRank(pair.Value.Pos, maxSkill); - SetSkillMaxRank(pair.Value.Pos, maxSkill); - if (pair.Value.State != SkillState.New) - pair.Value.State = SkillState.Changed; - } + + SetSkillRank(pair.Value.Pos, maxSkill); + SetSkillMaxRank(pair.Value.Pos, maxSkill); + if (pair.Value.State != SkillState.New) + pair.Value.State = SkillState.Changed; } // Update level dependent skillline spells @@ -63,37 +60,6 @@ namespace Game.Entities } } - public void UpdateSkillsToMaxSkillsForLevel() - { - SkillInfo skillInfoField = m_activePlayerData.Skill; - - foreach (var pair in mSkillStatus) - { - if (pair.Value.State == SkillState.Deleted || skillInfoField.SkillRank[pair.Value.Pos] == 0) - continue; - - uint pskill = pair.Key; - SkillRaceClassInfoRecord rcEntry = Global.DB2Mgr.GetSkillRaceClassInfo(pskill, GetRace(), GetClass()); - if (rcEntry == null) - continue; - - if (Global.SpellMgr.IsProfessionOrRidingSkill(rcEntry.SkillID)) - continue; - - if (Global.SpellMgr.IsWeaponSkill(rcEntry.SkillID)) - continue; - - ushort max = skillInfoField.SkillMaxRank[pair.Value.Pos]; - if (max > 1) - { - SetSkillRank(pair.Value.Pos, max); - - if (pair.Value.State != SkillState.New) - pair.Value.State = SkillState.Changed; - } - } - } - public ushort GetSkillValue(SkillType skill) { if (skill == 0) @@ -1999,8 +1965,6 @@ namespace Game.Entities skillValue = maxValue; else if (GetClass() == Class.Deathknight) skillValue = (ushort)Math.Min(Math.Max(1, (GetLevel() - 1) * 5), maxValue); - else if (skillId == SkillType.FistWeapons) - skillValue = Math.Max((ushort)1, GetSkillValue(SkillType.Unarmed)); SetSkill(skillId, 0, skillValue, maxValue); break; diff --git a/Source/Game/Entities/Player/Player.cs b/Source/Game/Entities/Player/Player.cs index b41d0f464..479e5d125 100644 --- a/Source/Game/Entities/Player/Player.cs +++ b/Source/Game/Entities/Player/Player.cs @@ -5409,9 +5409,6 @@ namespace Game.Entities UpdateAllStats(); - if (WorldConfig.GetBoolValue(WorldCfg.AlwaysMaxskill)) // Max weapon skill when leveling up - UpdateSkillsToMaxSkillsForLevel(); - _ApplyAllLevelScaleItemMods(true); // Moved to above SetFullHealth so player will have full health from Heirlooms Aura artifactAura = GetAura(PlayerConst.ArtifactsAllWeaponsGeneralWeaponEquippedPassive); diff --git a/Source/Game/Server/WorldConfig.cs b/Source/Game/Server/WorldConfig.cs index 22c3d6614..db115cf7d 100644 --- a/Source/Game/Server/WorldConfig.cs +++ b/Source/Game/Server/WorldConfig.cs @@ -799,7 +799,6 @@ namespace Game Values[WorldCfg.ResetDuelHealthMana] = GetDefaultValue("ResetDuelHealthMana", false); Values[WorldCfg.StartAllExplored] = GetDefaultValue("PlayerStart.MapsExplored", false); Values[WorldCfg.StartAllRep] = GetDefaultValue("PlayerStart.AllReputation", false); - Values[WorldCfg.AlwaysMaxskill] = GetDefaultValue("AlwaysMaxWeaponSkill", false); Values[WorldCfg.PvpTokenEnable] = GetDefaultValue("PvPToken.Enable", false); Values[WorldCfg.PvpTokenMapType] = GetDefaultValue("PvPToken.MapAllowType", 4); Values[WorldCfg.PvpTokenId] = GetDefaultValue("PvPToken.ItemID", 29434); diff --git a/Source/WorldServer/WorldServer.conf.dist b/Source/WorldServer/WorldServer.conf.dist index ce3cf1f10..e0168443f 100644 --- a/Source/WorldServer/WorldServer.conf.dist +++ b/Source/WorldServer/WorldServer.conf.dist @@ -2807,15 +2807,6 @@ ResetDuelCooldowns = 0 ResetDuelHealthMana = 0 -# -# AlwaysMaxWeaponSkill -# Description: Players will automatically gain max weapon/defense skill when logging in, -# or leveling. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -AlwaysMaxWeaponSkill = 0 - # # PvPToken.Enable # Description: Character will receive a token after defeating another character that yields diff --git a/sql/updates/world/master/2020_06_25_00_world.sql b/sql/updates/world/master/2020_06_25_00_world.sql new file mode 100644 index 000000000..5423046dc --- /dev/null +++ b/sql/updates/world/master/2020_06_25_00_world.sql @@ -0,0 +1 @@ +DELETE FROM `command` WHERE `name`='maxskill';