diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2017-12-15 00:14:55 -0300 |
|---|---|---|
| committer | funjoker <funjoker109@gmail.com> | 2021-03-15 20:17:31 +0100 |
| commit | 44c8ccadd701c1a4bc0ce08ee53a7a7ba55289d4 (patch) | |
| tree | 51509fbe5b77c2b6abfadc53e4caf19c9ae71000 /src/server/scripts/Outland | |
| parent | d9b145615dd2bafe1ae74e6dc11c9b86a0fb6f28 (diff) | |
Core/Auras: periodics refactor part 5: ported periodic trigger spell auras to scripts
(cherry picked from commit a36e804ae4639be40be17282e6c79fad9a769517)
Diffstat (limited to 'src/server/scripts/Outland')
| -rw-r--r-- | src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 158aba2266b..128a332ec3d 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -75,6 +75,34 @@ enum WaitEventType WE_SUMMON = 10 }; +uint32 const flameQuillsSpells[] = +{ + 34269, + 34270, + 34271, + 34272, + 34273, + 34274, + 34275, + 34276, + 34277, + 34278, + 34279, + 34280, + 34281, + 34282, + 34283, + 34284, + 34285, + 34286, + 34287, + 34288, + 34289, + 34314, + 34315, + 34316 +}; + class boss_alar : public CreatureScript { public: @@ -558,9 +586,40 @@ class npc_flame_patch_alar : public CreatureScript } }; +// 34229 - Flame Quills +class spell_alar_flame_quills : public AuraScript +{ + PrepareAuraScript(spell_alar_flame_quills); + + bool Validate(SpellInfo const* /*spellInfo*/) + { + return ValidateSpellInfo(flameQuillsSpells); + } + + bool Load() override + { + return InstanceHasScript(GetUnitOwner(), TheEyeScriptName); + } + + void PeriodicTick(AuraEffect const* aurEff) + { + PreventDefaultAction(); + + // cast 24 spells 34269-34289, 34314-34316 + for (uint32 spellId : flameQuillsSpells) + GetTarget()->CastSpell(nullptr, spellId, true, nullptr, aurEff); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_alar_flame_quills::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } +}; + void AddSC_boss_alar() { new boss_alar(); new npc_ember_of_alar(); new npc_flame_patch_alar(); + RegisterAuraScript(spell_alar_flame_quills); } |
