diff options
| -rw-r--r-- | sql/updates/world/3.3.5/2020_06_28_01_world.sql | 5 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 26 |
2 files changed, 30 insertions, 1 deletions
diff --git a/sql/updates/world/3.3.5/2020_06_28_01_world.sql b/sql/updates/world/3.3.5/2020_06_28_01_world.sql new file mode 100644 index 00000000000..5f0c607e463 --- /dev/null +++ b/sql/updates/world/3.3.5/2020_06_28_01_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_war_intervene'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(3411,'spell_war_intervene'); + 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(); |
