Scripts/Hunter: Implement Explosive Shot (#28779)

This commit is contained in:
Naddley
2023-01-26 15:11:56 +01:00
committed by GitHub
parent 35775b0dfb
commit 2a79be02fd
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
-- Explosive Shot
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_hun_explosive_shot';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(212431, 'spell_hun_explosive_shot');

View File

@@ -39,6 +39,7 @@ enum HunterSpells
SPELL_HUNTER_EXHILARATION = 109304,
SPELL_HUNTER_EXHILARATION_PET = 128594,
SPELL_HUNTER_EXHILARATION_R2 = 231546,
SPELL_HUNTER_EXPLOSIVE_SHOT_DAMAGE = 212680,
SPELL_HUNTER_LONE_WOLF = 155228,
SPELL_HUNTER_MASTERS_CALL_TRIGGERED = 62305,
SPELL_HUNTER_MISDIRECTION = 34477,
@@ -152,6 +153,28 @@ class spell_hun_exhilaration : public SpellScript
}
};
// 212431 - Explosive Shot
class spell_hun_explosive_shot : public AuraScript
{
PrepareAuraScript(spell_hun_explosive_shot);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_EXPLOSIVE_SHOT_DAMAGE });
}
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
if (Unit* caster = GetCaster())
caster->CastSpell(GetTarget(), SPELL_HUNTER_EXPLOSIVE_SHOT_DAMAGE, true);
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_hun_explosive_shot::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
// 212658 - Hunting Party
class spell_hun_hunting_party : public AuraScript
{
@@ -614,6 +637,7 @@ void AddSC_hunter_spell_scripts()
RegisterSpellScript(spell_hun_a_murder_of_crows);
RegisterSpellScript(spell_hun_aspect_cheetah);
RegisterSpellScript(spell_hun_exhilaration);
RegisterSpellScript(spell_hun_explosive_shot);
RegisterSpellScript(spell_hun_hunting_party);
RegisterSpellScript(spell_hun_last_stand_pet);
RegisterSpellScript(spell_hun_masters_call);