AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_assembly_of_iron.cpp File Reference
#include "AchievementCriteriaScript.h"
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "ulduar.h"

Go to the source code of this file.

Classes

struct  boss_steelbreaker
 
class  CastRunesEvent
 
struct  boss_runemaster_molgeim
 
struct  npc_assembly_lightning
 
struct  boss_stormcaller_brundir
 
class  spell_shield_of_runes_aura
 
class  spell_assembly_meltdown
 
class  spell_assembly_rune_of_summoning_aura
 
class  achievement_assembly_of_iron
 
class  achievement_cant_do_that_while_stunned
 

Enumerations

enum  AssemblySpells {
  SPELL_SUPERCHARGE = 61920 ,
  SPELL_BERSERK = 47008 ,
  SPELL_HIGH_VOLTAGE = 61890 ,
  SPELL_FUSION_PUNCH = 61903 ,
  SPELL_STATIC_DISRUPTION = 61911 ,
  SPELL_OVERWHELMING_POWER = 64637 ,
  SPELL_ELECTRICAL_CHARGE = 61902 ,
  SPELL_SHIELD_OF_RUNES_BUFF = 62277 ,
  SPELL_SHIELD_OF_RUNES = 62274 ,
  SPELL_RUNE_OF_POWER = 61973 ,
  SPELL_RUNE_OF_DEATH = 62269 ,
  SPELL_RUNE_OF_SUMMONING = 62273 ,
  SPELL_RUNE_OF_SUMMONING_SUMMON = 62020 ,
  SPELL_LIGHTNING_BLAST = 62054 ,
  CREATURE_LIGHTNING_ELEMENTAL = 32958 ,
  CREATURE_RUNE_OF_SUMMONING = 33051 ,
  SPELL_RUNE_OF_POWER_OOC_CHANNEL = 61975 ,
  SPELL_CHAIN_LIGHTNING = 61879 ,
  SPELL_OVERLOAD = 61869 ,
  SPELL_LIGHTNING_WHIRL = 61915 ,
  SPELL_LIGHTNING_WHIRL_TRIGG = 61916 ,
  SPELL_LIGHTNING_TENDRILS = 61887 ,
  SPELL_LIGHTNING_TENDRILS_2 = 61883 ,
  SPELL_STORMSHIELD = 64187 ,
  SPELL_LIGHTNING_CHANNEL_PRE = 61942
}
 
enum  eEnums {
  EVENT_FUSION_PUNCH = 1 ,
  EVENT_STATIC_DISRUPTION = 2 ,
  EVENT_OVERWHELMING_POWER = 3 ,
  EVENT_RUNE_OF_POWER = 11 ,
  EVENT_SHIELD_OF_RUNES = 12 ,
  EVENT_RUNE_OF_DEATH = 13 ,
  EVENT_RUNE_OF_SUMMONING = 14 ,
  EVENT_LIGHTNING_BLAST = 15 ,
  EVENT_CHAIN_LIGHTNING = 21 ,
  EVENT_OVERLOAD = 22 ,
  EVENT_LIGHTNING_WHIRL = 23 ,
  EVENT_LIGHTNING_TENDRILS = 24 ,
  EVENT_LIGHTNING_LAND = 25 ,
  EVENT_LAND_LAND = 26 ,
  EVENT_LIGHTNING_FLIGHT = 27 ,
  EVENT_ENRAGE = 30
}
 
enum  AssemblyYells {
  SAY_STEELBREAKER_AGGRO = 0 ,
  SAY_STEELBREAKER_SLAY = 1 ,
  SAY_STEELBREAKER_POWER = 2 ,
  SAY_STEELBREAKER_DEATH = 3 ,
  SAY_STEELBREAKER_ENCOUNTER_DEFEATED = 4 ,
  SAY_STEELBREAKER_BERSERK = 5 ,
  SAY_MOLGEIM_AGGRO = 0 ,
  SAY_MOLGEIM_SLAY = 1 ,
  SAY_MOLGEIM_RUNE_DEATH = 2 ,
  SAY_MOLGEIM_SUMMON = 3 ,
  SAY_MOLGEIM_DEATH = 4 ,
  SAY_MOLGEIM_ENCOUNTER_DEFEATED = 5 ,
  SAY_MOLGEIM_BERSERK = 6 ,
  SAY_BRUNDIR_AGGRO = 0 ,
  SAY_BRUNDIR_SLAY = 1 ,
  SAY_BRUNDIR_SPECIAL = 2 ,
  SAY_BRUNDIR_FLIGHT = 3 ,
  SAY_BRUNDIR_DEATH = 4 ,
  SAY_BRUNDIR_ENCOUNTER_DEFEATED = 5 ,
  SAY_BRUNDIR_BERSERK = 6 ,
  EMOTE_BRUNDIR_OVERLOAD = 7
}
 
