aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/scripts/world_script_texts.sql2
-rw-r--r--sql/scripts/world_scripts_full.sql4
-rw-r--r--sql/updates/world/2011_06_17_01_world_script_texts.sql5
-rw-r--r--sql/updates/world/2011_06_17_02_world_spelldifficulty_dbc.sql10
-rw-r--r--sql/updates/world/2011_06_17_03_world_creature_template.sql5
-rw-r--r--sql/updates/world/2011_06_17_04_world_spell_script_names.sql4
-rw-r--r--sql/updates/world/2011_06_17_05_world_conditions.sql4
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp476
8 files changed, 463 insertions, 47 deletions
diff --git a/sql/scripts/world_script_texts.sql b/sql/scripts/world_script_texts.sql
index 0c66169cbfb..c7cae645b83 100644
--- a/sql/scripts/world_script_texts.sql
+++ b/sql/scripts/world_script_texts.sql
@@ -2423,6 +2423,8 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`
(33515,-1603052,'There is no escape!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15475,1,0,0,'Auriaya SAY_SLAY_2'),
(33515,-1603053,'Auriaya screams in agony.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,6,0,15476,'Auriaya SAY_DEATH'),
(33515,-1603054,'You waste my time!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15477,1,0,0,'Auriaya SAY_BERSERK'),
+ (33515,-1603055,'Auriaya begins to cast Terrifying Screech.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Auriaya - EMOTE_FEAR'),
+ (33515,-1603056,'Auriaya begins to activate the Feral Defender!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Auriaya - EMOTE_DEFENDER'),
-- Flame Leviathan
(33113,-1603060,'Hostile entities detected. Threat assessment protocol active. Primary target engaged. Time minus thirty seconds to re-evaluation.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15506,1,0,0,'Flame Leviathan SAY_AGGRO'),
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql
index 6d8ca17379e..54b2a269ee8 100644
--- a/sql/scripts/world_scripts_full.sql
+++ b/sql/scripts/world_scripts_full.sql
@@ -1614,6 +1614,9 @@ UPDATE `creature_template` SET `ScriptName`='npc_eonars_gift' WHERE `entry`=3322
UPDATE `creature_template` SET `ScriptName`='npc_healthy_spore' WHERE `entry`=33215;
UPDATE `creature_template` SET `ScriptName`='npc_unstable_sun_beam' WHERE `entry`=33050;
UPDATE `creature_template` SET `ScriptName`='npc_iron_roots' WHERE `entry` IN (33088,33168);
+UPDATE `creature_template` SET `ScriptName`='npc_feral_defender' WHERE `entry`=34035;
+UPDATE `creature_template` SET `ScriptName`='npc_sanctum_sentry' WHERE `entry`=34014;
+UPDATE `creature_template` SET `ScriptName`='npc_auriaya_seeping_trigger' WHERE `entry` =34098;
/* UN'GORO CRATER */
@@ -2218,6 +2221,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 62775, 'spell_xt002_tympanic_tantrum'),
( 37751, 'spell_xt002_submerged'),
( 37752, 'spell_xt002_stand'),
+( 64381, 'spell_auriaya_strenght_of_the_pack'),
-- Eye Of Eternity
( 56105, 'spell_malygos_vortex_dummy'),
( 55873, 'spell_malygos_vortex_visual'),
diff --git a/sql/updates/world/2011_06_17_01_world_script_texts.sql b/sql/updates/world/2011_06_17_01_world_script_texts.sql
new file mode 100644
index 00000000000..e974671b054
--- /dev/null
+++ b/sql/updates/world/2011_06_17_01_world_script_texts.sql
@@ -0,0 +1,5 @@
+DELETE FROM `script_texts` WHERE `entry` IN (-1603055,-1603056);
+INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`)
+VALUES
+(33515,-1603055,'Auriaya begins to cast Terrifying Screech.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Auriaya - EMOTE_FEAR'),
+(33515,-1603056,'Auriaya begins to activate the Feral Defender!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Auriaya - EMOTE_DEFENDER');
diff --git a/sql/updates/world/2011_06_17_02_world_spelldifficulty_dbc.sql b/sql/updates/world/2011_06_17_02_world_spelldifficulty_dbc.sql
new file mode 100644
index 00000000000..e4ea3f26eeb
--- /dev/null
+++ b/sql/updates/world/2011_06_17_02_world_spelldifficulty_dbc.sql
@@ -0,0 +1,10 @@
+DELETE FROM `spelldifficulty_dbc` WHERE `id` BETWEEN 3200 AND 3206;
+INSERT INTO `spelldifficulty_dbc` (`id`,`spellid0`,`spellid1`,`spellid2`,`spellid3`)
+VALUES
+(3200,64389,64678,0,0), -- Auriaya - Sentinel Blast
+(3201,64422,64688,0,0), -- Auriaya - Sonic Screech
+(3202,64496,64674,0,0), -- Auriaya/Feral Defender - Feral Rush
+(3203,64478,64669,0,0), -- Auriaya/Feral Defender - Feral Pounce
+(3204,64458,64676,0,0), -- Auriaya/Feral Defender - Seeping Essence
+(3205,64666,64374,0,0), -- Auriaya/Sanctum Sentry - Savage Pounce
+(3206,64375,64667,0,0); -- Auriaya/Sanctum Sentry - Rip Flesh
diff --git a/sql/updates/world/2011_06_17_03_world_creature_template.sql b/sql/updates/world/2011_06_17_03_world_creature_template.sql
new file mode 100644
index 00000000000..b8e6b4c6639
--- /dev/null
+++ b/sql/updates/world/2011_06_17_03_world_creature_template.sql
@@ -0,0 +1,5 @@
+UPDATE `creature_template` SET `equipment_id`=2500 WHERE `entry`=33515; -- Freya
+UPDATE `creature_template` SET `ScriptName`='npc_feral_defender' WHERE `entry`=34035; -- Feral Defender
+UPDATE `creature_template` SET `ScriptName`='npc_sanctum_sentry' WHERE `entry`=34014; -- Sanctum Sentry
+UPDATE `creature_template` SET `ScriptName`='npc_auriaya_seeping_trigger',`unit_flags`=33554692,`flags_extra`=130 WHERE `entry` =34098; -- Seeping Trigger
+UPDATE `creature_template` SET `ScriptName`='',`unit_flags`=33554692,`flags_extra`=128 WHERE `entry` =34096; -- Feral Defender Trigger
diff --git a/sql/updates/world/2011_06_17_04_world_spell_script_names.sql b/sql/updates/world/2011_06_17_04_world_spell_script_names.sql
new file mode 100644
index 00000000000..6f26bbc0875
--- /dev/null
+++ b/sql/updates/world/2011_06_17_04_world_spell_script_names.sql
@@ -0,0 +1,4 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=64381;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`)
+VALUES
+(64381,'spell_auriaya_strenght_of_the_pack');
diff --git a/sql/updates/world/2011_06_17_05_world_conditions.sql b/sql/updates/world/2011_06_17_05_world_conditions.sql
new file mode 100644
index 00000000000..f79a0c6f8f8
--- /dev/null
+++ b/sql/updates/world/2011_06_17_05_world_conditions.sql
@@ -0,0 +1,4 @@
+DELETE FROM `conditions` WHERE `SourceEntry`=64449;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`)
+VALUES
+(13,0,64449,0,18,1,34096,0,0,'','Auriaya Feral Defender Stalker spell script target');
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp
index c2d81a5f562..3376680181d 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp
@@ -19,90 +19,472 @@
#include "ScriptedCreature.h"
#include "ulduar.h"
-//boss_auriaya
-#define SPELL_TERRIFYING_SCREECH 64386
-#define SPELL_SETINEL_BLAST 64679
-#define SPELL_SONIC_SCREECH 64422
-#define SPELL_SUMMON_SWARMING_GUARDIAN 64397
+enum AuriayaSpells
+{
+ // Auriaya
+ SPELL_SENTINEL_BLAST = 64389,
+ SPELL_SONIC_SCREECH = 64422,
+ SPELL_TERRIFYING_SCREECH = 64386,
+ SPELL_SUMMON_SWARMING_GUARDIAN = 64396,
+ SPELL_ACTIVATE_DEFENDER = 64449,
+ SPELL_DEFENDER_TRIGGER = 64448,
+ SPELL_SUMMON_DEFENDER = 64447,
+ SPELL_BERSERK = 47008,
+
+ // Feral Defender
+ SPELL_FERAL_RUSH = 64496,
+ SPELL_FERAL_POUNCE = 64478,
+ SPELL_SEEPING_ESSENCE = 64458,
+ SPELL_SUMMON_ESSENCE = 64457,
+ SPELL_FERAL_ESSENCE = 64455,
+
+ // Sanctum Sentry
+ SPELL_SAVAGE_POUNCE = 64666,
+ SPELL_RIP_FLESH = 64375,
+ SPELL_STRENGHT_PACK = 64369,
+};
+
+enum AuriayaNPCs
+{
+ NPC_SANCTUM_SENTRY = 34014,
+ NPC_FERAL_DEFENDER = 34035,
+ NPC_FERAL_DEFENDER_TRIGGER = 34096,
+ NPC_SEEPING_TRIGGER = 34098,
+};
+
+enum AuriayaEvents
+{
+ // Auriaya
+ EVENT_SCREECH = 1,
+ EVENT_BLAST = 2,
+ EVENT_TERRIFYING = 3,
+ EVENT_SUMMON = 4,
+ EVENT_DEFENDER = 5,
+ EVENT_ACTIVATE_DEFENDER = 6,
+ EVENT_RESPAWN_DEFENDER = 7,
+ EVENT_BERSERK = 8,
+
+ // Sanctum Sentry
+ EVENT_RIP = 9,
+ EVENT_POUNCE = 10,
+
+ // Feral Defender
+ EVENT_FERAL_POUNCE = 11,
+ EVENT_RUSH = 12,
+};
-enum Yells
+enum AuriayaYells
{
- SAY_AGGRO = -1603050,
- SAY_SLAY_1 = -1603051,
- SAY_SLAY_2 = -1603052,
- SAY_DEATH = -1603053,
- SAY_BERSERK = -1603054,
+ // Yells
+ SAY_AGGRO = -1603050,
+ SAY_SLAY_1 = -1603051,
+ SAY_SLAY_2 = -1603052,
+ SAY_DEATH = -1603053,
+ SAY_BERSERK = -1603054,
+
+ // Emotes
+ EMOTE_FEAR = -1603055,
+ EMOTE_DEFENDER = -1603056,
+};
+
+enum AuriayaActions
+{
+ ACTION_CRAZY_CAT_LADY = 0,
+ ACTION_RESPAWN_DEFENDER
};
+#define SENTRY_NUMBER RAID_MODE<uint8>(2, 4)
+
class boss_auriaya : public CreatureScript
{
-public:
- boss_auriaya() : CreatureScript("boss_auriaya") { }
+ public:
+ boss_auriaya() : CreatureScript("boss_auriaya") { }
+
+ struct boss_auriayaAI : public BossAI
+ {
+ boss_auriayaAI(Creature* creature) : BossAI(creature, BOSS_AURIAYA)
+ {
+ }
+
+ void Reset()
+ {
+ _Reset();
+ DefenderGUID = 0;
+ defenderLifes = 9;
+ crazyCatLady = true;
+ nineLives = false;
+ }
- CreatureAI* GetAI(Creature* pCreature) const
- {
- return new boss_auriaya_AI (pCreature);
- }
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
+ DoScriptText(SAY_AGGRO,me);
+
+ events.ScheduleEvent(EVENT_SCREECH, urand(45000, 65000));
+ events.ScheduleEvent(EVENT_BLAST, urand(20000, 25000));
+ events.ScheduleEvent(EVENT_TERRIFYING, urand(20000, 30000));
+ events.ScheduleEvent(EVENT_DEFENDER, urand(40000, 55000));
+ events.ScheduleEvent(EVENT_SUMMON, urand(45000, 55000));
+ events.ScheduleEvent(EVENT_BERSERK, 600000);
+ }
- struct boss_auriaya_AI : public BossAI
- {
- boss_auriaya_AI(Creature *pCreature) : BossAI(pCreature, BOSS_AURIAYA)
+ void KilledUnit(Unit* /*who*/)
+ {
+ DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ }
+
+ void JustSummoned(Creature* summoned)
+ {
+ summons.Summon(summoned);
+
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ {
+ summoned->AI()->AttackStart(target);
+ summoned->AddThreat(target, 250.0f);
+ DoZoneInCombat(summoned);
+ }
+
+ if (summoned->GetEntry() == NPC_FERAL_DEFENDER)
+ {
+ if (!summoned->isInCombat() && me->getVictim())
+ summoned->AI()->AttackStart(me->getVictim());
+ summoned->SetAuraStack(SPELL_FERAL_ESSENCE, summoned, 9);
+ DefenderGUID = summoned->GetGUID();
+ DoZoneInCombat(summoned);
+ }
+ }
+
+ void DoAction(int32 const action)
+ {
+ switch (action)
+ {
+ case ACTION_CRAZY_CAT_LADY:
+ crazyCatLady = false;
+ break;
+ case ACTION_RESPAWN_DEFENDER:
+ defenderLifes--;
+ if (!defenderLifes)
+ {
+ nineLives = true;
+ break;
+ }
+ events.ScheduleEvent(EVENT_RESPAWN_DEFENDER, 30000);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void JustDied(Unit* /*who*/)
+ {
+ DoScriptText(SAY_DEATH, me);
+ _JustDied();
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STAT_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_SCREECH:
+ DoCast(SPELL_SONIC_SCREECH);
+ events.ScheduleEvent(EVENT_SCREECH, urand(40000, 60000));
+ break;
+ case EVENT_TERRIFYING:
+ DoScriptText(EMOTE_FEAR, me);
+ DoCast(SPELL_TERRIFYING_SCREECH);
+ events.ScheduleEvent(EVENT_TERRIFYING, urand(20000, 30000));
+ break;
+ case EVENT_BLAST:
+ DoCastAOE(SPELL_SENTINEL_BLAST);
+ events.ScheduleEvent(EVENT_BLAST, urand(25000, 35000));
+ break;
+ case EVENT_DEFENDER:
+ DoScriptText(EMOTE_DEFENDER, me);
+ DoCast(SPELL_DEFENDER_TRIGGER);
+ if (Creature* trigger = me->FindNearestCreature(NPC_FERAL_DEFENDER_TRIGGER, 15.0f, true))
+ DoCast(trigger, SPELL_ACTIVATE_DEFENDER, true);
+ break;
+ case EVENT_RESPAWN_DEFENDER:
+ if (Creature* Defender = ObjectAccessor::GetCreature(*me, DefenderGUID))
+ {
+ Defender->Respawn();
+ if (defenderLifes)
+ Defender->SetAuraStack(SPELL_FERAL_ESSENCE, Defender, defenderLifes);
+ Defender->SetInCombatWithZone();
+ if (!Defender->isInCombat())
+ Defender->AI()->AttackStart(me->getVictim());
+ events.CancelEvent(EVENT_RESPAWN_DEFENDER);
+ }
+ break;
+ case EVENT_SUMMON:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ DoCast(target, SPELL_SUMMON_SWARMING_GUARDIAN);
+ events.ScheduleEvent(EVENT_SUMMON, urand(30000, 45000));
+ break;
+ case EVENT_BERSERK:
+ DoCast(me, SPELL_BERSERK, true);
+ DoScriptText(SAY_BERSERK, me);
+ events.CancelEvent(EVENT_BERSERK);
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ uint64 DefenderGUID;
+ uint8 defenderLifes;
+ bool crazyCatLady;
+ bool nineLives;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
{
+ return GetUlduarAI<boss_auriayaAI>(creature);
}
+};
- uint32 TERRIFYING_SCREECH_Timer;
- uint32 SONIC_SCREECH_Timer;
+class npc_auriaya_seeping_trigger : public CreatureScript
+{
+ public:
+ npc_auriaya_seeping_trigger() : CreatureScript("npc_auriaya_seeping_trigger") { }
+
+ struct npc_auriaya_seeping_triggerAI : public ScriptedAI
+ {
+ npc_auriaya_seeping_triggerAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = me->GetInstanceScript();
+ }
void Reset()
{
- _Reset();
- TERRIFYING_SCREECH_Timer = 180000;
- SONIC_SCREECH_Timer = 30000;
+ me->ForcedDespawn(600000);
+ DoCast(me, SPELL_SEEPING_ESSENCE);
}
- void EnterCombat(Unit* /*who*/)
+ void UpdateAI(uint32 const /*diff*/)
{
- _EnterCombat();
- DoScriptText(SAY_AGGRO, me);
+ if (instance->GetBossState(BOSS_AURIAYA) != IN_PROGRESS)
+ me->ForcedDespawn();
}
- void KilledUnit(Unit* /*victim*/)
+ private:
+ InstanceScript* instance;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ return new npc_auriaya_seeping_triggerAI(creature);
}
+};
- void JustDied(Unit* /*victim*/)
+class npc_sanctum_sentry : public CreatureScript
+{
+ public:
+ npc_sanctum_sentry() : CreatureScript("npc_sanctum_sentry") { }
+
+ struct npc_sanctum_sentryAI : public ScriptedAI
{
- DoScriptText(SAY_DEATH, me);
- _JustDied();
+ npc_sanctum_sentryAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = me->GetInstanceScript();
+ }
+
+ void Reset()
+ {
+ events.ScheduleEvent(EVENT_RIP, urand(4000,8000));
+ events.ScheduleEvent(EVENT_POUNCE, urand(12000,15000));
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ DoCast(me, SPELL_STRENGHT_PACK, true);
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STAT_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_RIP:
+ DoCastVictim(SPELL_RIP_FLESH);
+ events.ScheduleEvent(EVENT_RIP, urand(12000, 15000));
+ break;
+ case EVENT_POUNCE:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ {
+ me->AddThreat(target, 100.0f);
+ me->AI()->AttackStart(target);
+ DoCast(target, SPELL_SAVAGE_POUNCE);
+ }
+ events.ScheduleEvent(EVENT_POUNCE, urand(12000,17000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ void JustDied(Unit* /*who*/)
+ {
+ if (Creature* Auriaya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_AURIAYA)))
+ Auriaya->AI()->DoAction(ACTION_CRAZY_CAT_LADY);
+ }
+
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_sanctum_sentryAI(creature);
}
+};
- void MoveInLineOfSight(Unit* /*who*/) {}
+class npc_feral_defender : public CreatureScript
+{
+ public:
+ npc_feral_defender() : CreatureScript("npc_feral_defender") { }
- void UpdateAI(const uint32 diff)
+ struct npc_feral_defenderAI : public ScriptedAI
{
- if (!UpdateVictim())
- return;
+ npc_feral_defenderAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = me->GetInstanceScript();
+ }
+
+ void Reset()
+ {
+ if (me->HasAura(SPELL_FERAL_ESSENCE))
+ me->RemoveAuraFromStack(SPELL_FERAL_ESSENCE);
+ else
+ me->RemoveAurasDueToSpell(SPELL_FERAL_ESSENCE);
+ }
- if (TERRIFYING_SCREECH_Timer <= diff)
+ void UpdateAI(uint32 const diff)
{
- DoCast(SPELL_TERRIFYING_SCREECH);
- TERRIFYING_SCREECH_Timer = 180000;
- } else TERRIFYING_SCREECH_Timer -= diff;
+ if (!UpdateVictim())
+ return;
- if (SONIC_SCREECH_Timer <= diff)
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STAT_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_FERAL_POUNCE:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ {
+ me->AddThreat(target, 100.0f);
+ me->AI()->AttackStart(target);
+ DoCast(target, SPELL_FERAL_POUNCE);
+ }
+ events.ScheduleEvent(EVENT_FERAL_POUNCE, urand(10000, 12000));
+ break;
+ case EVENT_RUSH:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ {
+ me->AddThreat(target, 100.0f);
+ me->AI()->AttackStart(target);
+ DoCast(target, SPELL_FERAL_RUSH);
+ }
+ events.ScheduleEvent(EVENT_RUSH, urand(10000, 12000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ void JustDied(Unit* /*who*/)
{
- DoCastVictim(SPELL_SONIC_SCREECH);
- SONIC_SCREECH_Timer = 30000;
- } else SONIC_SCREECH_Timer -= diff;
+ DoCast(me, SPELL_SUMMON_ESSENCE);
+ if (Creature* Auriaya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_AURIAYA)))
+ Auriaya->AI()->DoAction(ACTION_RESPAWN_DEFENDER);
+ }
+
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ };
- DoMeleeAttackIfReady();
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_feral_defenderAI(creature);
}
- };
+};
+
+class SanctumSentryCheck
+{
+ public:
+ bool operator() (Unit* unit)
+ {
+ if (unit->GetEntry() == NPC_SANCTUM_SENTRY)
+ return false;
+ return true;
+ }
+};
+
+class spell_auriaya_strenght_of_the_pack : public SpellScriptLoader
+{
+ public:
+ spell_auriaya_strenght_of_the_pack() : SpellScriptLoader("spell_auriaya_strenght_of_the_pack") { }
+
+ class spell_auriaya_strenght_of_the_pack_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_auriaya_strenght_of_the_pack_SpellScript);
+
+ void FilterTargets(std::list<Unit*>& unitList)
+ {
+ unitList.remove_if(SanctumSentryCheck());
+ }
+
+ void Register()
+ {
+ OnUnitTargetSelect += SpellUnitTargetFn(spell_auriaya_strenght_of_the_pack_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_AREA_ALLY_SRC);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_auriaya_strenght_of_the_pack_SpellScript();
+ }
};
void AddSC_boss_auriaya()
{
new boss_auriaya();
+ new npc_auriaya_seeping_trigger();
+ new npc_feral_defender();
+ new npc_sanctum_sentry();
+ new spell_auriaya_strenght_of_the_pack();
}