mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 15:27:47 -04:00
Core/Stats:
- Defense skill doesn't exist since 4.0.X - Weapon skill doesn't increase during player's level anymore, it's set to the max value for level on each levelup.
This commit is contained in:
@@ -75,16 +75,16 @@ bool Player::UpdateStats(Stats stat)
|
||||
UpdateAllCritPercentages();
|
||||
UpdateDodgePercentage();
|
||||
break;
|
||||
case STAT_STAMINA: UpdateMaxHealth(); break;
|
||||
case STAT_STAMINA:
|
||||
UpdateMaxHealth();
|
||||
break;
|
||||
case STAT_INTELLECT:
|
||||
UpdateMaxPower(POWER_MANA);
|
||||
UpdateAllSpellCritChances();
|
||||
UpdateArmor(); //SPELL_AURA_MOD_RESISTANCE_OF_INTELLECT_PERCENT, only armor currently
|
||||
break;
|
||||
|
||||
case STAT_SPIRIT:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -155,7 +155,9 @@ bool Player::UpdateAllStats()
|
||||
UpdateAllRatings();
|
||||
UpdateAllCritPercentages();
|
||||
UpdateAllSpellCritChances();
|
||||
UpdateDefenseBonusesMod();
|
||||
UpdateBlockPercentage();
|
||||
UpdateParryPercentage();
|
||||
UpdateDodgePercentage();
|
||||
UpdateSpellDamageAndHealingBonus();
|
||||
UpdateManaRegen();
|
||||
UpdateExpertise(BASE_ATTACK);
|
||||
@@ -430,13 +432,6 @@ void Player::UpdateDamagePhysical(WeaponAttackType attType)
|
||||
}
|
||||
}
|
||||
|
||||
void Player::UpdateDefenseBonusesMod()
|
||||
{
|
||||
UpdateBlockPercentage();
|
||||
UpdateParryPercentage();
|
||||
UpdateDodgePercentage();
|
||||
}
|
||||
|
||||
void Player::UpdateBlockPercentage()
|
||||
{
|
||||
// No block
|
||||
@@ -482,7 +477,7 @@ void Player::UpdateCritPercentage(WeaponAttackType attType)
|
||||
|
||||
float value = GetTotalPercentageModValue(modGroup) + GetRatingBonusValue(cr);
|
||||
// Modify crit from weapon skill and maximized defense skill of same level victim difference
|
||||
value += (int32(GetWeaponSkillValue(attType)) - int32(GetMaxSkillValueForLevel())) * 0.04f;
|
||||
value += (int32(GetMaxSkillValueForLevel()) - int32(GetMaxSkillValueForLevel())) * 0.04f;
|
||||
value = value < 0.0f ? 0.0f : value;
|
||||
SetStatFloatValue(index, value);
|
||||
}
|
||||
@@ -540,9 +535,6 @@ void Player::UpdateParryPercentage()
|
||||
float nondiminishing = 5.0f;
|
||||
// Parry from rating
|
||||
float diminishing = GetRatingBonusValue(CR_PARRY);
|
||||
// Modify value from defense skill (only bonus from defense rating diminishes)
|
||||
nondiminishing += (GetSkillValue(SKILL_DEFENSE) - GetMaxSkillValueForLevel()) * 0.04f;
|
||||
diminishing += (int32(GetRatingBonusValue(CR_DEFENSE_SKILL))) * 0.04f;
|
||||
// Parry from SPELL_AURA_MOD_PARRY_PERCENT aura
|
||||
nondiminishing += GetTotalAuraModifier(SPELL_AURA_MOD_PARRY_PERCENT);
|
||||
// apply diminishing formula to diminishing parry chance
|
||||
@@ -571,9 +563,6 @@ void Player::UpdateDodgePercentage()
|
||||
|
||||
float diminishing = 0.0f, nondiminishing = 0.0f;
|
||||
GetDodgeFromAgility(diminishing, nondiminishing);
|
||||
// Modify value from defense skill (only bonus from defense rating diminishes)
|
||||
nondiminishing += (GetSkillValue(SKILL_DEFENSE) - GetMaxSkillValueForLevel()) * 0.04f;
|
||||
diminishing += (int32(GetRatingBonusValue(CR_DEFENSE_SKILL))) * 0.04f;
|
||||
// Dodge from SPELL_AURA_MOD_DODGE_PERCENT aura
|
||||
nondiminishing += GetTotalAuraModifier(SPELL_AURA_MOD_DODGE_PERCENT);
|
||||
// Dodge from rating
|
||||
|
||||
Reference in New Issue
Block a user