aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2024_08_31_00_world.sql10
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp55
2 files changed, 60 insertions, 5 deletions
diff --git a/sql/updates/world/master/2024_08_31_00_world.sql b/sql/updates/world/master/2024_08_31_00_world.sql
new file mode 100644
index 00000000000..b150126c943
--- /dev/null
+++ b/sql/updates/world/master/2024_08_31_00_world.sql
@@ -0,0 +1,10 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_dru_astral_communion_celestial_alignment','spell_dru_celestial_alignment');
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(102560, 'spell_dru_astral_communion_celestial_alignment'),
+(194223, 'spell_dru_astral_communion_celestial_alignment'),
+(383410, 'spell_dru_astral_communion_celestial_alignment'),
+(390414, 'spell_dru_astral_communion_celestial_alignment'),
+(102560, 'spell_dru_celestial_alignment'),
+(194223, 'spell_dru_celestial_alignment'),
+(383410, 'spell_dru_celestial_alignment'),
+(390414, 'spell_dru_celestial_alignment');
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index 18ca14f8bda..23de0fdfab1 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -38,6 +38,8 @@ enum DruidSpells
{
SPELL_DRUID_ABUNDANCE = 207383,
SPELL_DRUID_ABUNDANCE_EFFECT = 207640,
+ SPELL_DRUID_ASTRAL_COMMUNION_ENERGIZE = 450599,
+ SPELL_DRUID_ASTRAL_COMMUNION_TALENT = 450598,
SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE = 394061,
SPELL_DRUID_BALANCE_T10_BONUS = 70718,
SPELL_DRUID_BALANCE_T10_BONUS_PROC = 70721,
@@ -172,6 +174,35 @@ class spell_dru_abundance : public AuraScript
}
};
+// 102560 - Incarnation: Chosen of Elune
+// 194223 - Celestial Alignment
+// 383410 - Celestial Alignment
+// 390414 - Incarnation: Chosen of Elune
+class spell_dru_astral_communion_celestial_alignment : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_DRUID_ASTRAL_COMMUNION_TALENT, SPELL_DRUID_ASTRAL_COMMUNION_ENERGIZE });
+ }
+
+ bool Load() override
+ {
+ return GetCaster()->HasAura(SPELL_DRUID_ASTRAL_COMMUNION_TALENT);
+ }
+
+ void Energize() const
+ {
+ GetCaster()->CastSpell(GetCaster(), SPELL_DRUID_ASTRAL_COMMUNION_ENERGIZE, CastSpellExtraArgs()
+ .SetTriggeringSpell(GetSpell())
+ .SetTriggerFlags(TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR));
+ }
+
+ void Register() override
+ {
+ AfterCast += SpellCastFn(spell_dru_astral_communion_celestial_alignment::Energize);
+ }
+};
+
// 394058 - Astral Smolder
class spell_dru_astral_smolder : public AuraScript
{
@@ -356,7 +387,10 @@ class spell_dru_cat_form : public AuraScript
}
};
+// 102560 - Incarnation: Chosen of Elune
// 194223 - Celestial Alignment
+// 383410 - Celestial Alignment
+// 390414 - Incarnation: Chosen of Elune
class spell_dru_celestial_alignment : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
@@ -366,11 +400,11 @@ class spell_dru_celestial_alignment : public SpellScript
SPELL_DRUID_ECLIPSE_SOLAR_AURA,
SPELL_DRUID_ECLIPSE_LUNAR_AURA,
SPELL_DRUID_ECLIPSE_VISUAL_SOLAR,
- SPELL_DRUID_ECLIPSE_VISUAL_LUNAR
+ SPELL_DRUID_ECLIPSE_VISUAL_LUNAR,
});
}
- void TriggerEclipses(SpellEffIndex /*effIndex*/) const
+ void TriggerEclipses() const
{
Unit* caster = GetCaster();
CastSpellExtraArgs args;
@@ -385,7 +419,7 @@ class spell_dru_celestial_alignment : public SpellScript
void Register() override
{
- OnEffectHitTarget += SpellEffectFn(spell_dru_celestial_alignment::TriggerEclipses, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
+ AfterCast += SpellCastFn(spell_dru_celestial_alignment::TriggerEclipses);
}
};
@@ -512,8 +546,15 @@ class spell_dru_eclipse_dummy : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
- return ValidateSpellInfo({ SPELL_DRUID_ECLIPSE_SOLAR_SPELL_CNT, SPELL_DRUID_ECLIPSE_LUNAR_SPELL_CNT,
- SPELL_DRUID_ECLIPSE_SOLAR_AURA, SPELL_DRUID_ECLIPSE_LUNAR_AURA });
+ return ValidateSpellInfo(
+ {
+ SPELL_DRUID_ECLIPSE_SOLAR_SPELL_CNT,
+ SPELL_DRUID_ECLIPSE_LUNAR_SPELL_CNT,
+ SPELL_DRUID_ECLIPSE_SOLAR_AURA,
+ SPELL_DRUID_ECLIPSE_LUNAR_AURA,
+ SPELL_DRUID_ASTRAL_COMMUNION_TALENT,
+ SPELL_DRUID_ASTRAL_COMMUNION_ENERGIZE
+ });
}
void HandleProc(ProcEventInfo& eventInfo)
@@ -570,6 +611,9 @@ private:
// cast eclipse
target->CastSpell(target, eclipseAuraSpellId, TRIGGERED_FULL_MASK);
+ if (target->HasAura(SPELL_DRUID_ASTRAL_COMMUNION_TALENT))
+ target->CastSpell(target, SPELL_DRUID_ASTRAL_COMMUNION_ENERGIZE, true);
+
// Remove stacks from other one as well
// reset remaining power on other spellId
target->RemoveAura(cntSpellId);
@@ -2221,6 +2265,7 @@ class spell_dru_yseras_gift_group_heal : public SpellScript
void AddSC_druid_spell_scripts()
{
RegisterSpellScript(spell_dru_abundance);
+ RegisterSpellScript(spell_dru_astral_communion_celestial_alignment);
RegisterSpellScript(spell_dru_astral_smolder);
RegisterSpellScript(spell_dru_barkskin);
RegisterSpellScript(spell_dru_berserk);