Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_hydromancer_thespia.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
#include "
ScriptMgr.h
"
6
#include "
ScriptedCreature.h
"
7
#include "
steam_vault.h
"
8
9
enum
HydromancerThespia
10
{
11
SAY_SUMMON
= 0,
12
SAY_AGGRO
= 1,
13
SAY_SLAY
= 2,
14
SAY_DEAD
= 3,
15
16
SPELL_LIGHTNING_CLOUD
= 25033,
17
SPELL_LUNG_BURST
= 31481,
18
SPELL_ENVELOPING_WINDS
= 31718,
19
20
SPELL_WATER_BOLT_VOLLEY
= 34449,
21
H_SPELL_WATER_BOLT_VOLLEY
= 37924
22
};
23
24
class
boss_hydromancer_thespia
:
public
CreatureScript
25
{
26
public
:
27
boss_hydromancer_thespia
() :
CreatureScript
(
"boss_hydromancer_thespia"
) { }
28
29
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
30
{
31
return
new
boss_thespiaAI
(creature);
32
}
33
34
struct
boss_thespiaAI
:
public
ScriptedAI
35
{
36
boss_thespiaAI
(
Creature
* creature) :
ScriptedAI
(creature)
37
{
38
instance
= creature->
GetInstanceScript
();
39
}
40
41
InstanceScript
*
instance
;
42
43
uint32
LightningCloud_Timer
;
44
uint32
LungBurst_Timer
;
45
uint32
EnvelopingWinds_Timer
;
46
47
void
Reset
()
OVERRIDE
48
{
49
LightningCloud_Timer
= 15000;
50
LungBurst_Timer
= 7000;
51
EnvelopingWinds_Timer
= 9000;
52
53
if
(
instance
)
54
instance
->SetBossState(
DATA_HYDROMANCER_THESPIA
,
NOT_STARTED
);
55
}
56
57
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
58
{
59
Talk
(
SAY_DEAD
);
60
61
if
(
instance
)
62
instance
->SetBossState(
DATA_HYDROMANCER_THESPIA
,
DONE
);
63
}
64
65
void
KilledUnit
(
Unit
*
/*victim*/
)
OVERRIDE
66
{
67
Talk
(
SAY_SLAY
);
68
}
69
70
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
71
{
72
Talk
(
SAY_AGGRO
);
73
74
if
(
instance
)
75
instance
->SetBossState(
DATA_HYDROMANCER_THESPIA
,
IN_PROGRESS
);
76
}
77
78
void
UpdateAI
(
uint32
diff)
OVERRIDE
79
{
80
if
(!
UpdateVictim
())
81
return
;
82
83
//LightningCloud_Timer
84
if
(
LightningCloud_Timer
<= diff)
85
{
86
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0))
87
DoCast
(target,
SPELL_LIGHTNING_CLOUD
);
88
89
//cast twice in Heroic mode
90
if
(
IsHeroic
())
91
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0))
92
DoCast
(target,
SPELL_LIGHTNING_CLOUD
);
93
94
LightningCloud_Timer
= 15000+rand()%10000;
95
}
else
LightningCloud_Timer
-=diff;
96
97
//LungBurst_Timer
98
if
(
LungBurst_Timer
<= diff)
99
{
100
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0))
101
DoCast
(target,
SPELL_LUNG_BURST
);
102
LungBurst_Timer
= 7000+rand()%5000;
103
}
else
LungBurst_Timer
-=diff;
104
105
//EnvelopingWinds_Timer
106
if
(
EnvelopingWinds_Timer
<= diff)
107
{
108
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0))
109
DoCast
(target,
SPELL_ENVELOPING_WINDS
);
110
111
//cast twice in Heroic mode
112
if
(
IsHeroic
())
113
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0))
114
DoCast
(target,
SPELL_ENVELOPING_WINDS
);
115
EnvelopingWinds_Timer
= 10000+rand()%5000;
116
}
else
EnvelopingWinds_Timer
-=diff;
117
118
DoMeleeAttackIfReady
();
119
}
120
};
121
};
122
123
class
npc_coilfang_waterelemental
:
public
CreatureScript
124
{
125
public
:
126
npc_coilfang_waterelemental
() :
CreatureScript
(
"npc_coilfang_waterelemental"
) { }
127
128
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
129
{
130
return
new
npc_coilfang_waterelementalAI
(creature);
131
}
132
133
struct
npc_coilfang_waterelementalAI
:
public
ScriptedAI
134
{
135
npc_coilfang_waterelementalAI
(
Creature
* creature) :
ScriptedAI
(creature) { }
136
137
uint32
WaterBoltVolley_Timer
;
138
139
void
Reset
()
OVERRIDE
140
{
141
WaterBoltVolley_Timer
= 3000+rand()%3000;
142
}
143
144
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
{ }
145
146
void
UpdateAI
(
uint32
diff)
OVERRIDE
147
{
148
if
(!
UpdateVictim
())
149
return
;
150
151
if
(
WaterBoltVolley_Timer
<= diff)
152
{
153
DoCast
(
me
,
SPELL_WATER_BOLT_VOLLEY
);
154
WaterBoltVolley_Timer
= 7000+rand()%5000;
155
}
else
WaterBoltVolley_Timer
-= diff;
156
157
DoMeleeAttackIfReady
();
158
}
159
};
160
};
161
162
void
AddSC_boss_hydromancer_thespia
()
163
{
164
new
boss_hydromancer_thespia
();
165
new
npc_coilfang_waterelemental
();
166
}
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
IN_PROGRESS
@ IN_PROGRESS
Definition
InstanceScript.h:47
DONE
@ DONE
Definition
InstanceScript.h:49
NOT_STARTED
@ NOT_STARTED
Definition
InstanceScript.h:46
ScriptMgr.h
ScriptedCreature.h
SELECT_TARGET_RANDOM
@ SELECT_TARGET_RANDOM
Definition
UnitAI.h:23
SAY_SLAY
@ SAY_SLAY
Definition
boss_alizabal.cpp:20
SAY_AGGRO
#define SAY_AGGRO
Definition
boss_commander_kolurg.cpp:28
AddSC_boss_hydromancer_thespia
void AddSC_boss_hydromancer_thespia()
Definition
boss_hydromancer_thespia.cpp:162
HydromancerThespia
HydromancerThespia
Definition
boss_hydromancer_thespia.cpp:10
H_SPELL_WATER_BOLT_VOLLEY
@ H_SPELL_WATER_BOLT_VOLLEY
Definition
boss_hydromancer_thespia.cpp:21
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_hydromancer_thespia.cpp:12
SPELL_LUNG_BURST
@ SPELL_LUNG_BURST
Definition
boss_hydromancer_thespia.cpp:17
SPELL_WATER_BOLT_VOLLEY
@ SPELL_WATER_BOLT_VOLLEY
Definition
boss_hydromancer_thespia.cpp:20
SAY_SLAY
@ SAY_SLAY
Definition
boss_hydromancer_thespia.cpp:13
SPELL_ENVELOPING_WINDS
@ SPELL_ENVELOPING_WINDS
Definition
boss_hydromancer_thespia.cpp:18
SPELL_LIGHTNING_CLOUD
@ SPELL_LIGHTNING_CLOUD
Definition
boss_hydromancer_thespia.cpp:16
SAY_DEAD
@ SAY_DEAD
Definition
boss_hydromancer_thespia.cpp:14
SPELL_WATER_BOLT_VOLLEY
@ SPELL_WATER_BOLT_VOLLEY
Definition
boss_ichoron.cpp:18
SAY_DEAD
@ SAY_DEAD
Definition
boss_nexusprince_shaffar.cpp:27
SAY_SUMMON
@ SAY_SUMMON
Definition
boss_urok_doomhowl.cpp:19
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
Unit
Definition
Unit.h:1367
WorldObject::GetInstanceScript
InstanceScript * GetInstanceScript()
Definition
Object.cpp:1612
boss_hydromancer_thespia
Definition
boss_hydromancer_thespia.cpp:25
boss_hydromancer_thespia::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_hydromancer_thespia.cpp:29
boss_hydromancer_thespia::boss_hydromancer_thespia
boss_hydromancer_thespia()
Definition
boss_hydromancer_thespia.cpp:27
npc_coilfang_waterelemental
Definition
boss_hydromancer_thespia.cpp:124
npc_coilfang_waterelemental::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_hydromancer_thespia.cpp:128
npc_coilfang_waterelemental::npc_coilfang_waterelemental
npc_coilfang_waterelemental()
Definition
boss_hydromancer_thespia.cpp:126
steam_vault.h
DATA_HYDROMANCER_THESPIA
@ DATA_HYDROMANCER_THESPIA
Definition
steam_vault.h:15
ScriptedAI::IsHeroic
bool IsHeroic() const
Definition
ScriptedCreature.h:279
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
ScriptedAI::ScriptedAI
ScriptedAI(Creature *creature)
Definition
ScriptedCreature.cpp:85
boss_hydromancer_thespia::boss_thespiaAI
Definition
boss_hydromancer_thespia.cpp:35
boss_hydromancer_thespia::boss_thespiaAI::boss_thespiaAI
boss_thespiaAI(Creature *creature)
Definition
boss_hydromancer_thespia.cpp:36
boss_hydromancer_thespia::boss_thespiaAI::EnvelopingWinds_Timer
uint32 EnvelopingWinds_Timer
Definition
boss_hydromancer_thespia.cpp:45
boss_hydromancer_thespia::boss_thespiaAI::LungBurst_Timer
uint32 LungBurst_Timer
Definition
boss_hydromancer_thespia.cpp:44
boss_hydromancer_thespia::boss_thespiaAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_hydromancer_thespia.cpp:57
boss_hydromancer_thespia::boss_thespiaAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_hydromancer_thespia.cpp:78
boss_hydromancer_thespia::boss_thespiaAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_hydromancer_thespia.cpp:70
boss_hydromancer_thespia::boss_thespiaAI::KilledUnit
void KilledUnit(Unit *) OVERRIDE
Definition
boss_hydromancer_thespia.cpp:65
boss_hydromancer_thespia::boss_thespiaAI::instance
InstanceScript * instance
Definition
boss_hydromancer_thespia.cpp:41
boss_hydromancer_thespia::boss_thespiaAI::Reset
void Reset() OVERRIDE
Definition
boss_hydromancer_thespia.cpp:47
boss_hydromancer_thespia::boss_thespiaAI::LightningCloud_Timer
uint32 LightningCloud_Timer
Definition
boss_hydromancer_thespia.cpp:43
npc_coilfang_waterelemental::npc_coilfang_waterelementalAI
Definition
boss_hydromancer_thespia.cpp:134
npc_coilfang_waterelemental::npc_coilfang_waterelementalAI::npc_coilfang_waterelementalAI
npc_coilfang_waterelementalAI(Creature *creature)
Definition
boss_hydromancer_thespia.cpp:135
npc_coilfang_waterelemental::npc_coilfang_waterelementalAI::WaterBoltVolley_Timer
uint32 WaterBoltVolley_Timer
Definition
boss_hydromancer_thespia.cpp:137
npc_coilfang_waterelemental::npc_coilfang_waterelementalAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_hydromancer_thespia.cpp:146
npc_coilfang_waterelemental::npc_coilfang_waterelementalAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_hydromancer_thespia.cpp:144
npc_coilfang_waterelemental::npc_coilfang_waterelementalAI::Reset
void Reset() OVERRIDE
Definition
boss_hydromancer_thespia.cpp:139
src
server
scripts
Outland
CoilfangReservoir
SteamVault
boss_hydromancer_thespia.cpp
Generated on
for Project SkyFire Core by
1.17.0