Scripts/Spells: Fix implementation of #22332 (#23228)

Change the way #22332 moved spell damage calculations from SpellEffectDMG to scripts, using OnEffectLaunchTarget and SetEffectValue instead

(cherry picked from commit 20772dbf5d)
This commit is contained in:
Giacomo Pozzoni
2019-05-02 14:34:23 +02:00
committed by Shauren
parent 97be87b7d5
commit 46170fdf01
2 changed files with 4 additions and 4 deletions

View File

@@ -144,12 +144,12 @@ class spell_rajaxx_thundercrash : public SpellScript
if (damage < 200)
damage = 200;
SetHitDamage(damage);
SetEffectValue(damage);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_rajaxx_thundercrash::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
OnEffectLaunchTarget += SpellEffectFn(spell_rajaxx_thundercrash::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};

View File

@@ -752,12 +752,12 @@ class boss_four_horsemen_sir : public CreatureScript
void HandleDamageCalc(SpellEffIndex /*effIndex*/)
{
uint32 damage = GetCaster()->GetMap()->IsHeroic() ? 4250 : 2750;
SetHitDamage(damage);
SetEffectValue(damage);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_four_horsemen_consumption::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
OnEffectLaunchTarget += SpellEffectFn(spell_four_horsemen_consumption::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};