enum  Misc {
  ACTION_ADD_CHARGE = 1 ,
  POINT_CHANNEL_STEELBREAKER = 1
}
 

Functions

static uint8 CountAliveBosses (InstanceScript *instance)
 
bool IsEncounterComplete (InstanceScript *pInstance, Creature *me)
 
void RespawnAssemblyOfIron (InstanceScript *pInstance, Creature *me)
 
void RestoreAssemblyHealth (uint32 dataId1, uint32 dataId2, InstanceScript *pInstance)
 
void AddSC_boss_assembly_of_iron ()
 

Enumeration Type Documentation

◆ AssemblySpells

Enumerator
SPELL_SUPERCHARGE 
SPELL_BERSERK 
SPELL_HIGH_VOLTAGE 
SPELL_FUSION_PUNCH 
SPELL_STATIC_DISRUPTION 
SPELL_OVERWHELMING_POWER 
SPELL_ELECTRICAL_CHARGE 
SPELL_SHIELD_OF_RUNES_BUFF 
SPELL_SHIELD_OF_RUNES 
SPELL_RUNE_OF_POWER 
SPELL_RUNE_OF_DEATH 
SPELL_RUNE_OF_SUMMONING 
SPELL_RUNE_OF_SUMMONING_SUMMON 
SPELL_LIGHTNING_BLAST 
CREATURE_LIGHTNING_ELEMENTAL 
CREATURE_RUNE_OF_SUMMONING 
SPELL_RUNE_OF_POWER_OOC_CHANNEL 
SPELL_CHAIN_LIGHTNING 
SPELL_OVERLOAD 
SPELL_LIGHTNING_WHIRL 
SPELL_LIGHTNING_WHIRL_TRIGG 
SPELL_LIGHTNING_TENDRILS 
SPELL_LIGHTNING_TENDRILS_2 
SPELL_STORMSHIELD 
SPELL_LIGHTNING_CHANNEL_PRE 
28{
29 // Any boss
30 SPELL_SUPERCHARGE = 61920,
31 SPELL_BERSERK = 47008,
32
33 // Steelbreaker
34 SPELL_HIGH_VOLTAGE = 61890,
35 SPELL_FUSION_PUNCH = 61903,
39
40 // Runemaster Molgeim
43 SPELL_RUNE_OF_POWER = 61973,
44 SPELL_RUNE_OF_DEATH = 62269,
51
52 // Stormcaller Brundir
54 SPELL_OVERLOAD = 61869,
59 SPELL_STORMSHIELD = 64187,
61
62};
@ SPELL_FUSION_PUNCH
Definition boss_assembly_of_iron.cpp:35
@ SPELL_ELECTRICAL_CHARGE
Definition boss_assembly_of_iron.cpp:38
@ SPELL_LIGHTNING_WHIRL
Definition boss_assembly_of_iron.cpp:55
@ SPELL_RUNE_OF_POWER
Definition boss_assembly_of_iron.cpp:43
@ SPELL_SUPERCHARGE
Definition boss_assembly_of_iron.cpp:30
@ SPELL_RUNE_OF_SUMMONING_SUMMON
Definition boss_assembly_of_iron.cpp:46
@ SPELL_SHIELD_OF_RUNES_BUFF
Definition boss_assembly_of_iron.cpp:41
@ SPELL_LIGHTNING_WHIRL_TRIGG
Definition boss_assembly_of_iron.cpp:56
@ SPELL_LIGHTNING_BLAST
Definition boss_assembly_of_iron.cpp:47
@ SPELL_RUNE_OF_POWER_OOC_CHANNEL
Definition boss_assembly_of_iron.cpp:50
@ SPELL_STORMSHIELD
Definition boss_assembly_of_iron.cpp:59
@ SPELL_OVERLOAD
Definition boss_assembly_of_iron.cpp:54
@ SPELL_STATIC_DISRUPTION
Definition boss_assembly_of_iron.cpp:36
@ SPELL_SHIELD_OF_RUNES
Definition boss_assembly_of_iron.cpp:42
@ SPELL_HIGH_VOLTAGE
Definition boss_assembly_of_iron.cpp:34
@ SPELL_LIGHTNING_CHANNEL_PRE
Definition boss_assembly_of_iron.cpp:60
@ SPELL_CHAIN_LIGHTNING
Definition boss_assembly_of_iron.cpp:53
@ CREATURE_LIGHTNING_ELEMENTAL
Definition boss_assembly_of_iron.cpp:48
@ SPELL_BERSERK
Definition boss_assembly_of_iron.cpp:31
@ SPELL_OVERWHELMING_POWER
Definition boss_assembly_of_iron.cpp:37
@ SPELL_LIGHTNING_TENDRILS_2
Definition boss_assembly_of_iron.cpp:58
@ CREATURE_RUNE_OF_SUMMONING
Definition boss_assembly_of_iron.cpp:49
@ SPELL_LIGHTNING_TENDRILS
Definition boss_assembly_of_iron.cpp:57
@ SPELL_RUNE_OF_SUMMONING
Definition boss_assembly_of_iron.cpp:45
@ SPELL_RUNE_OF_DEATH
Definition boss_assembly_of_iron.cpp:44

