aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2022_06_16_00_world_druid_lunar_inspiration.sql2
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp29
2 files changed, 31 insertions, 0 deletions
diff --git a/sql/updates/world/master/2022_06_16_00_world_druid_lunar_inspiration.sql b/sql/updates/world/master/2022_06_16_00_world_druid_lunar_inspiration.sql
new file mode 100644
index 00000000000..703580c4d81
--- /dev/null
+++ b/sql/updates/world/master/2022_06_16_00_world_druid_lunar_inspiration.sql
@@ -0,0 +1,2 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_dru_lunar_inspiration';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (155580, 'spell_dru_lunar_inspiration');
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index 40ffe620427..20d8d36706e 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -77,6 +77,7 @@ enum DruidSpells
SPELL_DRUID_LANGUISH = 71023,
SPELL_DRUID_LIFEBLOOM_ENERGIZE = 64372,
SPELL_DRUID_LIFEBLOOM_FINAL_HEAL = 33778,
+ SPELL_DRUID_LUNAR_INSPIRATION_OVERRIDE = 155627,
SPELL_DRUID_MANGLE = 33917,
SPELL_DRUID_MOONFIRE_DAMAGE = 164812,
SPELL_DRUID_PROWL = 5215,
@@ -810,6 +811,33 @@ class spell_dru_lifebloom : public AuraScript
}
};
+// 155580 - Lunar Inspiration
+class spell_dru_lunar_inspiration : public AuraScript
+{
+ PrepareAuraScript(spell_dru_lunar_inspiration);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ return ValidateSpellInfo({ SPELL_DRUID_LUNAR_INSPIRATION_OVERRIDE });
+ }
+
+ void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_LUNAR_INSPIRATION_OVERRIDE, true);
+ }
+
+ void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ GetTarget()->RemoveAurasDueToSpell(SPELL_DRUID_LUNAR_INSPIRATION_OVERRIDE);
+ }
+
+ void Register() override
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_dru_lunar_inspiration::AfterApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_dru_lunar_inspiration::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
// 8921 - Moonfire
class spell_dru_moonfire : public SpellScript
{
@@ -1604,6 +1632,7 @@ void AddSC_druid_spell_scripts()
RegisterSpellScript(spell_dru_innervate);
RegisterSpellScript(spell_dru_item_t6_trinket);
RegisterSpellScript(spell_dru_lifebloom);
+ RegisterSpellScript(spell_dru_lunar_inspiration);
RegisterSpellScript(spell_dru_moonfire);
RegisterSpellScript(spell_dru_omen_of_clarity);
RegisterSpellScript(spell_dru_prowl);