mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-13 03:22:40 -04:00
Core/Stats:
- Update dodge base, parry cap and dodge cap values to cataclysm. - Remove useless function since defense skill was remove in 4.0.1
This commit is contained in:
@@ -5728,17 +5728,17 @@ void Player::GetDodgeFromAgility(float &diminishing, float &nondiminishing)
|
||||
// Table for base dodge values
|
||||
const float dodge_base[MAX_CLASSES] =
|
||||
{
|
||||
0.036640f, // Warrior
|
||||
0.034943f, // Paladi
|
||||
-0.040873f, // Hunter
|
||||
0.020957f, // Rogue
|
||||
0.034178f, // Priest
|
||||
0.037580f, // Warrior
|
||||
0.036520f, // Paladin
|
||||
-0.054500f, // Hunter
|
||||
-0.005900f, // Rogue
|
||||
0.031830f, // Priest
|
||||
0.036640f, // DK
|
||||
0.021080f, // Shaman
|
||||
0.036587f, // Mage
|
||||
0.024211f, // Warlock
|
||||
0.016750f, // Shaman
|
||||
0.034575f, // Mage
|
||||
0.020350f, // Warlock
|
||||
0.0f, // ??
|
||||
0.056097f // Druid
|
||||
0.049510f // Druid
|
||||
};
|
||||
// Crit/agility to dodge/agility coefficient multipliers; 3.2.0 increased required agility by 15%
|
||||
const float crit_to_dodge[MAX_CLASSES] =
|
||||
|
||||
@@ -1954,7 +1954,6 @@ class Player : public Unit, public GridObject<Player>
|
||||
inline void RecalculateRating(CombatRating cr) { ApplyRatingMod(cr, 0, true);}
|
||||
float GetMeleeCritFromAgility();
|
||||
void GetDodgeFromAgility(float &diminishing, float &nondiminishing);
|
||||
float GetMissPercentageFromDefence() const;
|
||||
float GetSpellCritFromIntellect();
|
||||
float OCTRegenHPPerSpirit();
|
||||
float OCTRegenMPPerSpirit();
|
||||
|
||||
@@ -571,43 +571,16 @@ const float m_diminishing_k[MAX_CLASSES] =
|
||||
0.9720f // Druid
|
||||
};
|
||||
|
||||
float Player::GetMissPercentageFromDefence() const
|
||||
{
|
||||
float const miss_cap[MAX_CLASSES] =
|
||||
{
|
||||
16.00f, // Warrior //correct
|
||||
16.00f, // Paladin //correct
|
||||
16.00f, // Hunter //?
|
||||
16.00f, // Rogue //?
|
||||
16.00f, // Priest //?
|
||||
16.00f, // DK //correct
|
||||
16.00f, // Shaman //?
|
||||
16.00f, // Mage //?
|
||||
16.00f, // Warlock //?
|
||||
0.0f, // ??
|
||||
16.00f // Druid //?
|
||||
};
|
||||
|
||||
float diminishing = 0.0f, nondiminishing = 0.0f;
|
||||
// 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;
|
||||
|
||||
// apply diminishing formula to diminishing miss chance
|
||||
uint32 pclass = getClass()-1;
|
||||
return nondiminishing + (diminishing * miss_cap[pclass] / (diminishing + miss_cap[pclass] * m_diminishing_k[pclass]));
|
||||
}
|
||||
|
||||
void Player::UpdateParryPercentage()
|
||||
{
|
||||
const float parry_cap[MAX_CLASSES] =
|
||||
{
|
||||
47.003525f, // Warrior
|
||||
47.003525f, // Paladin
|
||||
65.631440f, // Warrior
|
||||
65.631440f, // Paladin
|
||||
145.560408f, // Hunter
|
||||
145.560408f, // Rogue
|
||||
0.0f, // Priest
|
||||
47.003525f, // DK
|
||||
65.631440f, // DK
|
||||
145.560408f, // Shaman
|
||||
0.0f, // Mage
|
||||
0.0f, // Warlock
|
||||
@@ -639,12 +612,12 @@ void Player::UpdateDodgePercentage()
|
||||
{
|
||||
const float dodge_cap[MAX_CLASSES] =
|
||||
{
|
||||
88.129021f, // Warrior
|
||||
88.129021f, // Paladin
|
||||
65.631440f, // Warrior
|
||||
65.631440f, // Paladin
|
||||
145.560408f, // Hunter
|
||||
145.560408f, // Rogue
|
||||
150.375940f, // Priest
|
||||
88.129021f, // DK
|
||||
65.631440f, // DK
|
||||
145.560408f, // Shaman
|
||||
150.375940f, // Mage
|
||||
150.375940f, // Warlock
|
||||
|
||||
@@ -2585,9 +2585,6 @@ float Unit::GetUnitMissChance(WeaponAttackType attType) const
|
||||
{
|
||||
float miss_chance = 5.00f;
|
||||
|
||||
if (Player const* player = ToPlayer())
|
||||
miss_chance += player->GetMissPercentageFromDefence();
|
||||
|
||||
if (attType == RANGED_ATTACK)
|
||||
miss_chance -= GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_RANGED_HIT_CHANCE);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user