Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_nethermancer_sepethrea.cpp
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
/* ScriptData
7
SDName: Boss_Nethermancer_Sepethrea
8
SD%Complete: 90
9
SDComment: Need adjustments to initial summons
10
SDCategory: Tempest Keep, The Mechanar
11
EndScriptData */
12
13
#include "
ScriptMgr.h
"
14
#include "
ScriptedCreature.h
"
15
#include "
mechanar.h
"
16
17
enum
Says
18
{
19
SAY_AGGRO
= 0,
20
SAY_SUMMON
= 1,
21
SAY_DRAGONS_BREATH
= 2,
22
SAY_SLAY
= 3,
23
SAY_DEATH
= 4
24
};
25
26
enum
Spells
27
{
28
SPELL_SUMMON_RAGIN_FLAMES
= 35275,
// Not scripted
29
SPELL_FROST_ATTACK
= 35263,
30
SPELL_ARCANE_BLAST
= 35314,
31
SPELL_DRAGONS_BREATH
= 35250,
32
SPELL_KNOCKBACK
= 37317,
33
SPELL_SOLARBURN
= 35267,
34
H_SPELL_SUMMON_RAGIN_FLAMES
= 39084,
// Not scripted
35
SPELL_INFERNO
= 35268,
// Not scripted
36
H_SPELL_INFERNO
= 39346,
// Not scripted
37
SPELL_FIRE_TAIL
= 35278
// Not scripted
38
};
39
40
enum
Events
41
{
42
EVENT_FROST_ATTACK
= 1,
43
EVENT_ARCANE_BLAST
= 2,
44
EVENT_DRAGONS_BREATH
= 3,
45
EVENT_KNOCKBACK
= 4,
46
EVENT_SOLARBURN
= 5
47
};
48
49
class
boss_nethermancer_sepethrea
:
public
CreatureScript
50
{
51
public
:
52
boss_nethermancer_sepethrea
():
CreatureScript
(
"boss_nethermancer_sepethrea"
) { }
53
54
struct
boss_nethermancer_sepethreaAI
:
public
BossAI
55
{
56
boss_nethermancer_sepethreaAI
(
Creature
* creature) :
BossAI
(creature,
DATA_NETHERMANCER_SEPRETHREA
) { }
57
58
void
EnterCombat
(
Unit
* who)
OVERRIDE
59
{
60
_EnterCombat
();
61
events
.ScheduleEvent(
EVENT_FROST_ATTACK
, std::rand() % 10000 + 7000);
62
events
.ScheduleEvent(
EVENT_ARCANE_BLAST
, std::rand() % 18000 + 12000);
63
events
.ScheduleEvent(
EVENT_DRAGONS_BREATH
, std::rand() % 22000 + 18000);
64
events
.ScheduleEvent(
EVENT_KNOCKBACK
, std::rand() % 28000 + 22000);
65
events
.ScheduleEvent(
EVENT_SOLARBURN
, 30000);
66
Talk
(
SAY_AGGRO
);
67
DoCast
(who,
SPELL_SUMMON_RAGIN_FLAMES
);
68
Talk
(
SAY_SUMMON
);
69
}
70
71
void
KilledUnit
(
Unit
*
/*victim*/
)
OVERRIDE
72
{
73
Talk
(
SAY_SLAY
);
74
}
75
76
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
77
{
78
_JustDied
();
79
Talk
(
SAY_DEATH
);
80
}
81
82
void
UpdateAI
(
uint32
diff)
OVERRIDE
83
{
84
if
(!
UpdateVictim
())
85
return
;
86
87
events
.Update(diff);
88
89
if
(
me
->HasUnitState(
UNIT_STATE_CASTING
))
90
return
;
91
92
while
(
uint32
eventId =
events
.ExecuteEvent())
93
{
94
switch
(eventId)
95
{
96
case
EVENT_FROST_ATTACK
:
97
DoCastVictim
(
SPELL_FROST_ATTACK
,
true
);
98
events
.ScheduleEvent(
EVENT_FROST_ATTACK
, std::rand() % 10000 + 7000);
99
break
;
100
case
EVENT_ARCANE_BLAST
:
101
DoCastVictim
(
SPELL_ARCANE_BLAST
,
true
);
102
events
.ScheduleEvent(
EVENT_ARCANE_BLAST
, 15000);
103
break
;
104
case
EVENT_DRAGONS_BREATH
:
105
DoCastVictim
(
SPELL_DRAGONS_BREATH
,
true
);
106
events
.ScheduleEvent(
EVENT_DRAGONS_BREATH
, std::rand() % 22000 + 12000);
107
if
(
roll_chance_i
(50))
108
Talk
(
SAY_DRAGONS_BREATH
);
109
break
;
110
case
EVENT_KNOCKBACK
:
111
DoCastVictim
(
SPELL_KNOCKBACK
,
true
);
112
events
.ScheduleEvent(
EVENT_KNOCKBACK
, std::rand() % 25000 + 15000);
113
break
;
114
case
EVENT_SOLARBURN
:
115
DoCastVictim
(
SPELL_SOLARBURN
,
true
);
116
events
.ScheduleEvent(
EVENT_SOLARBURN
, 30000);
117
break
;
118
default
:
119
break
;
120
}
121
}
122
123
DoMeleeAttackIfReady
();
124
}
125
};
126
127
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
128
{
129
return
new
boss_nethermancer_sepethreaAI
(creature);
130
}
131
};
132
133
class
npc_ragin_flames
:
public
CreatureScript
134
{
135
public
:
136
npc_ragin_flames
() :
CreatureScript
(
"npc_ragin_flames"
) { }
137
138
struct
npc_ragin_flamesAI
:
public
ScriptedAI
139
{
140
npc_ragin_flamesAI
(
Creature
* creature) :
ScriptedAI
(creature)
141
{
142
instance
= creature->
GetInstanceScript
();
143
}
144
145
InstanceScript
*
instance
;
146
147
uint32
inferno_Timer
;
148
uint32
flame_timer
;
149
uint32
Check_Timer
;
150
151
bool
onlyonce
;
152
153
void
Reset
()
OVERRIDE
154
{
155
inferno_Timer
= 10000;
156
flame_timer
= 500;
157
Check_Timer
= 2000;
158
onlyonce
=
false
;
159
me
->ApplySpellImmune(0,
IMMUNITY_DAMAGE
,
SPELL_SCHOOL_MASK_MAGIC
,
true
);
160
me
->ApplySpellImmune(0,
IMMUNITY_DAMAGE
,
SPELL_SCHOOL_MASK_NORMAL
,
true
);
161
me
->SetSpeed(
MOVE_RUN
,
DUNGEON_MODE
(0.5f, 0.7f));
162
}
163
164
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
165
{
166
}
167
168
void
UpdateAI
(
uint32
diff)
OVERRIDE
169
{
170
//Check_Timer
171
if
(
Check_Timer
<= diff)
172
{
173
if
(
instance
)
174
{
175
if
(
instance
->GetData(
DATA_NETHERMANCER_SEPRETHREA
) !=
IN_PROGRESS
)
176
{
177
//remove
178
me
->setDeathState(
DeathState::JUST_DIED
);
179
me
->RemoveCorpse();
180
}
181
}
182
Check_Timer
= 1000;
183
}
else
Check_Timer
-= diff;
184
185
if
(!
UpdateVictim
())
186
return
;
187
188
if
(!
onlyonce
)
189
{
190
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0))
191
me
->GetMotionMaster()->MoveChase(target);
192
onlyonce
=
true
;
193
}
194
195
if
(
inferno_Timer
<= diff)
196
{
197
DoCastVictim
(
SPELL_INFERNO
);
198
me
->TauntApply(
me
->GetVictim());
199
inferno_Timer
= 10000;
200
}
else
inferno_Timer
-= diff;
201
202
if
(
flame_timer
<= diff)
203
{
204
DoCast
(
me
,
SPELL_FIRE_TAIL
);
205
flame_timer
= 500;
206
}
else
flame_timer
-=diff;
207
208
DoMeleeAttackIfReady
();
209
}
210
};
211
212
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
213
{
214
return
new
npc_ragin_flamesAI
(creature);
215
}
216
};
217
218
void
AddSC_boss_nethermancer_sepethrea
()
219
{
220
new
boss_nethermancer_sepethrea
();
221
new
npc_ragin_flames
();
222
}
Spells
Spells
Definition
BattlegroundIC.h:645
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
IN_PROGRESS
@ IN_PROGRESS
Definition
InstanceScript.h:47
ScriptMgr.h
ScriptedCreature.h
IMMUNITY_DAMAGE
@ IMMUNITY_DAMAGE
Definition
SharedDefines.h:1599
SPELL_SCHOOL_MASK_NORMAL
@ SPELL_SCHOOL_MASK_NORMAL
Definition
SharedDefines.h:270
SPELL_SCHOOL_MASK_MAGIC
@ SPELL_SCHOOL_MASK_MAGIC
Definition
SharedDefines.h:285
DeathState::JUST_DIED
@ JUST_DIED
Definition
Unit.h:504
UNIT_STATE_CASTING
@ UNIT_STATE_CASTING
Definition
Unit.h:527
MOVE_RUN
@ MOVE_RUN
Definition
Unit.h:556
SELECT_TARGET_RANDOM
@ SELECT_TARGET_RANDOM
Definition
UnitAI.h:23
roll_chance_i
bool roll_chance_i(int chance)
Definition
Util.h:89
Events
Events
Definition
alterac_valley.cpp:40
SAY_SLAY
@ SAY_SLAY
Definition
boss_alizabal.cpp:20
SPELL_INFERNO
@ SPELL_INFERNO
Definition
boss_baron_geddon.cpp:25
SPELL_KNOCKBACK
@ SPELL_KNOCKBACK
Definition
boss_broodlord_lashlayer.cpp:21
EVENT_KNOCKBACK
@ EVENT_KNOCKBACK
Definition
boss_broodlord_lashlayer.cpp:29
SPELL_ARCANE_BLAST
@ SPELL_ARCANE_BLAST
Definition
boss_chrono_lord_deja.cpp:25
EVENT_ARCANE_BLAST
@ EVENT_ARCANE_BLAST
Definition
boss_chrono_lord_deja.cpp:35
SAY_DEATH
#define SAY_DEATH
Definition
boss_commander_kolurg.cpp:30
SAY_AGGRO
#define SAY_AGGRO
Definition
boss_commander_kolurg.cpp:28
Says
Says
Definition
boss_halycon.cpp:17
SAY_DEATH
@ SAY_DEATH
Definition
boss_nethermancer_sepethrea.cpp:23
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_nethermancer_sepethrea.cpp:19
SAY_SLAY
@ SAY_SLAY
Definition
boss_nethermancer_sepethrea.cpp:22
SAY_SUMMON
@ SAY_SUMMON
Definition
boss_nethermancer_sepethrea.cpp:20
SAY_DRAGONS_BREATH
@ SAY_DRAGONS_BREATH
Definition
boss_nethermancer_sepethrea.cpp:21
AddSC_boss_nethermancer_sepethrea
void AddSC_boss_nethermancer_sepethrea()
Definition
boss_nethermancer_sepethrea.cpp:218
H_SPELL_INFERNO
@ H_SPELL_INFERNO
Definition
boss_nethermancer_sepethrea.cpp:36
SPELL_FROST_ATTACK
@ SPELL_FROST_ATTACK
Definition
boss_nethermancer_sepethrea.cpp:29
SPELL_KNOCKBACK
@ SPELL_KNOCKBACK
Definition
boss_nethermancer_sepethrea.cpp:32
SPELL_FIRE_TAIL
@ SPELL_FIRE_TAIL
Definition
boss_nethermancer_sepethrea.cpp:37
SPELL_DRAGONS_BREATH
@ SPELL_DRAGONS_BREATH
Definition
boss_nethermancer_sepethrea.cpp:31
SPELL_SOLARBURN
@ SPELL_SOLARBURN
Definition
boss_nethermancer_sepethrea.cpp:33
H_SPELL_SUMMON_RAGIN_FLAMES
@ H_SPELL_SUMMON_RAGIN_FLAMES
Definition
boss_nethermancer_sepethrea.cpp:34
SPELL_SUMMON_RAGIN_FLAMES
@ SPELL_SUMMON_RAGIN_FLAMES
Definition
boss_nethermancer_sepethrea.cpp:28
SPELL_INFERNO
@ SPELL_INFERNO
Definition
boss_nethermancer_sepethrea.cpp:35
SPELL_ARCANE_BLAST
@ SPELL_ARCANE_BLAST
Definition
boss_nethermancer_sepethrea.cpp:30
EVENT_FROST_ATTACK
@ EVENT_FROST_ATTACK
Definition
boss_nethermancer_sepethrea.cpp:42
EVENT_DRAGONS_BREATH
@ EVENT_DRAGONS_BREATH
Definition
boss_nethermancer_sepethrea.cpp:44
EVENT_ARCANE_BLAST
@ EVENT_ARCANE_BLAST
Definition
boss_nethermancer_sepethrea.cpp:43
EVENT_KNOCKBACK
@ EVENT_KNOCKBACK
Definition
boss_nethermancer_sepethrea.cpp:45
EVENT_SOLARBURN
@ EVENT_SOLARBURN
Definition
boss_nethermancer_sepethrea.cpp:46
SAY_SUMMON
@ SAY_SUMMON
Definition
boss_urok_doomhowl.cpp:19
BossAI::events
EventMap events
Definition
ScriptedCreature.h:439
BossAI::BossAI
BossAI(Creature *creature, uint32 bossId)
Definition
ScriptedCreature.cpp:456
BossAI::_JustDied
void _JustDied()
Definition
ScriptedCreature.cpp:474
BossAI::_EnterCombat
void _EnterCombat()
Definition
ScriptedCreature.cpp:485
CreatureAI
Definition
CreatureAI.h:54
CreatureAI::Talk
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
Definition
CreatureAI.cpp:28
CreatureAI::UpdateVictim
bool UpdateVictim()
Definition
CreatureAI.cpp:192
Creature
Definition
Creature.h:427
CreatureScript::CreatureScript
CreatureScript(const char *name)
Definition
ScriptMgr.cpp:1436
InstanceScript
Definition
InstanceScript.h:123
UnitAI::DoMeleeAttackIfReady
void DoMeleeAttackIfReady()
Definition
UnitAI.cpp:28
UnitAI::DoCast
void DoCast(uint32 spellId)
Definition
UnitAI.cpp:110
UnitAI::SelectTarget
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition
UnitAI.cpp:66
UnitAI::DoCastVictim
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition
UnitAI.cpp:168
Unit
Definition
Unit.h:1367
WorldObject::GetInstanceScript
InstanceScript * GetInstanceScript()
Definition
Object.cpp:1612
boss_nethermancer_sepethrea
Definition
boss_nethermancer_sepethrea.cpp:50
boss_nethermancer_sepethrea::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_nethermancer_sepethrea.cpp:127
boss_nethermancer_sepethrea::boss_nethermancer_sepethrea
boss_nethermancer_sepethrea()
Definition
boss_nethermancer_sepethrea.cpp:52
npc_ragin_flames
Definition
boss_nethermancer_sepethrea.cpp:134
npc_ragin_flames::npc_ragin_flames
npc_ragin_flames()
Definition
boss_nethermancer_sepethrea.cpp:136
npc_ragin_flames::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_nethermancer_sepethrea.cpp:212
mechanar.h
DATA_NETHERMANCER_SEPRETHREA
@ DATA_NETHERMANCER_SEPRETHREA
Definition
mechanar.h:16
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
ScriptedAI::ScriptedAI
ScriptedAI(Creature *creature)
Definition
ScriptedCreature.cpp:85
ScriptedAI::DUNGEON_MODE
const T & DUNGEON_MODE(const T &normal5, const T &heroic5) const
Definition
ScriptedCreature.h:294
boss_nethermancer_sepethrea::boss_nethermancer_sepethreaAI
Definition
boss_nethermancer_sepethrea.cpp:55
boss_nethermancer_sepethrea::boss_nethermancer_sepethreaAI::boss_nethermancer_sepethreaAI
boss_nethermancer_sepethreaAI(Creature *creature)
Definition
boss_nethermancer_sepethrea.cpp:56
boss_nethermancer_sepethrea::boss_nethermancer_sepethreaAI::KilledUnit
void KilledUnit(Unit *) OVERRIDE
Definition
boss_nethermancer_sepethrea.cpp:71
boss_nethermancer_sepethrea::boss_nethermancer_sepethreaAI::EnterCombat
void EnterCombat(Unit *who) OVERRIDE
Definition
boss_nethermancer_sepethrea.cpp:58
boss_nethermancer_sepethrea::boss_nethermancer_sepethreaAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_nethermancer_sepethrea.cpp:82
boss_nethermancer_sepethrea::boss_nethermancer_sepethreaAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_nethermancer_sepethrea.cpp:76
npc_ragin_flames::npc_ragin_flamesAI
Definition
boss_nethermancer_sepethrea.cpp:139
npc_ragin_flames::npc_ragin_flamesAI::instance
InstanceScript * instance
Definition
boss_nethermancer_sepethrea.cpp:145
npc_ragin_flames::npc_ragin_flamesAI::Reset
void Reset() OVERRIDE
Definition
boss_nethermancer_sepethrea.cpp:153
npc_ragin_flames::npc_ragin_flamesAI::onlyonce
bool onlyonce
Definition
boss_nethermancer_sepethrea.cpp:151
npc_ragin_flames::npc_ragin_flamesAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_nethermancer_sepethrea.cpp:164
npc_ragin_flames::npc_ragin_flamesAI::inferno_Timer
uint32 inferno_Timer
Definition
boss_nethermancer_sepethrea.cpp:147
npc_ragin_flames::npc_ragin_flamesAI::npc_ragin_flamesAI
npc_ragin_flamesAI(Creature *creature)
Definition
boss_nethermancer_sepethrea.cpp:140
npc_ragin_flames::npc_ragin_flamesAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_nethermancer_sepethrea.cpp:168
npc_ragin_flames::npc_ragin_flamesAI::flame_timer
uint32 flame_timer
Definition
boss_nethermancer_sepethrea.cpp:148
npc_ragin_flames::npc_ragin_flamesAI::Check_Timer
uint32 Check_Timer
Definition
boss_nethermancer_sepethrea.cpp:149
src
server
scripts
Outland
TempestKeep
Mechanar
boss_nethermancer_sepethrea.cpp
Generated on
for Project SkyFire Core by
1.17.0