mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Players: Remove deprecated skill related config AlwaysMaxWeaponSkill and command .maxskill
This commit is contained in:
1
sql/updates/world/master/2020_06_25_00_world.sql
Normal file
1
sql/updates/world/master/2020_06_25_00_world.sql
Normal file
@@ -0,0 +1 @@
|
||||
DELETE FROM `command` WHERE `name`='maxskill';
|
||||
@@ -418,7 +418,7 @@ enum RBACPermissions
|
||||
RBAC_PERM_COMMAND_KICK = 510,
|
||||
RBAC_PERM_COMMAND_LINKGRAVE = 511,
|
||||
RBAC_PERM_COMMAND_LISTFREEZE = 512,
|
||||
RBAC_PERM_COMMAND_MAXSKILL = 513,
|
||||
RBAC_PERM_COMMAND_MAXSKILL = 513, // DEPRECATED: DON'T REUSE
|
||||
RBAC_PERM_COMMAND_MOVEGENS = 514,
|
||||
RBAC_PERM_COMMAND_MUTE = 515,
|
||||
RBAC_PERM_COMMAND_NEARGRAVE = 516,
|
||||
|
||||
@@ -2470,9 +2470,6 @@ void Player::GiveLevel(uint8 level)
|
||||
|
||||
UpdateAllStats();
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when leveling up
|
||||
UpdateSkillsToMaxSkillsForLevel();
|
||||
|
||||
_ApplyAllLevelScaleItemMods(true); // Moved to above SetFullHealth so player will have full health from Heirlooms
|
||||
|
||||
if (Aura const* artifactAura = GetAura(ARTIFACTS_ALL_WEAPONS_GENERAL_WEAPON_EQUIPPED_PASSIVE))
|
||||
@@ -5641,19 +5638,12 @@ void Player::UpdateSkillsForLevel()
|
||||
|
||||
if (GetSkillRangeType(rcEntry) == SKILL_RANGE_LEVEL)
|
||||
{
|
||||
if (!IsWeaponSkill(rcEntry->SkillID))
|
||||
{
|
||||
uint16 max = m_activePlayerData->Skill->SkillMaxRank[itr->second.pos];
|
||||
if (rcEntry->Flags & SKILL_FLAG_ALWAYS_MAX_VALUE)
|
||||
SetSkillRank(itr->second.pos, maxSkill);
|
||||
|
||||
/// update only level dependent max skill values
|
||||
if (max != 1)
|
||||
{
|
||||
SetSkillRank(itr->second.pos, maxSkill);
|
||||
SetSkillMaxRank(itr->second.pos, maxSkill);
|
||||
if (itr->second.uState != SKILL_NEW)
|
||||
itr->second.uState = SKILL_CHANGED;
|
||||
}
|
||||
}
|
||||
SetSkillMaxRank(itr->second.pos, maxSkill);
|
||||
if (itr->second.uState != SKILL_NEW)
|
||||
itr->second.uState = SKILL_CHANGED;
|
||||
}
|
||||
|
||||
// Update level dependent skillline spells
|
||||
@@ -5661,36 +5651,6 @@ void Player::UpdateSkillsForLevel()
|
||||
}
|
||||
}
|
||||
|
||||
void Player::UpdateSkillsToMaxSkillsForLevel()
|
||||
{
|
||||
for (SkillStatusMap::iterator itr = mSkillStatus.begin(); itr != mSkillStatus.end(); ++itr)
|
||||
{
|
||||
if (itr->second.uState == SKILL_DELETED || !m_activePlayerData->Skill->SkillRank[itr->second.pos])
|
||||
continue;
|
||||
|
||||
uint32 pskill = itr->first;
|
||||
SkillRaceClassInfoEntry const* rcEntry = sDB2Manager.GetSkillRaceClassInfo(pskill, getRace(), getClass());
|
||||
if (!rcEntry)
|
||||
continue;
|
||||
|
||||
if (IsProfessionOrRidingSkill(rcEntry->SkillID))
|
||||
continue;
|
||||
|
||||
if (IsWeaponSkill(rcEntry->SkillID))
|
||||
continue;
|
||||
|
||||
uint16 max = m_activePlayerData->Skill->SkillMaxRank[itr->second.pos];
|
||||
|
||||
if (max > 1)
|
||||
{
|
||||
SetSkillRank(itr->second.pos, max);
|
||||
|
||||
if (itr->second.uState != SKILL_NEW)
|
||||
itr->second.uState = SKILL_CHANGED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Player::InitializeSkillFields()
|
||||
{
|
||||
uint32 i = 0;
|
||||
@@ -24415,8 +24375,6 @@ void Player::LearnDefaultSkill(SkillRaceClassInfoEntry const* rcInfo)
|
||||
skillValue = maxValue;
|
||||
else if (getClass() == CLASS_DEATH_KNIGHT)
|
||||
skillValue = std::min(std::max<uint16>({ 1, uint16((getLevel() - 1) * 5) }), maxValue);
|
||||
else if (skillId == SKILL_FIST_WEAPONS)
|
||||
skillValue = std::max<uint16>(1, GetSkillValue(SKILL_UNARMED));
|
||||
|
||||
SetSkill(skillId, 0, skillValue, maxValue);
|
||||
break;
|
||||
|
||||
@@ -1961,7 +1961,6 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
int32 CalculateReputationGain(ReputationSource source, uint32 creatureOrQuestLevel, int32 rep, int32 faction, bool noQuestBonus = false);
|
||||
|
||||
void UpdateSkillsForLevel();
|
||||
void UpdateSkillsToMaxSkillsForLevel(); // for .levelup
|
||||
void ModifySkillBonus(uint32 skillid, int32 val, bool talent);
|
||||
|
||||
/*********************************************************/
|
||||
|
||||
@@ -1354,7 +1354,6 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_bool_configs[CONFIG_RESET_DUEL_HEALTH_MANA] = sConfigMgr->GetBoolDefault("ResetDuelHealthMana", false);
|
||||
m_bool_configs[CONFIG_START_ALL_EXPLORED] = sConfigMgr->GetBoolDefault("PlayerStart.MapsExplored", false);
|
||||
m_bool_configs[CONFIG_START_ALL_REP] = sConfigMgr->GetBoolDefault("PlayerStart.AllReputation", false);
|
||||
m_bool_configs[CONFIG_ALWAYS_MAXSKILL] = sConfigMgr->GetBoolDefault("AlwaysMaxWeaponSkill", false);
|
||||
m_bool_configs[CONFIG_PVP_TOKEN_ENABLE] = sConfigMgr->GetBoolDefault("PvPToken.Enable", false);
|
||||
m_int_configs[CONFIG_PVP_TOKEN_MAP_TYPE] = sConfigMgr->GetIntDefault("PvPToken.MapAllowType", 4);
|
||||
m_int_configs[CONFIG_PVP_TOKEN_ID] = sConfigMgr->GetIntDefault("PvPToken.ItemID", 29434);
|
||||
|
||||
@@ -145,7 +145,6 @@ enum WorldBoolConfigs
|
||||
CONFIG_START_ALL_SPELLS,
|
||||
CONFIG_START_ALL_EXPLORED,
|
||||
CONFIG_START_ALL_REP,
|
||||
CONFIG_ALWAYS_MAXSKILL,
|
||||
CONFIG_PVP_TOKEN_ENABLE,
|
||||
CONFIG_NO_RESET_TALENT_COST,
|
||||
CONFIG_SHOW_KICK_IN_WORLD,
|
||||
|
||||
@@ -93,7 +93,6 @@ public:
|
||||
{ "kick", rbac::RBAC_PERM_COMMAND_KICK, true, &HandleKickPlayerCommand, "" },
|
||||
{ "linkgrave", rbac::RBAC_PERM_COMMAND_LINKGRAVE, false, &HandleLinkGraveCommand, "" },
|
||||
{ "listfreeze", rbac::RBAC_PERM_COMMAND_LISTFREEZE, false, &HandleListFreezeCommand, "" },
|
||||
{ "maxskill", rbac::RBAC_PERM_COMMAND_MAXSKILL, false, &HandleMaxSkillCommand, "" },
|
||||
{ "movegens", rbac::RBAC_PERM_COMMAND_MOVEGENS, false, &HandleMovegensCommand, "" },
|
||||
{ "mute", rbac::RBAC_PERM_COMMAND_MUTE, true, &HandleMuteCommand, "" },
|
||||
{ "mutehistory", rbac::RBAC_PERM_COMMAND_MUTEHISTORY, true, &HandleMuteInfoCommand, "" },
|
||||
@@ -1498,22 +1497,6 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static bool HandleMaxSkillCommand(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
Player* player = handler->getSelectedPlayerOrSelf();
|
||||
if (!player)
|
||||
{
|
||||
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
// each skills that have max skill value dependent from level seted to current level max skill value
|
||||
player->UpdateSkillsToMaxSkillsForLevel();
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleSetSkillCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Hskill:skill_id|h[name]|h|r
|
||||
|
||||
@@ -3038,15 +3038,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
|
||||
|
||||
Reference in New Issue
Block a user