Fix(Core/Item): Wraith Scythe scales with spell power (#9901)

This commit is contained in:
Nefertumm
2022-01-03 17:05:45 -03:00
committed by GitHub
parent a84d10fda7
commit b7dcf93be4
2 changed files with 27 additions and 0 deletions

View File

@@ -3489,6 +3489,28 @@ class spell_item_recall : public SpellScript
}
};
// 16414 - Drain Life
class spell_item_wraith_scythe_drain_life : public SpellScript
{
PrepareSpellScript(spell_item_wraith_scythe_drain_life);
void CalculateDamage()
{
Unit* target = GetHitUnit();
Unit* caster = GetCaster();
if (target && caster)
{
uint32 sp = caster->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_ALL);
SetHitDamage(GetHitDamage() + sp);
}
}
void Register() override
{
OnHit += SpellHitFn(spell_item_wraith_scythe_drain_life::CalculateDamage);
}
};
void AddSC_item_spell_scripts()
{
RegisterSpellScript(spell_item_massive_seaforium_charge);
@@ -3596,4 +3618,5 @@ void AddSC_item_spell_scripts()
RegisterSpellScript(spell_item_goblin_bomb);
RegisterSpellScript(spell_item_linken_boomerang);
RegisterSpellScript(spell_item_recall);
RegisterSpellScript(spell_item_wraith_scythe_drain_life);
}