Core/Spells: rework part 5: GameObject casting

Closes #21330
Closes #18885
Ref #18752

(cherry picked from commit 45c5e1b9d63796d168339a44f63418f220cf2403)
This commit is contained in:
ariel-
2021-08-28 15:59:11 +02:00
committed by Shauren
parent 65dca120d3
commit 962f6d7988
46 changed files with 2775 additions and 2419 deletions
+10 -8
View File
@@ -907,15 +907,17 @@ class spell_warl_unstable_affliction : public SpellScriptLoader
{
if (AuraEffect const* aurEff = GetEffect(EFFECT_1))
{
Unit* target = dispelInfo->GetDispeller();
int32 bp = aurEff->GetAmount();
bp = target->SpellDamageBonusTaken(caster, aurEff->GetSpellInfo(), bp, DOT);
bp *= 9;
if (Unit* target = dispelInfo->GetDispeller()->ToUnit())
{
int32 bp = aurEff->GetAmount();
bp = target->SpellDamageBonusTaken(caster, aurEff->GetSpellInfo(), bp, DOT);
bp *= 9;
// backfire damage and silence
CastSpellExtraArgs args(aurEff);
args.AddSpellBP0(bp);
caster->CastSpell(target, SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL, args);
// backfire damage and silence
CastSpellExtraArgs args(aurEff);
args.AddSpellBP0(bp);
caster->CastSpell(target, SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL, args);
}
}
}
}