summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew <47818697+Nyeriah@users.noreply.github.com>2025-09-16 06:59:02 -0300
committerGitHub <noreply@github.com>2025-09-16 11:59:02 +0200
commit56f2a8e4f3c197b9cd6cecbe29c8e44b08656ae5 (patch)
tree45c188f576656b598f0a348336af98c2c219c441 /src
parentf31a7281bde22a8425373fded9a174769b77aaef (diff)
fix(Scripts/BoreanTundra): Script Soul Deflection spell (#22931)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp29
1 files changed, 29 insertions, 0 deletions
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);
}