aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2011_06_17_09_world_misc.sql11
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp70
2 files changed, 78 insertions, 3 deletions
diff --git a/sql/updates/world/2011_06_17_09_world_misc.sql b/sql/updates/world/2011_06_17_09_world_misc.sql
new file mode 100644
index 00000000000..72a678750f3
--- /dev/null
+++ b/sql/updates/world/2011_06_17_09_world_misc.sql
@@ -0,0 +1,11 @@
+-- Remove those achievements from disables table
+DELETE FROM `disables` WHERE `entry` IN (10184,10243,10399,10400);
+
+-- Achievement ScriptNames
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (10184,10243,10399,10400) and `type`=11;
+INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`)
+VALUES
+(10243,11,0,0,'achievement_nine_lives'),
+(10399,11,0,0,'achievement_nine_lives'),
+(10184,11,0,0,'achievement_crazy_cat_lady'),
+(10400,11,0,0,'achievement_crazy_cat_lady');
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();
}