aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorthenecromancer <none@none>2010-03-19 08:30:39 +0100
committerthenecromancer <none@none>2010-03-19 08:30:39 +0100
commitf1266ebec3cec67e8f6af569018dd428149b0063 (patch)
tree1a9e53ce4f83c7ed288cc4eeda8277746efc93be /src
parente67274392eb25a65761dc2a4518c7d0e970de187 (diff)
Update player damage reduction by resilience combat rating
Apply crit damage reduction to periodic crit damage --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuraEffects.cpp3
-rw-r--r--src/game/Unit.h6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp
index 4042f5f8af4..f3e607537c7 100644
--- a/src/game/SpellAuraEffects.cpp
+++ b/src/game/SpellAuraEffects.cpp
@@ -1268,7 +1268,10 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
bool crit = IsPeriodicTickCrit(target, caster);
if (crit)
+ {
damage = caster->SpellCriticalDamageBonus(m_spellProto, damage, target);
+ damage -= target->GetSpellCritDamageReduction(damage);
+ }
// only from players
if (IS_PLAYER_GUID(GetCasterGUID()))
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 5e40703fd74..67c45ad3605 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -1308,9 +1308,9 @@ class Unit : public WorldObject
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%
- uint32 GetMeleeDamageReduction(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, 1.0f, 100.0f, damage); }
- uint32 GetSpellDamageReduction(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, 2.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;
SpellMissInfo MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell);