aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-12-15 00:14:55 -0300
committerariel- <ariel-@users.noreply.github.com>2017-12-15 01:46:52 -0300
commita36e804ae4639be40be17282e6c79fad9a769517 (patch)
treeddd718a5dee49d189de257cbd2748f6474e4b914 /src/server/scripts/Outland
parent193bd3b45264326011814a5ee7694b9bbe13eb75 (diff)
Core/Auras: periodics refactor part 5: ported periodic trigger spell auras to scripts
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp59
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 6d65ceae758..8fc66bef7e3 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
@@ -76,6 +76,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:
@@ -559,9 +587,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);
}