mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 19:31:59 +01:00
Scripts/Hunter: Implement Explosive Shot (#28779)
This commit is contained in:
4
sql/updates/world/master/2023_01_26_06_world.sql
Normal file
4
sql/updates/world/master/2023_01_26_06_world.sql
Normal 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');
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user