Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
halls_of_reflection.h
Go to the documentation of this file.
1
/*
2
* This file is part of Project SkyFire https://www.projectskyfire.org.
3
* See LICENSE.md file for Copyright information
4
*/
5
6
#ifndef DEF_HALLS_OF_REFLECTION_H
7
#define DEF_HALLS_OF_REFLECTION_H
8
9
#define HoRScriptName "instance_halls_of_reflection"
10
#define MAX_ENCOUNTER 3
11
12
/* Halls of Reflection encounters:
13
0- Falric
14
1- Marwyn
15
2- The Lich King
16
*/
17
18
enum
Data
19
{
20
DATA_FALRIC_EVENT
= 0,
21
DATA_MARWYN_EVENT
= 1,
22
DATA_LICHKING_EVENT
= 2,
23
DATA_INTRO_EVENT
= 3,
24
DATA_FROSWORN_EVENT
= 4,
25
26
DATA_WAVE_COUNT
= 5,
27
DATA_TEAM_IN_INSTANCE
= 6,
28
DATA_FROSTMOURNE
= 7,
29
DATA_FROSTWORN_DOOR
= 8,
30
DATA_ESCAPE_EVENT
= 9,
31
DATA_ESCAPE_LEADER
= 10,
32
DATA_SUMMONS
= 11,
33
DATA_ICEWALL
= 12,
34
DATA_CAVE_IN
= 13
35
};
36
37
enum
Creatures
38
{
39
NPC_JAINA_PART1
= 37221,
40
NPC_SYLVANAS_PART1
= 37223,
41
NPC_UTHER
= 37225,
42
NPC_LICH_KING_PART1
= 37226,
43
NPC_LORALEN
= 37779,
44
NPC_KORELN
= 37582,
45
46
NPC_FALRIC
= 38112,
47
NPC_MARWYN
= 38113,
48
NPC_WAVE_MERCENARY
= 38177,
49
NPC_WAVE_FOOTMAN
= 38173,
50
NPC_WAVE_RIFLEMAN
= 38176,
51
NPC_WAVE_PRIEST
= 38175,
52
NPC_WAVE_MAGE
= 38172,
53
54
NPC_FROSTWORN_GENERAL
= 36723,
55
NPC_REFLECTION
= 37068,
// 37107 for tank only?
56
57
NPC_JAINA_PART2
= 36955,
58
NPC_SYLVANAS_PART2
= 37554,
59
NPC_LICH_KING_PART2
= 36954,
60
NPC_BARTLETT
= 37182,
// High Captain Justin Bartlett
61
NPC_KORM
= 37833,
// Sky-Reaver Korm Blackscar
62
NPC_ICE_WALL
= 37014,
// Ice Wall Target
63
64
NPC_RAGING_GNOUL
= 36940,
65
NPC_RISEN_WITCH_DOCTOR
= 36941,
66
NPC_ABON
= 37069
67
};
68
69
enum
GameObjects
70
{
71
GO_FROSTMOURNE
= 202302,
72
GO_ENTRANCE_DOOR
= 201976,
73
GO_FROSTWORN_DOOR
= 197341,
74
GO_ARTHAS_DOOR
= 197342,
75
//GO_ESCAPE_DOOR = 197343, // always open ?
76
77
GO_ICE_WALL
= 201385,
78
GO_CAVE
= 201596,
79
80
GO_STAIRS_SKYBREAKER
= 201709,
81
GO_SKYBREAKER
= 201598,
82
GO_STAIRS_ORGRIM_HAMMER
= 202211,
83
GO_ORGRIM_HAMMER
= 201599,
84
GO_PORTAL
= 202079,
85
86
GO_CAPTAIN_CHEST_1
= 202212,
//3145
87
GO_CAPTAIN_CHEST_2
= 201710,
//30357
88
GO_CAPTAIN_CHEST_3
= 202337,
//3246
89
GO_CAPTAIN_CHEST_4
= 202336,
//3333
90
};
91
92
enum
HorWorldStates
93
{
94
WORLD_STATE_HOR_WAVES_ENABLED
= 4884,
95
WORLD_STATE_HOR_WAVE_COUNT
= 4882,
96
};
97
98
// Common actions from Instance Script to Boss Script
99
enum
Actions
100
{
101
ACTION_ENTER_COMBAT
,
102
ACTION_START_ESCAPING
,
103
ACTION_WALL_BROKEN
104
};
105
106
enum
TrashGeneralSpells
107
{
108
// General spells
109
SPELL_WELL_OF_SOULS
= 72630,
// cast when spawn(become visible)
110
SPELL_SPIRIT_ACTIVATE
= 72130,
// cast when unit activates
111
};
112
113
enum
InstanceEvents
114
{
115
EVENT_SPAWN_WAVES
= 1,
116
EVENT_NEXT_WAVE
= 2,
117
EVENT_DO_WIPE
= 3,
118
EVENT_ADD_WAVE
= 4,
119
};
120
121
// Base class for FALRIC and MARWYN
122
// handled the summonList and the notification events to/from the InstanceScript
123
struct
boss_horAI
:
ScriptedAI
124
{
125
boss_horAI
(
Creature
* creature) :
ScriptedAI
(creature),
summons
(creature)
126
{
127
instance
=
me
->GetInstanceScript();
128
}
129
130
InstanceScript
*
instance
;
131
EventMap
events
;
132
SummonList
summons
;
133
134
void
Reset
()
135
{
136
events
.Reset();
137
me
->SetVisible(
false
);
138
me
->SetFlag(
UNIT_FIELD_FLAGS
,
UNIT_FLAG_IMMUNE_TO_PC
|
UNIT_FLAG_IMMUNE_TO_NPC
);
139
me
->SetReactState(
REACT_PASSIVE
);
140
if
(
instance
&&
instance
->GetData(
DATA_WAVE_COUNT
) !=
NOT_STARTED
)
141
instance
->ProcessEvent(0,
EVENT_DO_WIPE
);
142
}
143
144
void
DoAction
(
int32
actionID)
145
{
146
switch
(actionID)
147
{
148
case
ACTION_ENTER_COMBAT
:
// called by InstanceScript when boss shall enter in combat.
149
me
->RemoveFlag(
UNIT_FIELD_FLAGS
,
UNIT_FLAG_IMMUNE_TO_PC
|
UNIT_FLAG_IMMUNE_TO_NPC
);
150
me
->SetReactState(
REACT_AGGRESSIVE
);
151
152
if
(
Unit
* unit =
me
->SelectNearestTarget())
153
AttackStart
(unit);
154
155
DoZoneInCombat
();
156
break
;
157
}
158
}
159
160
void
JustSummoned
(
Creature
* summoned)
161
{
162
summons
.Summon(summoned);
163
}
164
};
165
166
template
<
class
AI>
167
AI*
GetHallsOfReflectionAI
(
Creature
* creature)
168
{
169
return
GetInstanceAI<AI>
(creature,
HoRScriptName
);
170
}
171
172
#endif
Actions
Actions
Definition
BattlegroundIC.h:186
int32
std::int32_t int32
Definition
Define.h:73
NOT_STARTED
@ NOT_STARTED
Definition
InstanceScript.h:46
GetInstanceAI
AI * GetInstanceAI(T *obj, char const *scriptName)
Definition
InstanceScript.h:232
REACT_PASSIVE
@ REACT_PASSIVE
Definition
Unit.h:1156
REACT_AGGRESSIVE
@ REACT_AGGRESSIVE
Definition
Unit.h:1158
UNIT_FLAG_IMMUNE_TO_NPC
@ UNIT_FLAG_IMMUNE_TO_NPC
Definition
Unit.h:634
UNIT_FLAG_IMMUNE_TO_PC
@ UNIT_FLAG_IMMUNE_TO_PC
Definition
Unit.h:633
UNIT_FIELD_FLAGS
@ UNIT_FIELD_FLAGS
Definition
UpdateFields.h:82
Creatures
Creatures
Definition
alterac_valley.cpp:28
SPELL_WELL_OF_SOULS
@ SPELL_WELL_OF_SOULS
Definition
boss_devourer_of_souls.cpp:45
CreatureAI::DoZoneInCombat
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition
CreatureAI.cpp:33
Creature
Definition
Creature.h:427
EventMap
Definition
CreatureAIImpl.h:304
InstanceScript
Definition
InstanceScript.h:123
SummonList
Definition
ScriptedCreature.h:19
Unit
Definition
Unit.h:1367
NPC_UTHER
@ NPC_UTHER
Definition
culling_of_stratholme.h:44
NPC_JAINA_PART1
@ NPC_JAINA_PART1
Definition
forge_of_souls.h:26
NPC_JAINA_PART2
@ NPC_JAINA_PART2
Definition
forge_of_souls.h:27
NPC_KORELN
@ NPC_KORELN
Definition
forge_of_souls.h:31
NPC_SYLVANAS_PART2
@ NPC_SYLVANAS_PART2
Definition
forge_of_souls.h:25
NPC_LORALEN
@ NPC_LORALEN
Definition
forge_of_souls.h:30
NPC_SYLVANAS_PART1
@ NPC_SYLVANAS_PART1
Definition
forge_of_souls.h:24
DATA_TEAM_IN_INSTANCE
@ DATA_TEAM_IN_INSTANCE
Definition
forge_of_souls.h:16
HoRScriptName
#define HoRScriptName
Definition
halls_of_reflection.h:9
GO_FROSTWORN_DOOR
@ GO_FROSTWORN_DOOR
Definition
halls_of_reflection.h:73
GO_CAPTAIN_CHEST_4
@ GO_CAPTAIN_CHEST_4
Definition
halls_of_reflection.h:89
GO_STAIRS_ORGRIM_HAMMER
@ GO_STAIRS_ORGRIM_HAMMER
Definition
halls_of_reflection.h:82
GO_CAPTAIN_CHEST_1
@ GO_CAPTAIN_CHEST_1
Definition
halls_of_reflection.h:86
GO_SKYBREAKER
@ GO_SKYBREAKER
Definition
halls_of_reflection.h:81
GO_PORTAL
@ GO_PORTAL
Definition
halls_of_reflection.h:84
GO_FROSTMOURNE
@ GO_FROSTMOURNE
Definition
halls_of_reflection.h:71
GO_ICE_WALL
@ GO_ICE_WALL
Definition
halls_of_reflection.h:77
GO_ORGRIM_HAMMER
@ GO_ORGRIM_HAMMER
Definition
halls_of_reflection.h:83
GO_ENTRANCE_DOOR
@ GO_ENTRANCE_DOOR
Definition
halls_of_reflection.h:72
GO_STAIRS_SKYBREAKER
@ GO_STAIRS_SKYBREAKER
Definition
halls_of_reflection.h:80
GO_ARTHAS_DOOR
@ GO_ARTHAS_DOOR
Definition
halls_of_reflection.h:74
GO_CAPTAIN_CHEST_2
@ GO_CAPTAIN_CHEST_2
Definition
halls_of_reflection.h:87
GO_CAVE
@ GO_CAVE
Definition
halls_of_reflection.h:78
GO_CAPTAIN_CHEST_3
@ GO_CAPTAIN_CHEST_3
Definition
halls_of_reflection.h:88
ACTION_START_ESCAPING
@ ACTION_START_ESCAPING
Definition
halls_of_reflection.h:102
ACTION_WALL_BROKEN
@ ACTION_WALL_BROKEN
Definition
halls_of_reflection.h:103
ACTION_ENTER_COMBAT
@ ACTION_ENTER_COMBAT
Definition
halls_of_reflection.h:101
NPC_RISEN_WITCH_DOCTOR
@ NPC_RISEN_WITCH_DOCTOR
Definition
halls_of_reflection.h:65
NPC_KORM
@ NPC_KORM
Definition
halls_of_reflection.h:61
NPC_BARTLETT
@ NPC_BARTLETT
Definition
halls_of_reflection.h:60
NPC_LICH_KING_PART1
@ NPC_LICH_KING_PART1
Definition
halls_of_reflection.h:42
NPC_WAVE_FOOTMAN
@ NPC_WAVE_FOOTMAN
Definition
halls_of_reflection.h:49
NPC_REFLECTION
@ NPC_REFLECTION
Definition
halls_of_reflection.h:55
NPC_WAVE_PRIEST
@ NPC_WAVE_PRIEST
Definition
halls_of_reflection.h:51
NPC_FALRIC
@ NPC_FALRIC
Definition
halls_of_reflection.h:46
NPC_WAVE_MAGE
@ NPC_WAVE_MAGE
Definition
halls_of_reflection.h:52
NPC_ABON
@ NPC_ABON
Definition
halls_of_reflection.h:66
NPC_WAVE_MERCENARY
@ NPC_WAVE_MERCENARY
Definition
halls_of_reflection.h:48
NPC_LICH_KING_PART2
@ NPC_LICH_KING_PART2
Definition
halls_of_reflection.h:59
NPC_ICE_WALL
@ NPC_ICE_WALL
Definition
halls_of_reflection.h:62
NPC_FROSTWORN_GENERAL
@ NPC_FROSTWORN_GENERAL
Definition
halls_of_reflection.h:54
NPC_WAVE_RIFLEMAN
@ NPC_WAVE_RIFLEMAN
Definition
halls_of_reflection.h:50
NPC_RAGING_GNOUL
@ NPC_RAGING_GNOUL
Definition
halls_of_reflection.h:64
NPC_MARWYN
@ NPC_MARWYN
Definition
halls_of_reflection.h:47
HorWorldStates
HorWorldStates
Definition
halls_of_reflection.h:93
WORLD_STATE_HOR_WAVES_ENABLED
@ WORLD_STATE_HOR_WAVES_ENABLED
Definition
halls_of_reflection.h:94
WORLD_STATE_HOR_WAVE_COUNT
@ WORLD_STATE_HOR_WAVE_COUNT
Definition
halls_of_reflection.h:95
GetHallsOfReflectionAI
AI * GetHallsOfReflectionAI(Creature *creature)
Definition
halls_of_reflection.h:167
EVENT_SPAWN_WAVES
@ EVENT_SPAWN_WAVES
Definition
halls_of_reflection.h:115
EVENT_NEXT_WAVE
@ EVENT_NEXT_WAVE
Definition
halls_of_reflection.h:116
EVENT_ADD_WAVE
@ EVENT_ADD_WAVE
Definition
halls_of_reflection.h:118
EVENT_DO_WIPE
@ EVENT_DO_WIPE
Definition
halls_of_reflection.h:117
TrashGeneralSpells
TrashGeneralSpells
Definition
halls_of_reflection.h:107
SPELL_SPIRIT_ACTIVATE
@ SPELL_SPIRIT_ACTIVATE
Definition
halls_of_reflection.h:110
DATA_MARWYN_EVENT
@ DATA_MARWYN_EVENT
Definition
halls_of_reflection.h:21
DATA_INTRO_EVENT
@ DATA_INTRO_EVENT
Definition
halls_of_reflection.h:23
DATA_FROSWORN_EVENT
@ DATA_FROSWORN_EVENT
Definition
halls_of_reflection.h:24
DATA_ESCAPE_EVENT
@ DATA_ESCAPE_EVENT
Definition
halls_of_reflection.h:30
DATA_ESCAPE_LEADER
@ DATA_ESCAPE_LEADER
Definition
halls_of_reflection.h:31
DATA_SUMMONS
@ DATA_SUMMONS
Definition
halls_of_reflection.h:32
DATA_FALRIC_EVENT
@ DATA_FALRIC_EVENT
Definition
halls_of_reflection.h:20
DATA_WAVE_COUNT
@ DATA_WAVE_COUNT
Definition
halls_of_reflection.h:26
DATA_ICEWALL
@ DATA_ICEWALL
Definition
halls_of_reflection.h:33
DATA_CAVE_IN
@ DATA_CAVE_IN
Definition
halls_of_reflection.h:34
DATA_FROSTMOURNE
@ DATA_FROSTMOURNE
Definition
halls_of_reflection.h:28
DATA_LICHKING_EVENT
@ DATA_LICHKING_EVENT
Definition
halls_of_reflection.h:22
DATA_FROSTWORN_DOOR
@ DATA_FROSTWORN_DOOR
Definition
halls_of_reflection.h:29
GameObjects
GameObjects
Definition
instance_blackrock_depths.cpp:30
InstanceEvents
InstanceEvents
Definition
instance_stratholme.cpp:25
Data
Data
Definition
molten_core.h:55
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
ScriptedAI::ScriptedAI
ScriptedAI(Creature *creature)
Definition
ScriptedCreature.cpp:85
ScriptedAI::AttackStart
void AttackStart(Unit *) OVERRIDE
Definition
ScriptedCreature.cpp:118
boss_horAI::summons
SummonList summons
Definition
halls_of_reflection.h:132
boss_horAI::events
EventMap events
Definition
halls_of_reflection.h:131
boss_horAI::DoAction
void DoAction(int32 actionID)
Definition
halls_of_reflection.h:144
boss_horAI::instance
InstanceScript * instance
Definition
halls_of_reflection.h:130
boss_horAI::Reset
void Reset()
Definition
halls_of_reflection.h:134
boss_horAI::boss_horAI
boss_horAI(Creature *creature)
Definition
halls_of_reflection.h:125
boss_horAI::JustSummoned
void JustSummoned(Creature *summoned)
Definition
halls_of_reflection.h:160
src
server
scripts
Northrend
FrozenHalls
HallsOfReflection
halls_of_reflection.h
Generated on
for Project SkyFire Core by
1.17.0