mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Script/Ulduar: Fix try for Assembly Of Iron achievement "I choose you, xxx"
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
DELETE FROM `disables` WHERE `sourceType` IN (10082,10083,10084,10085,10086,10087);
|
||||
|
||||
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (10082,10083,10084,10085,10086,10087);
|
||||
INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
|
||||
(10082, 11, 0, 0, 'achievement_assembly_i_choose_you'),
|
||||
(10082, 12, 0, 0, ''),
|
||||
(10083, 11, 0, 0, 'achievement_assembly_i_choose_you'),
|
||||
(10083, 12, 0, 0, ''),
|
||||
(10084, 11, 0, 0, 'achievement_assembly_i_choose_you'),
|
||||
(10084, 12, 0, 0, ''),
|
||||
(10085, 11, 0, 0, 'achievement_assembly_i_choose_you'),
|
||||
(10085, 12, 1, 0, ''),
|
||||
(10086, 11, 0, 0, 'achievement_assembly_i_choose_you'),
|
||||
(10086, 12, 1, 0, ''),
|
||||
(10087, 11, 0, 0, 'achievement_assembly_i_choose_you'),
|
||||
(10087, 12, 1, 0, '');
|
||||
@@ -122,9 +122,11 @@ enum AssemblyYells
|
||||
EMOTE_BRUNDIR_OVERLOAD = 7
|
||||
};
|
||||
|
||||
enum AssemblyNPCs
|
||||
enum Misc
|
||||
{
|
||||
NPC_WORLD_TRIGGER = 22515
|
||||
NPC_WORLD_TRIGGER = 22515,
|
||||
|
||||
DATA_PHASE_3 = 1
|
||||
};
|
||||
|
||||
#define FLOOR_Z 427.28f
|
||||
@@ -158,6 +160,14 @@ class boss_steelbreaker : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_FUSION_PUNCH, 15000);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_PHASE_3)
|
||||
return (phase >= 3) ? 1 : 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DoAction(int32 action)
|
||||
{
|
||||
switch (action)
|
||||
@@ -184,7 +194,7 @@ class boss_steelbreaker : public CreatureScript
|
||||
|
||||
if (instance->GetBossState(BOSS_ASSEMBLY_OF_IRON) == DONE)
|
||||
{
|
||||
DoCastAOE(SPELL_KILL_CREDIT);
|
||||
DoCastAOE(SPELL_KILL_CREDIT, true);
|
||||
Talk(SAY_STEELBREAKER_ENCOUNTER_DEFEATED);
|
||||
}
|
||||
else
|
||||
@@ -287,6 +297,14 @@ class boss_runemaster_molgeim : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_RUNE_OF_POWER, 20000);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_PHASE_3)
|
||||
return (phase >= 3) ? 1 : 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DoAction(int32 action)
|
||||
{
|
||||
switch (action)
|
||||
@@ -313,7 +331,7 @@ class boss_runemaster_molgeim : public CreatureScript
|
||||
|
||||
if (instance->GetBossState(BOSS_ASSEMBLY_OF_IRON) == DONE)
|
||||
{
|
||||
DoCastAOE(SPELL_KILL_CREDIT);
|
||||
DoCastAOE(SPELL_KILL_CREDIT, true);
|
||||
Talk(SAY_MOLGEIM_ENCOUNTER_DEFEATED);
|
||||
}
|
||||
else
|
||||
@@ -429,6 +447,14 @@ class boss_stormcaller_brundir : public CreatureScript
|
||||
me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, false); // Reset immumity, Brundir should be stunnable by default
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_PHASE_3)
|
||||
return (phase >= 3) ? 1 : 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
_EnterCombat();
|
||||
@@ -470,7 +496,7 @@ class boss_stormcaller_brundir : public CreatureScript
|
||||
|
||||
if (instance->GetBossState(BOSS_ASSEMBLY_OF_IRON) == DONE)
|
||||
{
|
||||
DoCastAOE(SPELL_KILL_CREDIT);
|
||||
DoCastAOE(SPELL_KILL_CREDIT, true);
|
||||
Talk(SAY_BRUNDIR_ENCOUNTER_DEFEATED);
|
||||
}
|
||||
else
|
||||
@@ -697,6 +723,17 @@ class spell_assembly_rune_of_summoning : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class achievement_assembly_i_choose_you : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_assembly_i_choose_you() : AchievementCriteriaScript("achievement_assembly_i_choose_you") { }
|
||||
|
||||
bool OnCheck(Player* /*player*/, Unit* target)
|
||||
{
|
||||
return target && target->GetAI()->GetData(DATA_PHASE_3);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_assembly_of_iron()
|
||||
{
|
||||
new boss_steelbreaker();
|
||||
@@ -705,4 +742,5 @@ void AddSC_boss_assembly_of_iron()
|
||||
new spell_shield_of_runes();
|
||||
new spell_assembly_meltdown();
|
||||
new spell_assembly_rune_of_summoning();
|
||||
new achievement_assembly_i_choose_you();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user