Scripts/Spells: Implement druid talent Lunar Beam (#30777)

This commit is contained in:
Aqua Deus
2025-06-15 10:57:14 +02:00
committed by GitHub
parent d3967ebe0d
commit 9090a940bf
2 changed files with 38 additions and 0 deletions

View File

@@ -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);

View File

@@ -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);