◆ AssemblyYells

Enumerator
SAY_STEELBREAKER_AGGRO 
SAY_STEELBREAKER_SLAY 
SAY_STEELBREAKER_POWER 
SAY_STEELBREAKER_DEATH 
SAY_STEELBREAKER_ENCOUNTER_DEFEATED 
SAY_STEELBREAKER_BERSERK 
SAY_MOLGEIM_AGGRO 
SAY_MOLGEIM_SLAY 
SAY_MOLGEIM_RUNE_DEATH 
SAY_MOLGEIM_SUMMON 
SAY_MOLGEIM_DEATH 
SAY_MOLGEIM_ENCOUNTER_DEFEATED 
SAY_MOLGEIM_BERSERK 
SAY_BRUNDIR_AGGRO 
SAY_BRUNDIR_SLAY 
SAY_BRUNDIR_SPECIAL 
SAY_BRUNDIR_FLIGHT 
SAY_BRUNDIR_DEATH 
SAY_BRUNDIR_ENCOUNTER_DEFEATED 
SAY_BRUNDIR_BERSERK 
EMOTE_BRUNDIR_OVERLOAD 
92{
99
107
116};
@ SAY_MOLGEIM_SLAY
Definition boss_assembly_of_iron.cpp:101
@ SAY_BRUNDIR_SLAY
Definition boss_assembly_of_iron.cpp:109
@ SAY_STEELBREAKER_ENCOUNTER_DEFEATED
Definition boss_assembly_of_iron.cpp:97
@ SAY_BRUNDIR_DEATH
Definition boss_assembly_of_iron.cpp:112
@ SAY_MOLGEIM_RUNE_DEATH
Definition boss_assembly_of_iron.cpp:102
@ SAY_BRUNDIR_ENCOUNTER_DEFEATED
Definition boss_assembly_of_iron.cpp:113
@ SAY_MOLGEIM_AGGRO
Definition boss_assembly_of_iron.cpp:100
@ SAY_MOLGEIM_DEATH
Definition boss_assembly_of_iron.cpp:104
@ SAY_BRUNDIR_FLIGHT
Definition boss_assembly_of_iron.cpp:111
@ SAY_MOLGEIM_SUMMON
Definition boss_assembly_of_iron.cpp:103
@ SAY_MOLGEIM_BERSERK
Definition boss_assembly_of_iron.cpp:106
@ SAY_BRUNDIR_BERSERK
Definition boss_assembly_of_iron.cpp:114
@ SAY_BRUNDIR_SPECIAL
Definition boss_assembly_of_iron.cpp:110
@ EMOTE_BRUNDIR_OVERLOAD
Definition boss_assembly_of_iron.cpp:115
@ SAY_STEELBREAKER_DEATH
Definition boss_assembly_of_iron.cpp:96
@ SAY_MOLGEIM_ENCOUNTER_DEFEATED
Definition boss_assembly_of_iron.cpp:105
@ SAY_STEELBREAKER_POWER
Definition boss_assembly_of_iron.cpp:95
@ SAY_BRUNDIR_AGGRO
Definition boss_assembly_of_iron.cpp:108
@ SAY_STEELBREAKER_AGGRO
Definition boss_assembly_of_iron.cpp:93
@ SAY_STEELBREAKER_SLAY
Definition boss_assembly_of_iron.cpp:94
@ SAY_STEELBREAKER_BERSERK
Definition boss_assembly_of_iron.cpp:98

