Core/Spells: Howling Blast will now deal 50% damage to all secondary targets

This commit is contained in:
Ovahlord
2018-06-16 18:24:05 +02:00
parent e37cf502c6
commit 48971da561
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_dk_howling_blast';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(49184, 'spell_dk_howling_blast');

View File

@@ -1730,6 +1730,44 @@ class spell_dk_runic_empowerment : public SpellScriptLoader
}
};
// 49184 - Howling Blast
class spell_dk_howling_blast : public SpellScriptLoader
{
public:
spell_dk_howling_blast() : SpellScriptLoader("spell_dk_howling_blast") { }
class spell_dk_howling_blast_SpellScript : public SpellScript
{
PrepareSpellScript(spell_dk_howling_blast_SpellScript);
void HandleBeforeCast()
{
if (Unit* target = GetExplTargetUnit())
guid = target->GetGUID();
}
void HandleHit(SpellEffIndex /*effIndex*/)
{
if (GetHitUnit()->GetGUID() != guid)
SetHitDamage(CalculatePct(GetHitDamage(), GetSpellInfo()->Effects[EFFECT_2].BasePoints));
}
void Register() override
{
BeforeCast += SpellCastFn(spell_dk_howling_blast_SpellScript::HandleBeforeCast);
OnEffectHitTarget += SpellEffectFn(spell_dk_howling_blast_SpellScript::HandleHit, EFFECT_1, SPELL_EFFECT_SCHOOL_DAMAGE);
}
private:
ObjectGuid guid;
};
SpellScript* GetSpellScript() const override
{
return new spell_dk_howling_blast_SpellScript();
}
};
void AddSC_deathknight_spell_scripts()
{
new spell_dk_anti_magic_shell_raid();
@@ -1748,6 +1786,7 @@ void AddSC_deathknight_spell_scripts()
new spell_dk_death_strike();
new spell_dk_death_strike_enabler();
new spell_dk_ghoul_explode();
new spell_dk_howling_blast();
new spell_dk_icebound_fortitude();
new spell_dk_improved_blood_presence();
new spell_dk_improved_frost_presence();