diff options
author | Keader <keader.android@gmail.com> | 2020-06-28 13:14:25 -0300 |
---|---|---|
committer | Keader <keader.android@gmail.com> | 2020-06-28 13:14:25 -0300 |
commit | 6d16c39e76ed16bd6c401305fefc009c14d1157d (patch) | |
tree | 7f80e34c3f99bc4eb3f2ff77e7f1e92f6e6a477d /src | |
parent | 3d3621d5294a96cd6065869eccadca38185e9a64 (diff) |
Scripts/Warrior: Implemented threat effect of Intervene
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index 9b5ec6613bd..f2d43bec3cb 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -70,7 +70,8 @@ enum WarriorSpells SPELL_WARRIOR_SECOND_WIND_TRIGGER_2 = 29842, SPELL_WARRIOR_GLYPH_OF_BLOCKING = 58374, SPELL_WARRIOR_STOICISM = 70845, - SPELL_WARRIOR_T10_MELEE_4P_BONUS = 70847 + SPELL_WARRIOR_T10_MELEE_4P_BONUS = 70847, + SPELL_WARRIOR_INTERVENE_THREAT = 59667 }; enum WarriorSpellIcons @@ -583,6 +584,28 @@ class spell_warr_improved_spell_reflection : public SpellScriptLoader } }; +// 3411 - Intervene +class spell_war_intervene : public SpellScript +{ + PrepareSpellScript(spell_war_intervene); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_WARRIOR_INTERVENE_THREAT }); + } + + void HandleThreat(SpellEffIndex /*effIndex*/) + { + Unit* target = GetHitUnit(); + target->CastSpell(target, SPELL_WARRIOR_INTERVENE_THREAT, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_war_intervene::HandleThreat, EFFECT_0, SPELL_EFFECT_CHARGE); + } +}; + // 5246 - Intimidating Shout class spell_warr_intimidating_shout : public SpellScriptLoader { @@ -1202,6 +1225,7 @@ void AddSC_warrior_spell_scripts() new spell_warr_glyph_of_blocking(); new spell_warr_glyph_of_sunder_armor(); new spell_warr_improved_spell_reflection(); + RegisterSpellScript(spell_war_intervene); new spell_warr_intimidating_shout(); new spell_warr_item_t10_prot_4p_bonus(); new spell_warr_last_stand(); |