Skip to content

Commit

Permalink
Core/Achievements: Fixed achievement A Void Dance in Zuramat the Obli…
Browse files Browse the repository at this point in the history
…terator's encounter
  • Loading branch information
Lopin committed Jun 20, 2011
1 parent dbabcd0 commit 93a15bc
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
@@ -0,0 +1,5 @@
DELETE FROM `disables` WHERE `entry`=7587;

This comment has been minimized.

Copy link
@Dasio

Dasio Jun 20, 2011

i think it should be
DELETE FROM disables WHERE entry=7587 AND sourceType=4;

DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7587 AND `type`=11;
INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`)
VALUES
(7587,11,0,0,'achievement_void_dance');
42 changes: 42 additions & 0 deletions src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
Expand Up @@ -47,6 +47,8 @@ enum Yells
SAY_WHISPER = -1608044
};

#define DATA_VOID_DANCE 2153

class boss_zuramat : public CreatureScript
{
public:
Expand All @@ -69,6 +71,7 @@ class boss_zuramat : public CreatureScript
uint32 SpellVoidShiftTimer;
uint32 SpellSummonVoidTimer;
uint32 SpellShroudOfDarknessTimer;
bool voidDance;

void Reset()
{
Expand All @@ -83,6 +86,7 @@ class boss_zuramat : public CreatureScript
SpellShroudOfDarknessTimer = 22000;
SpellVoidShiftTimer = 15000;
SpellSummonVoidTimer = 12000;
voidDance = true;
}

void AttackStart(Unit* pWho)
Expand Down Expand Up @@ -147,6 +151,26 @@ class boss_zuramat : public CreatureScript
DoMeleeAttackIfReady();
}

void SummonedCreatureDies(Creature* summoned, Unit* /*who*/)
{
if (summoned->GetEntry() == CREATURE_VOID_SENTRY)
SetData(DATA_VOID_DANCE, 0);
}

void SetData(uint32 id, uint32 data)
{
if (id == DATA_VOID_DANCE)
voidDance = data ? true : false;
}

uint32 GetData(uint32 type)
{
if (type == DATA_VOID_DANCE)
return voidDance ? 1 : 0;

return 0;
}

void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Expand Down Expand Up @@ -184,7 +208,25 @@ class boss_zuramat : public CreatureScript

};

class achievement_void_dance : public AchievementCriteriaScript
{
public:
achievement_void_dance() : AchievementCriteriaScript("achievement_void_dance")
{
}

bool OnCheck(Player* /*player*/, Unit* target)
{
if (Creature* Zuramat = target->ToCreature())
if (Zuramat->AI()->GetData(DATA_VOID_DANCE))
return true;

return false;
}
};

void AddSC_boss_zuramat()
{
new boss_zuramat();
new achievement_void_dance();
}

2 comments on commit 93a15bc

@2010phenix
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

@s7an-it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gj!

Please sign in to comment.