Scripts/Ulduar: Fixed both Auriaya's achievement - Crazy Cat Lady & Nine Lives
This commit is contained in:
@@ -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');
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user