Scripts/Ulduar: Fixed achievement Deforestation in Freya's encounter

This commit is contained in:
Lopin
2011-06-22 15:18:10 +02:00
parent 0df059d5a2
commit 41254653a2
2 changed files with 15 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (10394,10395,10396,10397);
INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`)
VALUES
(10394,12,1,0,''),
(10395,12,1,0,''),
(10396,12,0,0,''),
(10397,12,0,0,'');

View File

@@ -101,6 +101,9 @@ enum FreyaSpells
SPELL_REMOVE_10STACK = 62525,
SPELL_REMOVE_2STACK = 62524,
// Achievement spells
SPELL_DEFORESTATION_CREDIT = 65015,
// Wave summoning spells
SPELL_SUMMON_LASHERS = 62687,
SPELL_SUMMON_TRIO = 62686,
@@ -290,7 +293,6 @@ class boss_freya : public CreatureScript
bool checkElementalAlive[2];
bool trioDefeated[2];
bool waveInProgress;
bool deforestationCheck;
bool random[3];
void Reset()
@@ -315,7 +317,6 @@ class boss_freya : public CreatureScript
trioDefeated[n] = false;
}
waveInProgress = false;
deforestationCheck = false;
for (uint8 n = 0; n < 3; ++n)
random[n] = false;
}
@@ -515,7 +516,9 @@ class boss_freya : public CreatureScript
else
{
if (!trioDefeated[i])
{
if (Elemental[0][i] && Elemental[1][i] && Elemental[2][i])
{
if (Elemental[0][i]->isDead() && Elemental[1][i]->isDead() && Elemental[2][i]->isDead())
{
for (uint8 n = 0; n < 3; ++n)
@@ -527,6 +530,8 @@ class boss_freya : public CreatureScript
}
TimeCheck();
}
}
}
}
}
}
@@ -559,7 +564,7 @@ class boss_freya : public CreatureScript
{
if (n == 14 && instance) // Binary mask check - verification of lasher types
{
deforestationCheck = true;
instance->DoCastSpellOnPlayers(SPELL_DEFORESTATION_CREDIT);
}
}
}