aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp33
1 files changed, 33 insertions, 0 deletions
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);