diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp | 70 |
1 files changed, 67 insertions, 3 deletions
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp index 3376680181d..fa65b21bb98 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp @@ -94,6 +94,8 @@ enum AuriayaActions }; #define SENTRY_NUMBER RAID_MODE<uint8>(2, 4) +#define DATA_NINE_LIVES 30763077 +#define DATA_CRAZY_CAT_LADY 30063007 class boss_auriaya : public CreatureScript { @@ -159,13 +161,13 @@ class boss_auriaya : public CreatureScript switch (action) { case ACTION_CRAZY_CAT_LADY: - crazyCatLady = false; + SetData(DATA_CRAZY_CAT_LADY, 0); break; case ACTION_RESPAWN_DEFENDER: - defenderLifes--; + --defenderLifes; if (!defenderLifes) { - nineLives = true; + SetData(DATA_NINE_LIVES, 1); break; } events.ScheduleEvent(EVENT_RESPAWN_DEFENDER, 30000); @@ -175,6 +177,32 @@ class boss_auriaya : public CreatureScript } } + uint32 GetData(uint32 type) + { + switch (type) + { + case DATA_NINE_LIVES: + return nineLives ? 1 : 0; + case DATA_CRAZY_CAT_LADY: + return crazyCatLady ? 1 : 0; + } + + return 0; + } + + void SetData(uint32 id, uint32 data) + { + switch (id) + { + case DATA_NINE_LIVES: + nineLives = data ? true : false; + break; + case DATA_CRAZY_CAT_LADY: + crazyCatLady = data ? true : false; + break; + } + } + void JustDied(Unit* /*who*/) { DoScriptText(SAY_DEATH, me); @@ -480,6 +508,40 @@ class spell_auriaya_strenght_of_the_pack : public SpellScriptLoader } }; +class achievement_nine_lives : public AchievementCriteriaScript +{ + public: + achievement_nine_lives() : AchievementCriteriaScript("achievement_nine_lives") + { + } + + bool OnCheck(Player* /*player*/, Unit* target) + { + if (Creature* Auriaya = target->ToCreature()) + if (Auriaya->AI()->GetData(DATA_NINE_LIVES)) + return true; + + return false; + } +}; + +class achievement_crazy_cat_lady : public AchievementCriteriaScript +{ + public: + achievement_crazy_cat_lady() : AchievementCriteriaScript("achievement_crazy_cat_lady") + { + } + + bool OnCheck(Player* /*player*/, Unit* target) + { + if (Creature* Auriaya = target->ToCreature()) + if (Auriaya->AI()->GetData(DATA_CRAZY_CAT_LADY)) + return true; + + return false; + } +}; + void AddSC_boss_auriaya() { new boss_auriaya(); @@ -487,4 +549,6 @@ void AddSC_boss_auriaya() new npc_feral_defender(); new npc_sanctum_sentry(); new spell_auriaya_strenght_of_the_pack(); + new achievement_nine_lives(); + new achievement_crazy_cat_lady(); } |