Skip to content

Commit b4c9616

Browse files
committed
[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 vmangos/core@619b0d7
1 parent a3b3626 commit b4c9616

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

sql/scriptdev2/spell.sql

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
3939
(26569,'spell_hate_to_zero'),
4040
(26637,'spell_hate_to_zero'),
4141
(10255,'spell_stoned'),
42+
(11920,'spell_net_guard'),
4243
(12639,'spell_summon_hakkar'),
4344
(12948,'spell_hakkar_summoned'),
4445
(13278,'spell_gdr_channel'),

src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,17 @@ struct RetaliationCreature : public SpellScript
861861
}
862862
};
863863

864+
struct NetGuard : public SpellScript
865+
{
866+
void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override
867+
{
868+
if (effIdx != EFFECT_INDEX_0)
869+
return;
870+
871+
spell->GetCaster()->getThreatManager().modifyThreatPercent(spell->GetUnitTarget(), -50);
872+
}
873+
};
874+
864875
struct HateToHalf : public SpellScript
865876
{
866877
void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override
@@ -1215,6 +1226,7 @@ void AddSC_spell_scripts()
12151226
RegisterSpellScript<PreventSpellIfSameAuraOnCaster>("spell_prevent_spell_if_same_aura_on_caster");
12161227
RegisterSpellScript<InstillLordValthalaksSpirit>("spell_instill_lord_valthalaks_spirit");
12171228
RegisterSpellScript<RetaliationCreature>("spell_retaliation_creature");
1229+
RegisterSpellScript<NetGuard>("spell_net_guard");
12181230
RegisterSpellScript<HateToHalf>("spell_hate_to_half");
12191231
RegisterSpellScript<HateToZero>("spell_hate_to_zero");
12201232
RegisterSpellScript<Stoned>("spell_stoned");

0 commit comments

Comments
 (0)