aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 80e7cd06574..6f9cab3380d 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -39,6 +39,7 @@ enum HunterSpells
SPELL_HUNTER_AIMED_SHOT = 19434,
SPELL_HUNTER_ASPECT_CHEETAH_SLOW = 186258,
SPELL_HUNTER_ASPECT_OF_THE_TURTLE_PACIFY_AURA = 205769,
+ SPELL_HUNTER_CONCUSSIVE_SHOT = 5116,
SPELL_HUNTER_EXHILARATION = 109304,
SPELL_HUNTER_EXHILARATION_PET = 128594,
SPELL_HUNTER_EXHILARATION_R2 = 231546,
@@ -60,6 +61,7 @@ enum HunterSpells
SPELL_HUNTER_POSTHASTE_TALENT = 109215,
SPELL_HUNTER_RAPID_FIRE_DAMAGE = 257045,
SPELL_HUNTER_RAPID_FIRE_ENERGIZE = 263585,
+ SPELL_HUNTER_STEADY_SHOT = 56641,
SPELL_HUNTER_STEADY_SHOT_FOCUS = 77443,
SPELL_HUNTER_T9_4P_GREATNESS = 68130,
SPELL_HUNTER_T29_2P_MARKSMANSHIP_DAMAGE = 394371,
@@ -179,6 +181,35 @@ class spell_hun_cobra_sting : public AuraScript
}
};
+// 5116 - Concussive Shot (attached to 193455 - Cobra Shot and 56641 - Steady Shot)
+class spell_hun_concussive_shot : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo ({ SPELL_HUNTER_CONCUSSIVE_SHOT, })
+ && ValidateSpellEffect({ { SPELL_HUNTER_STEADY_SHOT, EFFECT_2 } });
+ }
+
+ void HandleDuration(SpellEffIndex /*effIndex*/) const
+ {
+ Unit* caster = GetCaster();
+
+ if (Aura* concussiveShot = GetHitUnit()->GetAura(SPELL_HUNTER_CONCUSSIVE_SHOT, caster->GetGUID()))
+ {
+ SpellInfo const* steadyShot = sSpellMgr->AssertSpellInfo(SPELL_HUNTER_STEADY_SHOT, GetCastDifficulty());
+ Milliseconds extraDuration = Seconds(steadyShot->GetEffect(EFFECT_2).CalcValue(caster) / 10);
+ Milliseconds newDuration = Milliseconds(concussiveShot->GetDuration()) + extraDuration;
+ concussiveShot->SetDuration(newDuration.count());
+ concussiveShot->SetMaxDuration(newDuration.count());
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hun_concussive_shot::HandleDuration, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCHOOL_DAMAGE);
+ }
+};
+
// 109304 - Exhilaration
class spell_hun_exhilaration : public SpellScript
{
@@ -819,6 +850,7 @@ void AddSC_hunter_spell_scripts()
RegisterSpellScript(spell_hun_aspect_cheetah);
RegisterSpellScript(spell_hun_aspect_of_the_turtle);
RegisterSpellScript(spell_hun_cobra_sting);
+ RegisterSpellScript(spell_hun_concussive_shot);
RegisterSpellScript(spell_hun_exhilaration);
RegisterSpellScript(spell_hun_explosive_shot);
RegisterSpellScript(spell_hun_hunting_party);