Skip to content

Commit

Permalink
[Spell] Net Guard 11920 should reduce threat on target hit
Browse files Browse the repository at this point in the history
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

Closes #714
  • Loading branch information
AnonXS authored and killerwife committed Jan 3, 2025
1 parent 7a9e075 commit d184962
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
13 changes: 13 additions & 0 deletions src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1217,6 +1229,7 @@ void AddSC_spell_scripts()
RegisterSpellScript<PreventSpellIfSameAuraOnCaster>("spell_prevent_spell_if_same_aura_on_caster");
RegisterSpellScript<InstillLordValthalaksSpirit>("spell_instill_lord_valthalaks_spirit");
RegisterSpellScript<RetaliationCreature>("spell_retaliation_creature");
RegisterSpellScript<NetGuard>("spell_net_guard");
RegisterSpellScript<HateToHalf>("spell_hate_to_half");
RegisterSpellScript<HateToZero>("spell_hate_to_zero");
RegisterSpellScript<Stoned>("spell_stoned");
Expand Down

0 comments on commit d184962

Please sign in to comment.