diff --git a/sql/updates/world/custom/custom_2019_03_31_04_world.sql b/sql/updates/world/custom/custom_2019_03_31_04_world.sql new file mode 100644 index 0000000000..569a5d37af --- /dev/null +++ b/sql/updates/world/custom/custom_2019_03_31_04_world.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_proc` WHERE `SpellId`= -53241; +INSERT INTO `spell_proc` (`SpellId`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `ProcFlags`, `SpellTypeMask`, `SpellPhaseMask`, `HitMask`, `AttributesMask`, `Cooldown`, `Charges`, `Chance`) VALUES +(-53241, 9, 0x00000800, 0, 0x00000001, 0x00000100, 1, 2, 0, 0, 0, 0, 100); + +DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_hun_marked_for_death'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(-53241, 'spell_hun_marked_for_death'); diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index c6f29b5a1c..3bc886e6a2 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -55,6 +55,7 @@ enum HunterSpells SPELL_HUNTER_INVIGORATION_TRIGGERED = 53398, SPELL_HUNTER_GLYPH_OF_KILL_SHOT_COOLDOWN = 90967, SPELL_HUNTER_LOCK_AND_LOAD = 56453, + SPELL_HUNTER_MARKED_FOR_DEATH_TRIGGERED = 88691, SPELL_HUNTER_MASTERS_CALL_TRIGGERED = 62305, SPELL_HUNTER_MISDIRECTION_PROC = 35079, SPELL_HUNTER_MULTISHOT = 2643, @@ -1663,6 +1664,34 @@ class spell_hun_camouflage_triggered : public AuraScript } }; +// -53241 - Marked for Death +class spell_hun_marked_for_death : public AuraScript +{ + PrepareAuraScript(spell_hun_marked_for_death); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_HUNTER_MARKED_FOR_DEATH_TRIGGERED }); + } + + bool CheckProc(ProcEventInfo& /*eventInfo*/) + { + return (roll_chance_i(GetEffect(EFFECT_0)->GetAmount())); + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_HUNTER_MARKED_FOR_DEATH_TRIGGERED, true, nullptr, aurEff); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_hun_marked_for_death::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_hun_marked_for_death::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } +}; + void AddSC_hunter_spell_scripts() { new spell_hun_ancient_hysteria(); @@ -1680,6 +1709,7 @@ void AddSC_hunter_spell_scripts() new spell_hun_invigoration(); new spell_hun_last_stand_pet(); new spell_hun_lock_and_load(); + RegisterAuraScript(spell_hun_marked_for_death); new spell_hun_master_marksman(); new spell_hun_masters_call(); new spell_hun_misdirection();