aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);