From d18496236570aa8d11b632e80ab9f81c0d968121 Mon Sep 17 00:00:00 2001 From: AnonXS Date: Sun, 8 Dec 2024 23:35:33 +0100 Subject: [PATCH] [Spell] Net Guard 11920 should reduce threat on target hit Might be different by entry that uses the parent spell Confirmed for: c.16912 145200 -> 72600 c.1034 19400 -> 9700 c.485 seemed to work different Based on https://github.com/vmangos/core/commit/619b0d7278dcf084b98876a4c597d8deb635ea4c Closes https://github.com/cmangos/mangos-tbc/pull/714 --- sql/scriptdev2/spell.sql | 1 + .../AI/ScriptDevAI/scripts/world/spell_scripts.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/sql/scriptdev2/spell.sql b/sql/scriptdev2/spell.sql index 806b4157be..7c73926a1f 100644 --- a/sql/scriptdev2/spell.sql +++ b/sql/scriptdev2/spell.sql @@ -39,6 +39,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (26569,'spell_hate_to_zero'), (26637,'spell_hate_to_zero'), (10255,'spell_stoned'), +(11920,'spell_net_guard'), (12639,'spell_summon_hakkar'), (12948,'spell_hakkar_summoned'), (13278,'spell_gdr_channel'), diff --git a/src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp b/src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp index a78b8d646a..bf5660e3a4 100644 --- a/src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp +++ b/src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp @@ -863,6 +863,18 @@ struct RetaliationCreature : public SpellScript } }; +// 11920 - Net Guard +struct NetGuard : public SpellScript +{ + void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override + { + if (effIdx != EFFECT_INDEX_0) + return; + + spell->GetCaster()->getThreatManager().modifyThreatPercent(spell->GetUnitTarget(), -50); + } +}; + struct HateToHalf : public SpellScript { void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override @@ -1217,6 +1229,7 @@ void AddSC_spell_scripts() RegisterSpellScript("spell_prevent_spell_if_same_aura_on_caster"); RegisterSpellScript("spell_instill_lord_valthalaks_spirit"); RegisterSpellScript("spell_retaliation_creature"); + RegisterSpellScript("spell_net_guard"); RegisterSpellScript("spell_hate_to_half"); RegisterSpellScript("spell_hate_to_zero"); RegisterSpellScript("spell_stoned");