aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-02-22 02:37:00 -0300
committerariel- <ariel-@users.noreply.github.com>2018-02-22 02:37:00 -0300
commit3753ec56476d597b180968eb673cb20776785f31 (patch)
tree0c8e3a6811cda3f023b8b508604c6a43a1bac6c9 /src
parent7cff1b540c96d9e2cf82b244cc0d1618bf5b090f (diff)
Core/Scripts: apply resilience on Vampiric Touch and Unstable Affliction dispel effect
- Spell with SPELL_ATTR4_FIXED_DAMAGE won't do it by itself to avoid applying resilience twice, but because those are triggered from a periodic aura, those apply resilience on tick, not saved to amount. - This is one of the cases where you have to call Unit::SpellDamageBonusTaken directly Closes #21393
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp6
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp11
2 files changed, 14 insertions, 3 deletions
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index 6d8812ecf43..336b2d54be6 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -1263,8 +1263,12 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
if (AuraEffect const* aurEff = GetEffect(EFFECT_1))
{
// backfire damage
+ int32 bp = aurEff->GetAmount();
+ bp = target->SpellDamageBonusTaken(caster, aurEff->GetSpellInfo(), bp, DOT);
+ bp *= 8;
+
CastSpellExtraArgs args(aurEff);
- args.AddSpellBP0(aurEff->GetAmount() * 8);
+ args.AddSpellBP0(bp);
caster->CastSpell(target, SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL, args);
}
}
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index 1232d524999..2746dc65144 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -1472,13 +1472,20 @@ class spell_warl_unstable_affliction : public SpellScriptLoader
void HandleDispel(DispelInfo* dispelInfo)
{
if (Unit* caster = GetCaster())
+ {
if (AuraEffect const* aurEff = GetEffect(EFFECT_0))
{
+ Unit* target = dispelInfo->GetDispeller();
+ int32 bp = aurEff->GetAmount();
+ bp = target->SpellDamageBonusTaken(caster, aurEff->GetSpellInfo(), bp, DOT);
+ bp *= 9;
+
// backfire damage and silence
CastSpellExtraArgs args(aurEff);
- args.AddSpellBP0(aurEff->GetAmount() * 9);
- caster->CastSpell(dispelInfo->GetDispeller(), SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL, args);
+ args.AddSpellBP0(bp);
+ caster->CastSpell(target, SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL, args);
}
+ }
}
void Register() override