From 4f9c64016101b0e8e8feeb4759e210967b2183d2 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Mon, 27 Dec 2021 20:15:36 +0100 Subject: [PATCH] Core/Spells: - Glyph of Aimed Shot will now only proc on critical hits with Aimed Shot - fixed Glyph of the Dazzled Prey --- sql/updates/world/4.3.4/2021_12_27_02_world.sql | 3 +++ src/server/scripts/Spells/spell_hunter.cpp | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/4.3.4/2021_12_27_02_world.sql diff --git a/sql/updates/world/4.3.4/2021_12_27_02_world.sql b/sql/updates/world/4.3.4/2021_12_27_02_world.sql new file mode 100644 index 00000000000..7f0d18c63bc --- /dev/null +++ b/sql/updates/world/4.3.4/2021_12_27_02_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_proc` WHERE `SpellId`= 56824; +INSERT INTO `spell_proc` (`SpellId`,`SpellFamilyName`, `SpellFamilyMask0`, `SpellTypeMask`, `SpellPhaseMask`, `HitMask`) VALUES +(56824, 9, 0x20000, 1, 2, 2); diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index e2512c3f204..3732f362ec3 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -89,7 +89,8 @@ enum HunterIcons { HUNTER_ICON_ID_INVIGORATION = 3487, HUNTER_ICON_ID_IMPROVED_SERPPENT_STING = 536, - HUNTER_ICON_ID_TERMINATION = 2008 + HUNTER_ICON_ID_TERMINATION = 2008, + HUNTER_ICON_ID_GLYPH_OF_DAZZLED_PREY = 2109 }; enum MiscSpells @@ -194,10 +195,16 @@ class spell_hun_cobra_shot : public SpellScript int32 focusAmount = sSpellMgr->AssertSpellInfo(SPELL_HUNTER_GENERIC_ENERGIZE_FOCUS)->Effects[EFFECT_0].CalcValue(); if (Unit* target = GetExplTargetUnit()) + { if (AuraEffect const* termination = caster->GetDummyAuraEffect(SPELLFAMILY_HUNTER, HUNTER_ICON_ID_TERMINATION, EFFECT_0)) if (target->GetHealthPct() < termination->GetSpellInfo()->Effects[EFFECT_1].CalcValue()) focusAmount += termination->GetAmount(); + if (AuraEffect const* dazzledPrey = caster->GetDummyAuraEffect(SPELLFAMILY_HUNTER, HUNTER_ICON_ID_GLYPH_OF_DAZZLED_PREY, EFFECT_0)) + if (target->HasAuraWithMechanic(1 << MECHANIC_DAZE)) + focusAmount += dazzledPrey->GetAmount(); + } + caster->CastSpell(caster, SPELL_HUNTER_GENERIC_ENERGIZE_FOCUS, CastSpellExtraArgs(true).AddSpellBP0(focusAmount)); } @@ -681,10 +688,16 @@ class spell_hun_steady_shot : public SpellScript int32 focusAmount = sSpellMgr->AssertSpellInfo(SPELL_HUNTER_STEADY_SHOT_FOCUS)->Effects[EFFECT_0].CalcValue(); if (Unit* target = GetExplTargetUnit()) + { if (AuraEffect const* termination = caster->GetDummyAuraEffect(SPELLFAMILY_HUNTER, HUNTER_ICON_ID_TERMINATION, EFFECT_0)) if (target->GetHealthPct() < termination->GetSpellInfo()->Effects[EFFECT_1].CalcValue()) focusAmount += termination->GetAmount(); + if (AuraEffect const* dazzledPrey = caster->GetDummyAuraEffect(SPELLFAMILY_HUNTER, HUNTER_ICON_ID_GLYPH_OF_DAZZLED_PREY, EFFECT_0)) + if (target->HasAuraWithMechanic(1 << MECHANIC_DAZE)) + focusAmount += dazzledPrey->GetAmount(); + } + caster->CastSpell(caster, SPELL_HUNTER_STEADY_SHOT_FOCUS, CastSpellExtraArgs(true).AddSpellBP0(focusAmount)); }