fix(Scripts/Dragonblight): make Alystros' Lapsing Dream affect players (#27356)

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
EricksOliveira
2026-09-09 12:00:37 -03:00
committed by GitHub
co-authored by Claude Opus 5
parent 405adb5426
commit b19162f9f9
2 changed files with 36 additions and 0 deletions
@@ -0,0 +1,6 @@
-- Alystros the Verdant Keeper - Lapsing Dream
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_alystros_lapsing_dream_aura';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(51922, 'spell_alystros_lapsing_dream_aura');
UPDATE `smart_scripts` SET `target_type` = 5, `target_param2` = 1 WHERE `entryorguid` = 27249 AND `source_type` = 0 AND `id` = 2;
@@ -2338,6 +2338,35 @@ class spell_dragonblight_devour_ghoul_periodic : public AuraScript
} }
}; };
enum LapsingDream
{
SPELL_LAPSING_DREAM_SLOW = 51928
};
class spell_alystros_lapsing_dream_aura : public AuraScript
{
PrepareAuraScript(spell_alystros_lapsing_dream_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_LAPSING_DREAM_SLOW });
}
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
PreventDefaultAction();
// default trigger makes the victim the caster, and 51928's area targets then find nobody
if (Unit* caster = GetCaster())
caster->AddAura(SPELL_LAPSING_DREAM_SLOW, GetTarget());
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_alystros_lapsing_dream_aura::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
void AddSC_dragonblight() void AddSC_dragonblight()
{ {
new npc_conversing_with_the_depths_trigger(); new npc_conversing_with_the_depths_trigger();
@@ -2368,4 +2397,5 @@ void AddSC_dragonblight()
RegisterSpellScript(spell_dragonblight_flame_fury); RegisterSpellScript(spell_dragonblight_flame_fury);
RegisterSpellScript(spell_dragonblight_devour_ghoul); RegisterSpellScript(spell_dragonblight_devour_ghoul);
RegisterSpellScript(spell_dragonblight_devour_ghoul_periodic); RegisterSpellScript(spell_dragonblight_devour_ghoul_periodic);
RegisterSpellScript(spell_alystros_lapsing_dream_aura);
} }