Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_amnennar_the_coldbringer.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_Amnennar_the_coldbringer
8
SD%Complete: 100
9
SDComment:
10
SDCategory: Razorfen Downs
11
EndScriptData */
12
13
#include "
ScriptMgr.h
"
14
#include "
ScriptedCreature.h
"
15
16
enum
AmnennarTheColdbringer
17
{
18
SAY_AGGRO
= 0,
19
SAY_SUMMON60
= 1,
20
SAY_SUMMON30
= 2,
21
SAY_HP
= 3,
22
SAY_KILL
= 4,
23
24
SPELL_AMNENNARSWRATH
= 13009,
25
SPELL_FROSTBOLT
= 15530,
26
SPELL_FROST_NOVA
= 15531,
27
SPELL_FROST_SPECTRES
= 12642
28
};
29
30
class
boss_amnennar_the_coldbringer
:
public
CreatureScript
31
{
32
public
:
33
boss_amnennar_the_coldbringer
() :
CreatureScript
(
"boss_amnennar_the_coldbringer"
) { }
34
35
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
36
{
37
return
new
boss_amnennar_the_coldbringerAI
(creature);
38
}
39
40
struct
boss_amnennar_the_coldbringerAI
:
public
ScriptedAI
41
{
42
boss_amnennar_the_coldbringerAI
(
Creature
* creature) :
ScriptedAI
(creature) { }
43
44
uint32
AmnenarsWrath_Timer
;
45
uint32
FrostBolt_Timer
;
46
uint32
FrostNova_Timer
;
47
bool
Spectrals60
;
48
bool
Spectrals30
;
49
bool
Hp
;
50
51
void
Reset
()
OVERRIDE
52
{
53
AmnenarsWrath_Timer
= 8000;
54
FrostBolt_Timer
= 1000;
55
FrostNova_Timer
= std::rand() % 15000 + 10000;
56
Spectrals30
=
false
;
57
Spectrals60
=
false
;
58
Hp
=
false
;
59
}
60
61
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
62
{
63
Talk
(
SAY_AGGRO
);
64
}
65
66
void
KilledUnit
(
Unit
*
/*victim*/
)
OVERRIDE
67
{
68
Talk
(
SAY_KILL
);
69
}
70
71
void
UpdateAI
(
uint32
diff)
OVERRIDE
72
{
73
if
(!
UpdateVictim
())
74
return
;
75
76
//AmnenarsWrath_Timer
77
if
(
AmnenarsWrath_Timer
<= diff)
78
{
79
DoCastVictim
(
SPELL_AMNENNARSWRATH
);
80
AmnenarsWrath_Timer
= 12000;
81
}
else
AmnenarsWrath_Timer
-= diff;
82
83
//FrostBolt_Timer
84
if
(
FrostBolt_Timer
<= diff)
85
{
86
DoCastVictim
(
SPELL_FROSTBOLT
);
87
FrostBolt_Timer
= 8000;
88
}
else
FrostBolt_Timer
-= diff;
89
90
if
(
FrostNova_Timer
<= diff)
91
{
92
DoCast
(
me
,
SPELL_FROST_NOVA
);
93
FrostNova_Timer
= 15000;
94
}
else
FrostNova_Timer
-= diff;
95
96
if
(!
Spectrals60
&&
HealthBelowPct
(60))
97
{
98
Talk
(
SAY_SUMMON60
);
99
DoCastVictim
(
SPELL_FROST_SPECTRES
);
100
Spectrals60
=
true
;
101
}
102
103
if
(!
Hp
&&
HealthBelowPct
(50))
104
{
105
Talk
(
SAY_HP
);
106
Hp
=
true
;
107
}
108
109
if
(!
Spectrals30
&&
HealthBelowPct
(30))
110
{
111
Talk
(
SAY_SUMMON30
);
112
DoCastVictim
(
SPELL_FROST_SPECTRES
);
113
Spectrals30
=
true
;
114
}
115
116
DoMeleeAttackIfReady
();
117
}
118
};
119
};
120
121
void
AddSC_boss_amnennar_the_coldbringer
()
122
{
123
new
boss_amnennar_the_coldbringer
();
124
}
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
ScriptMgr.h
ScriptedCreature.h
SPELL_FROST_NOVA
@ SPELL_FROST_NOVA
Definition
blackfathom_deeps.cpp:17
AmnennarTheColdbringer
AmnennarTheColdbringer
Definition
boss_amnennar_the_coldbringer.cpp:17
SPELL_FROSTBOLT
@ SPELL_FROSTBOLT
Definition
boss_amnennar_the_coldbringer.cpp:25
SPELL_AMNENNARSWRATH
@ SPELL_AMNENNARSWRATH
Definition
boss_amnennar_the_coldbringer.cpp:24
SAY_SUMMON60
@ SAY_SUMMON60
Definition
boss_amnennar_the_coldbringer.cpp:19
SAY_SUMMON30
@ SAY_SUMMON30
Definition
boss_amnennar_the_coldbringer.cpp:20
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_amnennar_the_coldbringer.cpp:18
SAY_HP
@ SAY_HP
Definition
boss_amnennar_the_coldbringer.cpp:21
SAY_KILL
@ SAY_KILL
Definition
boss_amnennar_the_coldbringer.cpp:22
SPELL_FROST_SPECTRES
@ SPELL_FROST_SPECTRES
Definition
boss_amnennar_the_coldbringer.cpp:27
SPELL_FROST_NOVA
@ SPELL_FROST_NOVA
Definition
boss_amnennar_the_coldbringer.cpp:26
AddSC_boss_amnennar_the_coldbringer
void AddSC_boss_amnennar_the_coldbringer()
Definition
boss_amnennar_the_coldbringer.cpp:121
SPELL_FROSTBOLT
@ SPELL_FROSTBOLT
Definition
boss_balinda.cpp:14
SAY_AGGRO
#define SAY_AGGRO
Definition
boss_commander_kolurg.cpp:28
SAY_KILL
#define SAY_KILL
Definition
boss_commander_kolurg.cpp:29
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
UnitAI::DoMeleeAttackIfReady
void DoMeleeAttackIfReady()
Definition
UnitAI.cpp:28
UnitAI::DoCast
void DoCast(uint32 spellId)
Definition
UnitAI.cpp:110
UnitAI::DoCastVictim
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition
UnitAI.cpp:168
Unit
Definition
Unit.h:1367
boss_amnennar_the_coldbringer
Definition
boss_amnennar_the_coldbringer.cpp:31
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringer
boss_amnennar_the_coldbringer()
Definition
boss_amnennar_the_coldbringer.cpp:33
boss_amnennar_the_coldbringer::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_amnennar_the_coldbringer.cpp:35
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
ScriptedAI::HealthBelowPct
bool HealthBelowPct(uint32 pct) const
Definition
ScriptedCreature.h:247
ScriptedAI::ScriptedAI
ScriptedAI(Creature *creature)
Definition
ScriptedCreature.cpp:85
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI
Definition
boss_amnennar_the_coldbringer.cpp:41
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI::Reset
void Reset() OVERRIDE
Definition
boss_amnennar_the_coldbringer.cpp:51
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI::Hp
bool Hp
Definition
boss_amnennar_the_coldbringer.cpp:49
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI::AmnenarsWrath_Timer
uint32 AmnenarsWrath_Timer
Definition
boss_amnennar_the_coldbringer.cpp:44
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI::Spectrals30
bool Spectrals30
Definition
boss_amnennar_the_coldbringer.cpp:48
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI::FrostNova_Timer
uint32 FrostNova_Timer
Definition
boss_amnennar_the_coldbringer.cpp:46
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI::boss_amnennar_the_coldbringerAI
boss_amnennar_the_coldbringerAI(Creature *creature)
Definition
boss_amnennar_the_coldbringer.cpp:42
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_amnennar_the_coldbringer.cpp:61
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_amnennar_the_coldbringer.cpp:71
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI::KilledUnit
void KilledUnit(Unit *) OVERRIDE
Definition
boss_amnennar_the_coldbringer.cpp:66
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI::Spectrals60
bool Spectrals60
Definition
boss_amnennar_the_coldbringer.cpp:47
boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI::FrostBolt_Timer
uint32 FrostBolt_Timer
Definition
boss_amnennar_the_coldbringer.cpp:45
src
server
scripts
Kalimdor
RazorfenDowns
boss_amnennar_the_coldbringer.cpp
Generated on
for Project SkyFire Core by
1.17.0