◆ eEnums

enum eEnums
Enumerator
EVENT_FUSION_PUNCH 
EVENT_STATIC_DISRUPTION 
EVENT_OVERWHELMING_POWER 
EVENT_RUNE_OF_POWER 
EVENT_SHIELD_OF_RUNES 
EVENT_RUNE_OF_DEATH 
EVENT_RUNE_OF_SUMMONING 
EVENT_LIGHTNING_BLAST 
EVENT_CHAIN_LIGHTNING 
EVENT_OVERLOAD 
EVENT_LIGHTNING_WHIRL 
EVENT_LIGHTNING_TENDRILS 
EVENT_LIGHTNING_LAND 
EVENT_LAND_LAND 
EVENT_LIGHTNING_FLIGHT 
EVENT_ENRAGE 
65{
66 // Steelbreaker
70 //EVENT_CHECK_MAIN_TANK = 4,
71
72 // Molgeim
78
79 // Brundir
81 EVENT_OVERLOAD = 22,
85 EVENT_LAND_LAND = 26,
87
88 EVENT_ENRAGE = 30
89};
@ EVENT_CHAIN_LIGHTNING
Definition boss_assembly_of_iron.cpp:80
@ EVENT_LIGHTNING_BLAST
Definition boss_assembly_of_iron.cpp:77
@ EVENT_ENRAGE
Definition boss_assembly_of_iron.cpp:88
@ EVENT_SHIELD_OF_RUNES
Definition boss_assembly_of_iron.cpp:74
@ EVENT_RUNE_OF_DEATH
Definition boss_assembly_of_iron.cpp:75
@ EVENT_RUNE_OF_SUMMONING
Definition boss_assembly_of_iron.cpp:76
@ EVENT_RUNE_OF_POWER
Definition boss_assembly_of_iron.cpp:73
@ EVENT_OVERLOAD
Definition boss_assembly_of_iron.cpp:81
@ EVENT_FUSION_PUNCH
Definition boss_assembly_of_iron.cpp:67
@ EVENT_LIGHTNING_TENDRILS
Definition boss_assembly_of_iron.cpp:83
@ EVENT_LIGHTNING_LAND
Definition boss_assembly_of_iron.cpp:84
@ EVENT_LIGHTNING_FLIGHT
Definition boss_assembly_of_iron.cpp:86
@ EVENT_LAND_LAND
Definition boss_assembly_of_iron.cpp:85
@ EVENT_STATIC_DISRUPTION
Definition boss_assembly_of_iron.cpp:68
@ EVENT_LIGHTNING_WHIRL
Definition boss_assembly_of_iron.cpp:82
@ EVENT_OVERWHELMING_POWER
Definition boss_assembly_of_iron.cpp:69

◆ Misc

enum Misc
Enumerator
ACTION_ADD_CHARGE 
POINT_CHANNEL_STEELBREAKER 
119{
122};
@ POINT_CHANNEL_STEELBREAKER
Definition boss_assembly_of_iron.cpp:121
@ ACTION_ADD_CHARGE
Definition boss_assembly_of_iron.cpp:120

Function Documentation

◆ AddSC_boss_assembly_of_iron()

