diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index a08c2e8a0..65d12f4ad 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -137,7 +137,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleModRegen, // 84 SPELL_AURA_MOD_REGEN &Aura::HandleModPowerRegen, // 85 SPELL_AURA_MOD_POWER_REGEN &Aura::HandleChannelDeathItem, // 86 SPELL_AURA_CHANNEL_DEATH_ITEM - &Aura::HandleNoImmediateEffect, // 87 SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN implemented in Unit::MeleeDamageBonusTaken and Unit::SpellDamageBonusTaken + &Aura::HandleDamagePercentTaken, // 87 SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN implemented in Unit::MeleeDamageBonusTaken and Unit::SpellDamageBonusTaken &Aura::HandleNoImmediateEffect, // 88 SPELL_AURA_MOD_HEALTH_REGEN_PERCENT implemented in Player::RegenerateHealth &Aura::HandlePeriodicDamagePCT, // 89 SPELL_AURA_PERIODIC_DAMAGE_PERCENT &Aura::HandleUnused, // 90 unused (3.0.8a-3.2.2a) old SPELL_AURA_MOD_RESIST_CHANCE @@ -5255,6 +5255,34 @@ void Aura::HandlePeriodicHeal(bool apply, bool /*Real*/) } } +void Aura::HandleDamagePercentTaken(bool apply, bool Real) +{ + m_isPeriodic = apply; + + Unit* target = GetTarget(); + + if (!Real) + return; + + // For prevent double apply bonuses + bool loading = (target->GetTypeId() == TYPEID_PLAYER && ((Player*)target)->GetSession()->PlayerLoading()); + + if (apply) + { + if (loading) + return; + + // Hand of Salvation (only it have this aura and mask) + if (GetSpellProto()->IsFitToFamily(SPELLFAMILY_PALADIN, UI64LIT(0x0000000000000100))) + { + // Glyph of Salvation + if (target->GetObjectGuid() == GetCasterGuid()) + if (Aura* aur = target->GetAura(63225, EFFECT_INDEX_0)) + m_modifier.m_amount -= aur->GetModifier()->m_amount; + } + } +} + void Aura::HandlePeriodicDamage(bool apply, bool Real) { // spells required only Real aura add/remove diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 3713e4c8a..acb36d715 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -302,6 +302,7 @@ class MANGOS_DLL_SPEC Aura void HandleModPowerRegen(bool Apply, bool Real); void HandleModPowerRegenPCT(bool Apply, bool Real); void HandleChannelDeathItem(bool Apply, bool Real); + void HandleDamagePercentTaken(bool Apply, bool Real); void HandlePeriodicDamagePCT(bool Apply, bool Real); void HandleAuraModAttackPower(bool Apply, bool Real); void HandleAuraTransform(bool Apply, bool Real); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 8c0aa5414..c2d1fe214 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11593" + #define REVISION_NR "11594" #endif // __REVISION_NR_H__