aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2023-01-26 18:38:10 +0100
committerGitHub <noreply@github.com>2023-01-26 18:38:10 +0100
commit58cd4e58f7d2f382903c8abe065b697d3a0bcb6b (patch)
tree916da7427ad74233869c27cdee02248d5bed40e7
parent2a79be02fd60bf37bbef7702194a5379503970a1 (diff)
Scripts/DK: Implemented Howling Blast (#28761)
-rw-r--r--sql/updates/world/master/2023_01_26_07_world.sql4
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp25
2 files changed, 29 insertions, 0 deletions
diff --git a/sql/updates/world/master/2023_01_26_07_world.sql b/sql/updates/world/master/2023_01_26_07_world.sql
new file mode 100644
index 00000000000..c09f2d32a31
--- /dev/null
+++ b/sql/updates/world/master/2023_01_26_07_world.sql
@@ -0,0 +1,4 @@
+-- Howling Blast
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN('spell_dk_howling_blast');
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(49184, 'spell_dk_howling_blast'):
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index 0d7f9f3da31..18220f6ce32 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -24,7 +24,9 @@
#include "ScriptMgr.h"
#include "Containers.h"
#include "ObjectMgr.h"
+#include "ObjectAccessor.h"
#include "Player.h"
+#include "Spell.h"
#include "SpellAuraEffects.h"
#include "SpellHistory.h"
#include "SpellScript.h"
@@ -52,6 +54,7 @@ enum DeathKnightSpells
SPELL_DK_DEATH_STRIKE_OFFHAND = 66188,
SPELL_DK_FESTERING_WOUND = 194310,
SPELL_DK_FROST = 137006,
+ SPELL_DK_FROST_FEVER = 55095,
SPELL_DK_FROST_SCYTHE = 207230,
SPELL_DK_GLYPH_OF_FOUL_MENAGERIE = 58642,
SPELL_DK_GLYPH_OF_THE_GEIST = 58640,
@@ -636,6 +639,27 @@ class spell_dk_glyph_of_scourge_strike_script : public SpellScript
}
};
+// 49184 - Howling Blast
+class spell_dk_howling_blast : public SpellScript
+{
+ PrepareSpellScript(spell_dk_howling_blast);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_DK_FROST_FEVER });
+ }
+
+ void HandleFrostFever(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell(GetHitUnit(), SPELL_DK_FROST_FEVER);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_dk_howling_blast::HandleFrostFever, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ }
+};
+
// 206940 - Mark of Blood
class spell_dk_mark_of_blood : public AuraScript
{
@@ -854,6 +878,7 @@ void AddSC_deathknight_spell_scripts()
RegisterSpellScript(spell_dk_festering_strike);
RegisterSpellScript(spell_dk_ghoul_explode);
RegisterSpellScript(spell_dk_glyph_of_scourge_strike_script);
+ RegisterSpellScript(spell_dk_howling_blast);
RegisterSpellScript(spell_dk_mark_of_blood);
RegisterSpellScript(spell_dk_necrosis);
RegisterSpellScript(spell_dk_pet_geist_transform);