void AddSC_boss_assembly_of_iron ( )
908{
913
917
918 new achievement_assembly_of_iron("achievement_but_im_on_your_side", 0);
919 new achievement_assembly_of_iron("achievement_assembly_steelbreaker", NPC_STEELBREAKER);
920 new achievement_assembly_of_iron("achievement_assembly_runemaster", NPC_MOLGEIM);
921 new achievement_assembly_of_iron("achievement_assembly_stormcaller", NPC_BRUNDIR);
923}
#define RegisterSpellScript(spell_script)
Definition SpellScriptLoader.h:88
Definition boss_assembly_of_iron.cpp:872
Definition boss_assembly_of_iron.cpp:889
Definition boss_assembly_of_iron.cpp:826
Definition boss_assembly_of_iron.cpp:843
Definition boss_assembly_of_iron.cpp:804
Definition boss_assembly_of_iron.cpp:356
Definition boss_assembly_of_iron.cpp:176
Definition boss_assembly_of_iron.cpp:544
Definition boss_assembly_of_iron.cpp:510
#define RegisterUlduarCreatureAI(ai_name)
Definition ulduar.h:377
@ NPC_MOLGEIM
Definition ulduar.h:162
@ NPC_BRUNDIR
Definition ulduar.h:163
@ NPC_STEELBREAKER
Definition ulduar.h:161

References NPC_BRUNDIR, NPC_MOLGEIM, NPC_STEELBREAKER, RegisterSpellScript, and RegisterUlduarCreatureAI.

Referenced by AddNorthrendScripts().

◆ CountAliveBosses()

static uint8 CountAliveBosses ( InstanceScript instance)
static
125{
126 uint8 count = 0;
127 if (!instance)
128 return count;
129
130 for (uint8 i = 0; i < 3; ++i)
131 if (Creature* boss = instance->GetCreature(DATA_STEELBREAKER + i))
132 if (boss->IsAlive())
133 ++count;
134
135 return count;
136}
std::uint8_t uint8
Definition Define.h:109
Definition Creature.h:47
Creature * GetCreature(uint32 type)
Definition InstanceScript.cpp:115
@ DATA_STEELBREAKER
Definition ulduar.h:56

References DATA_STEELBREAKER, and InstanceScript::GetCreature().

Referenced by IsEncounterComplete(), and boss_stormcaller_brundir::OnSpellCast().

◆ IsEncounterComplete()

bool IsEncounterComplete ( InstanceScript pInstance,
Creature me 
)
139{
140 if (!pInstance || !me)
141 return false;
142
143 for (uint8 i = 0; i < 3; ++i)
144 if (!pInstance->GetCreature(DATA_STEELBREAKER + i))
145 return false;
146
147 return CountAliveBosses(pInstance) == 0;
148}
static uint8 CountAliveBosses(InstanceScript *instance)
Definition boss_assembly_of_iron.cpp:124

References CountAliveBosses(), DATA_STEELBREAKER, and InstanceScript::GetCreature().

Referenced by boss_steelbreaker::JustDied(), boss_runemaster_molgeim::JustDied(), and boss_stormcaller_brundir::JustDied().

◆ RespawnAssemblyOfIron()

void RespawnAssemblyOfIron ( InstanceScript pInstance,
Creature me 
)
151{
152 if (!pInstance || !me)
153 return;
154
155 for (uint8 i = 0; i < 3; ++i)
156 {
157 if (Creature* boss = pInstance->GetCreature(DATA_STEELBREAKER + i))
158 if (!boss->IsAlive())
159 boss->Respawn();
160 }
161 return;
162}

References DATA_STEELBREAKER, and InstanceScript::GetCreature().

Referenced by boss_steelbreaker::Reset(), boss_runemaster_molgeim::Reset(), and boss_stormcaller_brundir::Reset().

◆ RestoreAssemblyHealth()

void RestoreAssemblyHealth ( uint32  dataId1,
uint32  dataId2,
InstanceScript pInstance 
)
165{
166 if (Creature* cr = pInstance->GetCreature(dataId1))
167 if (cr->IsAlive())
168 cr->SetHealth(cr->GetMaxHealth());
169
170 if (Creature* cr2 = pInstance->GetCreature(dataId2))
171 if (cr2->IsAlive())
172 cr2->SetHealth(cr2->GetMaxHealth());
173}

References InstanceScript::GetCreature().

Referenced by boss_steelbreaker::JustDied(), boss_runemaster_molgeim::JustDied(), and boss_stormcaller_brundir::JustDied().