@@ -5783,7 +5783,7 @@ float Player::GetSpellCritFromIntellect()
|
||||
return crit*100.0f;
|
||||
}
|
||||
|
||||
float Player::GetRatingCoefficient(CombatRating cr) const
|
||||
float Player::GetRatingMultiplier(CombatRating cr) const
|
||||
{
|
||||
uint8 level = getLevel();
|
||||
|
||||
@@ -5791,15 +5791,17 @@ float Player::GetRatingCoefficient(CombatRating cr) const
|
||||
level = GT_MAX_LEVEL;
|
||||
|
||||
GtCombatRatingsEntry const *Rating = sGtCombatRatingsStore.LookupEntry(cr*GT_MAX_LEVEL+level-1);
|
||||
if (Rating == NULL)
|
||||
// gtOCTClassCombatRatingScalarStore.dbc starts with 1, CombatRating with zero, so cr+1
|
||||
GtOCTClassCombatRatingScalarEntry const *classRating = sGtOCTClassCombatRatingScalarStore.LookupEntry((getClass()-1)*GT_MAX_RATING+cr+1);
|
||||
if (!Rating || !classRating)
|
||||
return 1.0f; // By default use minimum coefficient (not must be called)
|
||||
|
||||
return Rating->ratio;
|
||||
return classRating->ratio / Rating->ratio;
|
||||
}
|
||||
|
||||
float Player::GetRatingBonusValue(CombatRating cr) const
|
||||
{
|
||||
return float(GetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + cr)) / GetRatingCoefficient(cr);
|
||||
return float(GetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + cr)) * GetRatingMultiplier(cr);
|
||||
}
|
||||
|
||||
float Player::GetExpertiseDodgeOrParryReduction(WeaponAttackType attType) const
|
||||
@@ -5867,20 +5869,20 @@ void Player::ApplyRatingMod(CombatRating cr, int32 value, bool apply)
|
||||
{
|
||||
case CR_HASTE_MELEE:
|
||||
{
|
||||
float RatingChange = value / GetRatingCoefficient(cr);
|
||||
float RatingChange = value * GetRatingMultiplier(cr);
|
||||
ApplyAttackTimePercentMod(BASE_ATTACK, RatingChange, apply);
|
||||
ApplyAttackTimePercentMod(OFF_ATTACK, RatingChange, apply);
|
||||
break;
|
||||
}
|
||||
case CR_HASTE_RANGED:
|
||||
{
|
||||
float RatingChange = value / GetRatingCoefficient(cr);
|
||||
float RatingChange = value * GetRatingMultiplier(cr);
|
||||
ApplyAttackTimePercentMod(RANGED_ATTACK, RatingChange, apply);
|
||||
break;
|
||||
}
|
||||
case CR_HASTE_SPELL:
|
||||
{
|
||||
float RatingChange = value / GetRatingCoefficient(cr);
|
||||
float RatingChange = value * GetRatingMultiplier(cr);
|
||||
ApplyCastTimePercentMod(RatingChange, apply);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1844,7 +1844,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
float GetSpellCritFromIntellect();
|
||||
float OCTRegenHPPerSpirit();
|
||||
float OCTRegenMPPerSpirit();
|
||||
float GetRatingCoefficient(CombatRating cr) const;
|
||||
float GetRatingMultiplier(CombatRating cr) const;
|
||||
float GetRatingBonusValue(CombatRating cr) const;
|
||||
uint32 GetBaseSpellPowerBonus() { return m_baseSpellPower; }
|
||||
int32 GetSpellPenetrationItemMod() const { return m_spellPenetrationItemMod; }
|
||||
|
||||
Reference in New Issue
Block a user