mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Scripts/Druid: Implemented Shooting Stars (#29125)
This commit is contained in:
@@ -85,6 +85,8 @@ enum DruidSpells
|
||||
SPELL_DRUID_REJUVENATION_T10_PROC = 70691,
|
||||
SPELL_DRUID_RESTORATION_T10_2P_BONUS = 70658,
|
||||
SPELL_DRUID_SAVAGE_ROAR = 62071,
|
||||
SPELL_DRUID_SHOOTING_STARS = 202342,
|
||||
SPELL_DRUID_SHOOTING_STARS_DAMAGE = 202497,
|
||||
SPELL_DRUID_SKULL_BASH_CHARGE = 221514,
|
||||
SPELL_DRUID_SKULL_BASH_INTERRUPT = 93985,
|
||||
SPELL_DRUID_SUNFIRE_DAMAGE = 164815,
|
||||
@@ -972,6 +974,31 @@ class spell_dru_savage_roar_aura : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 164815 - Sunfire
|
||||
// 164812 - Moonfire
|
||||
class spell_dru_shooting_stars : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_dru_shooting_stars);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_DRUID_SHOOTING_STARS, SPELL_DRUID_SHOOTING_STARS_DAMAGE });
|
||||
}
|
||||
|
||||
void OnTick(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (AuraEffect const* shootingStars = caster->GetAuraEffect(SPELL_DRUID_SHOOTING_STARS, EFFECT_0))
|
||||
if (roll_chance_i(shootingStars->GetAmount()))
|
||||
caster->CastSpell(GetTarget(), SPELL_DRUID_SHOOTING_STARS_DAMAGE, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_dru_shooting_stars::OnTick, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
// 106839 - Skull Bash
|
||||
class spell_dru_skull_bash : public SpellScript
|
||||
{
|
||||
@@ -1662,6 +1689,7 @@ void AddSC_druid_spell_scripts()
|
||||
RegisterSpellScript(spell_dru_prowl);
|
||||
RegisterSpellScript(spell_dru_rip);
|
||||
RegisterSpellAndAuraScriptPair(spell_dru_savage_roar, spell_dru_savage_roar_aura);
|
||||
RegisterSpellScript(spell_dru_shooting_stars);
|
||||
RegisterSpellScript(spell_dru_skull_bash);
|
||||
RegisterSpellScript(spell_dru_stampeding_roar);
|
||||
RegisterSpellScript(spell_dru_starfall_dummy);
|
||||
|
||||
Reference in New Issue
Block a user