Update player damage reduction by resilience combat rating
Apply crit damage reduction to periodic crit damage --HG-- branch : trunk
This commit is contained in:
@@ -1268,7 +1268,10 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
|
|||||||
|
|
||||||
bool crit = IsPeriodicTickCrit(target, caster);
|
bool crit = IsPeriodicTickCrit(target, caster);
|
||||||
if (crit)
|
if (crit)
|
||||||
|
{
|
||||||
damage = caster->SpellCriticalDamageBonus(m_spellProto, damage, target);
|
damage = caster->SpellCriticalDamageBonus(m_spellProto, damage, target);
|
||||||
|
damage -= target->GetSpellCritDamageReduction(damage);
|
||||||
|
}
|
||||||
|
|
||||||
// only from players
|
// only from players
|
||||||
if (IS_PLAYER_GUID(GetCasterGUID()))
|
if (IS_PLAYER_GUID(GetCasterGUID()))
|
||||||
|
|||||||
+3
-3
@@ -1308,9 +1308,9 @@ class Unit : public WorldObject
|
|||||||
uint32 GetSpellCritDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_SPELL, 2.2f, 33.0f, damage); }
|
uint32 GetSpellCritDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_SPELL, 2.2f, 33.0f, damage); }
|
||||||
|
|
||||||
// player or player's pet resilience (-1%), cap 100%
|
// player or player's pet resilience (-1%), cap 100%
|
||||||
uint32 GetMeleeDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_MELEE, 1.0f, 100.0f, damage); }
|
uint32 GetMeleeDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_MELEE, 2.0f, 100.0f, damage); }
|
||||||
uint32 GetRangedDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_MELEE, 1.0f, 100.0f, damage); }
|
uint32 GetRangedDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_MELEE, 2.0f, 100.0f, damage); }
|
||||||
uint32 GetSpellDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_MELEE, 1.0f, 100.0f, damage); }
|
uint32 GetSpellDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_MELEE, 2.0f, 100.0f, damage); }
|
||||||
|
|
||||||
float MeleeSpellMissChance(const Unit *pVictim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const;
|
float MeleeSpellMissChance(const Unit *pVictim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const;
|
||||||
SpellMissInfo MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell);
|
SpellMissInfo MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell);
|
||||||
|
|||||||
Reference in New Issue
Block a user