aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2023-07-13 19:24:08 +0200
committerGitHub <noreply@github.com>2023-07-13 19:24:08 +0200
commite66f2ada53d3b2baccbbbdf563600f4c92ae3eb9 (patch)
treee24daebe31bd1ba181b18fbfb247bbd7f9f5f738 /src
parent008c15ab6bce7898036d31ff387d5c015a0f0876 (diff)
Scripts/Druid: Implemented Shooting Stars (#29125)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index a663c76b40c..c78b8965405 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -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);