Fix(Core/Item): Wraith Scythe scales with spell power (#9901)
This commit is contained in:
parent
a84d10fda7
commit
b7dcf93be4
2 changed files with 27 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1640656702788330300');
|
||||
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(16414, 'spell_item_wraith_scythe_drain_life');
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue