Scripts/Ulduar: Fixed achievements Knock on Wood & Knock, Knock on Wood & Knock, Knock, Knock on Wood in Freya's encounter
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
DELETE FROM `spell_dbc` WHERE `id`=65074;
|
||||||
|
INSERT INTO `spell_dbc` (`Id`,`Effect1`,`EffectRadiusIndex1`,`EffectImplicitTargetA1`,`EffectImplicitTargetB1`,`comment`)
|
||||||
|
VALUES
|
||||||
|
(65074,3,28,22,30,'Knock on Wood Achievements - Criteria Marker');
|
||||||
|
|
||||||
|
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (10447,10448,10449,10459,10460,10461);
|
||||||
|
INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`)
|
||||||
|
VALUES
|
||||||
|
(10447,11,0,0,'achievement_knock_on_wood'),
|
||||||
|
(10447,12,0,0,''),
|
||||||
|
(10448,11,0,0,'achievement_knock_knock_on_wood'),
|
||||||
|
(10448,12,0,0,''),
|
||||||
|
(10449,11,0,0,'achievement_knock_knock_knock_on_wood'),
|
||||||
|
(10449,12,0,0,''),
|
||||||
|
(10459,11,0,0,'achievement_knock_on_wood'),
|
||||||
|
(10459,12,1,0,''),
|
||||||
|
(10460,11,0,0,'achievement_knock_knock_on_wood'),
|
||||||
|
(10460,12,1,0,''),
|
||||||
|
(10461,11,0,0,'achievement_knock_knock_knock_on_wood'),
|
||||||
|
(10461,12,1,0,'');
|
||||||
@@ -103,6 +103,7 @@ enum FreyaSpells
|
|||||||
|
|
||||||
// Achievement spells
|
// Achievement spells
|
||||||
SPELL_DEFORESTATION_CREDIT = 65015,
|
SPELL_DEFORESTATION_CREDIT = 65015,
|
||||||
|
SPELL_KNOCK_ON_WOOD_CREDIT = 65074,
|
||||||
|
|
||||||
// Wave summoning spells
|
// Wave summoning spells
|
||||||
SPELL_SUMMON_LASHERS = 62687,
|
SPELL_SUMMON_LASHERS = 62687,
|
||||||
@@ -219,6 +220,7 @@ enum FreyaEvents
|
|||||||
|
|
||||||
#define WAVE_TIME 60000 // Normal wave is one minute
|
#define WAVE_TIME 60000 // Normal wave is one minute
|
||||||
#define TIME_DIFFERENCE 10000 // If difference between waveTime and WAVE_TIME is bigger then TIME_DIFFERENCE, schedule EVENT_WAVE in 10 seconds
|
#define TIME_DIFFERENCE 10000 // If difference between waveTime and WAVE_TIME is bigger then TIME_DIFFERENCE, schedule EVENT_WAVE in 10 seconds
|
||||||
|
#define DATA_KNOCK_ON_WOOD 1
|
||||||
|
|
||||||
class npc_iron_roots : public CreatureScript
|
class npc_iron_roots : public CreatureScript
|
||||||
{
|
{
|
||||||
@@ -340,6 +342,8 @@ class boss_freya : public CreatureScript
|
|||||||
me->DeleteThreatList();
|
me->DeleteThreatList();
|
||||||
me->CombatStop(true);
|
me->CombatStop(true);
|
||||||
me->ForcedDespawn(7500);
|
me->ForcedDespawn(7500);
|
||||||
|
if (elderCount)
|
||||||
|
me->CastSpell(me, SPELL_KNOCK_ON_WOOD_CREDIT, true);
|
||||||
|
|
||||||
Creature* Elder[3];
|
Creature* Elder[3];
|
||||||
for (uint8 n = 0; n < 3; ++n)
|
for (uint8 n = 0; n < 3; ++n)
|
||||||
@@ -406,6 +410,14 @@ class boss_freya : public CreatureScript
|
|||||||
events.ScheduleEvent(EVENT_SUNBEAM, urand(5000, 15000));
|
events.ScheduleEvent(EVENT_SUNBEAM, urand(5000, 15000));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32 GetData(uint32 type)
|
||||||
|
{
|
||||||
|
if (type == DATA_KNOCK_ON_WOOD)
|
||||||
|
return elderCount;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 const diff)
|
void UpdateAI(uint32 const diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
@@ -1593,6 +1605,57 @@ class spell_freya_iron_roots : public SpellScriptLoader
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class achievement_knock_on_wood : public AchievementCriteriaScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
achievement_knock_on_wood() : AchievementCriteriaScript("achievement_knock_on_wood")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool OnCheck(Player* /*player*/, Unit* target)
|
||||||
|
{
|
||||||
|
if (Creature* Freya = target->ToCreature())
|
||||||
|
if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) >= 1)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class achievement_knock_knock_on_wood : public AchievementCriteriaScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
achievement_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_on_wood")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool OnCheck(Player* /*player*/, Unit* target)
|
||||||
|
{
|
||||||
|
if (Creature* Freya = target->ToCreature())
|
||||||
|
if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) >= 2)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class achievement_knock_knock_knock_on_wood : public AchievementCriteriaScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
achievement_knock_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_knock_on_wood")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool OnCheck(Player* /*player*/, Unit* target)
|
||||||
|
{
|
||||||
|
if (Creature* Freya = target->ToCreature())
|
||||||
|
if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) == 3)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_boss_freya()
|
void AddSC_boss_freya()
|
||||||
{
|
{
|
||||||
new boss_freya();
|
new boss_freya();
|
||||||
@@ -1612,4 +1675,7 @@ void AddSC_boss_freya()
|
|||||||
new npc_iron_roots();
|
new npc_iron_roots();
|
||||||
new spell_freya_attuned_to_nature_dose_reduction();
|
new spell_freya_attuned_to_nature_dose_reduction();
|
||||||
new spell_freya_iron_roots();
|
new spell_freya_iron_roots();
|
||||||
|
new achievement_knock_on_wood();
|
||||||
|
new achievement_knock_knock_on_wood();
|
||||||
|
new achievement_knock_knock_knock_on_wood();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user