refactor(Core/Scripts): Spell To Scripts (#9718)

This commit is contained in:
IntelligentQuantum
2021-12-21 17:43:45 +03:30
committed by GitHub
parent 838c88f45a
commit 11a734bf2b
6 changed files with 103 additions and 31 deletions

View File

@@ -431,8 +431,25 @@ public:
}
};
class spell_four_horsemen_consumption : public SpellScript
{
PrepareSpellScript(spell_four_horsemen_consumption);
void HandleDamageCalc(SpellEffIndex /*effIndex*/)
{
uint32 damage = GetCaster()->GetMap()->ToInstanceMap()->GetDifficulty() == REGULAR_DIFFICULTY ? 2750 : 4250;
SetHitDamage(damage);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_four_horsemen_consumption::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};
void AddSC_boss_four_horsemen()
{
new boss_four_horsemen();
new spell_four_horsemen_mark();
RegisterSpellScript(spell_four_horsemen_consumption);
}