aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2025_06_15_07_world.sql5
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp33
2 files changed, 38 insertions, 0 deletions
diff --git a/sql/updates/world/master/2025_06_15_07_world.sql b/sql/updates/world/master/2025_06_15_07_world.sql
new file mode 100644
index 00000000000..419482ec191
--- /dev/null
+++ b/sql/updates/world/master/2025_06_15_07_world.sql
@@ -0,0 +1,5 @@
+DELETE FROM `areatrigger_create_properties` WHERE (`IsCustom`=0 AND `Id` = 5994);
+INSERT INTO `areatrigger_create_properties` (`Id`, `IsCustom`, `AreaTriggerId`, `IsAreatriggerCustom`, `Flags`, `MoveCurveId`, `ScaleCurveId`, `MorphCurveId`, `FacingCurveId`, `AnimId`, `AnimKitId`, `DecalPropertiesId`, `SpellForVisuals`, `TimeToTargetScale`, `Speed`, `Shape`, `ShapeData0`, `ShapeData1`, `ShapeData2`, `ShapeData3`, `ShapeData4`, `ShapeData5`, `ShapeData6`, `ShapeData7`, `ScriptName`, `VerifiedBuild`) VALUES
+(5994, 0, 10682, 0, 0, 0, 0, 0, 0, -1, 0, 0, NULL, 8500, 0, 4, 8, 8, 30, 30, 1, 1, 0, 0, 'at_dru_lunar_beam', 59679); -- Spell: 204066 (Lunar Beam)
+
+UPDATE `areatrigger_template` SET `VerifiedBuild`=59679 WHERE (`Id`=10682 AND `IsCustom`=0);
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index 0fbee0dc9fb..4faf42597ba 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -21,6 +21,8 @@
* Scriptnames of files in this file should be prefixed with "spell_dru_".
*/
+#include "AreaTrigger.h"
+#include "AreaTriggerAI.h"
#include "ScriptMgr.h"
#include "CellImpl.h"
#include "Containers.h"
@@ -33,6 +35,7 @@
#include "SpellHistory.h"
#include "SpellMgr.h"
#include "SpellScript.h"
+#include "TaskScheduler.h"
enum DruidSpells
{
@@ -104,6 +107,8 @@ enum DruidSpells
SPELL_DRUID_INFUSION = 37238,
SPELL_DRUID_LANGUISH = 71023,
SPELL_DRUID_LIFEBLOOM_FINAL_HEAL = 33778,
+ SPELL_DRUID_LUNAR_BEAM_HEAL = 204069,
+ SPELL_DRUID_LUNAR_BEAM_DAMAGE = 414613,
SPELL_DRUID_LUNAR_INSPIRATION_OVERRIDE = 155627,
SPELL_DRUID_MANGLE = 33917,
SPELL_DRUID_MANGLE_TALENT = 231064,
@@ -1262,6 +1267,33 @@ class spell_dru_lifebloom : public AuraScript
}
};
+// 204066 - Lunar Beam
+struct at_dru_lunar_beam : AreaTriggerAI
+{
+ using AreaTriggerAI::AreaTriggerAI;
+
+ void OnCreate(Spell const* /*creatingSpell*/) override
+ {
+ _scheduler.Schedule(500ms, [this](TaskContext task)
+ {
+ if (Unit* caster = at->GetCaster())
+ {
+ caster->CastSpell(caster, SPELL_DRUID_LUNAR_BEAM_HEAL, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
+ caster->CastSpell(at->GetPosition(), SPELL_DRUID_LUNAR_BEAM_DAMAGE, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
+ }
+ task.Repeat(1s);
+ });
+ }
+
+ void OnUpdate(uint32 diff) override
+ {
+ _scheduler.Update(diff);
+ }
+
+private:
+ TaskScheduler _scheduler;
+};
+
// 155580 - Lunar Inspiration
class spell_dru_lunar_inspiration : public AuraScript
{
@@ -2381,6 +2413,7 @@ void AddSC_druid_spell_scripts()
RegisterSpellScript(spell_dru_innervate);
RegisterSpellScript(spell_dru_item_t6_trinket);
RegisterSpellScript(spell_dru_lifebloom);
+ RegisterAreaTriggerAI(at_dru_lunar_beam);
RegisterSpellScript(spell_dru_lunar_inspiration);
RegisterSpellScript(spell_dru_luxuriant_soil);
RegisterSpellScript(spell_dru_mangle);