Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spell] Net Guard 11920 should reduce threat on target hit #714

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
12 changes: 12 additions & 0 deletions src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,17 @@ struct RetaliationCreature : public SpellScript
}
};

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 @@ -1215,6 +1226,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