summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/sql/updates/pending_db_world/rev_1757938084848429700.sql4
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp29
2 files changed, 33 insertions, 0 deletions
diff --git a/data/sql/updates/pending_db_world/rev_1757938084848429700.sql b/data/sql/updates/pending_db_world/rev_1757938084848429700.sql
new file mode 100644
index 0000000000..e6aafd154d
--- /dev/null
+++ b/data/sql/updates/pending_db_world/rev_1757938084848429700.sql
@@ -0,0 +1,4 @@
+--
+DELETE FROM `spell_script_names` WHERE `spell_id` = 51009;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(51009, 'spell_soul_deflection');
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index 88013c47cb..8f352e8936 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -2143,6 +2143,34 @@ class spell_necropolis_beam: public SpellScript
}
};
+enum SoulDeflectionSpells
+{
+ SPELL_SOUL_DEFLECTION_DAMAGE = 51011
+};
+
+class spell_soul_deflection : public AuraScript
+{
+ PrepareAuraScript(spell_soul_deflection);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SOUL_DEFLECTION_DAMAGE });
+ }
+
+ void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
+ {
+ if (!eventInfo.GetDamageInfo() || !eventInfo.GetDamageInfo()->GetDamage() || !GetTarget())
+ return;
+
+ GetCaster()->CastCustomSpell(SPELL_SOUL_DEFLECTION_DAMAGE, SPELLVALUE_BASE_POINT0, eventInfo.GetDamageInfo()->GetDamage(), GetTarget(), true);
+ }
+
+ void Register() override
+ {
+ OnEffectProc += AuraEffectProcFn(spell_soul_deflection::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+};
+
void AddSC_borean_tundra()
{
RegisterSpellScript(spell_q11919_q11940_drake_hunt_aura);
@@ -2168,4 +2196,5 @@ void AddSC_borean_tundra()
new npc_bloodmage_laurith();
RegisterCreatureAI(npc_jenny);
RegisterSpellScript(spell_necropolis_beam);
+ RegisterSpellScript(spell_soul_deflection);
}