Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_razuvious.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
#include "
ScriptMgr.h
"
7
#include "
ScriptedCreature.h
"
8
#include "
naxxramas.h
"
9
10
//Razuvious - NO TEXT sound only
11
//8852 aggro01 - Hah hah, I'm just getting warmed up!
12
//8853 aggro02 Stand and fight!
13
//8854 aggro03 Show me what you've got!
14
//8861 slay1 - You should've stayed home!
15
//8863 slay2-
16
//8858 cmmnd3 - You disappoint me, students!
17
//8855 cmmnd1 - Do as I taught you!
18
//8856 cmmnd2 - Show them no mercy!
19
//8859 cmmnd4 - The time for practice is over! Show me what you've learned!
20
//8861 Sweep the leg! Do you have a problem with that?
21
//8860 death - An honorable... death...
22
//8947 - Aggro Mixed? - ?
23
24
#define SOUND_AGGRO RAND(8852, 8853, 8854)
25
#define SOUND_SLAY RAND(8861, 8863)
26
#define SOUND_COMMND RAND(8855, 8856, 8858, 8859, 8861)
27
#define SOUND_DEATH 8860
28
#define SOUND_AGGROMIX 8847
29
30
enum
Spells
31
{
32
SPELL_UNBALANCING_STRIKE
= 26613,
33
SPELL_DISRUPTING_SHOUT
= 29107,
34
SPELL_JAGGED_KNIFE
= 55550,
35
SPELL_HOPELESS
= 29125
36
};
37
38
enum
Events
39
{
40
EVENT_NONE
,
41
EVENT_STRIKE
,
42
EVENT_SHOUT
,
43
EVENT_KNIFE
,
44
EVENT_COMMAND
,
45
};
46
47
class
boss_razuvious
:
public
CreatureScript
48
{
49
public
:
50
boss_razuvious
() :
CreatureScript
(
"boss_razuvious"
) { }
51
52
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
53
{
54
return
new
boss_razuviousAI
(creature);
55
}
56
57
struct
boss_razuviousAI
:
public
BossAI
58
{
59
boss_razuviousAI
(
Creature
* creature) :
BossAI
(creature,
BOSS_RAZUVIOUS
) { }
60
61
void
KilledUnit
(
Unit
*
/*victim*/
)
OVERRIDE
62
{
63
if
(!(rand()%3))
64
DoPlaySoundToSet
(
me
,
SOUND_SLAY
);
65
}
66
67
void
DamageTaken
(
Unit
* pDone_by,
uint32
& uiDamage)
OVERRIDE
68
{
69
// Damage done by the controlled Death Knight understudies should also count toward damage done by players
70
if
(pDone_by->GetTypeId() ==
TypeID::TYPEID_UNIT
&& (pDone_by->GetEntry() == 16803 || pDone_by->GetEntry() == 29941))
71
{
72
me
->LowerPlayerDamageReq(uiDamage);
73
}
74
}
75
76
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
77
{
78
_JustDied
();
79
DoPlaySoundToSet
(
me
,
SOUND_DEATH
);
80
me
->CastSpell(
me
,
SPELL_HOPELESS
,
true
);
81
}
82
83
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
84
{
85
_EnterCombat
();
86
DoPlaySoundToSet
(
me
,
SOUND_AGGRO
);
87
events
.ScheduleEvent(
EVENT_STRIKE
, 30000);
88
events
.ScheduleEvent(
EVENT_SHOUT
, 25000);
89
events
.ScheduleEvent(
EVENT_COMMAND
, 40000);
90
events
.ScheduleEvent(
EVENT_KNIFE
, 10000);
91
}
92
93
void
UpdateAI
(
uint32
diff)
OVERRIDE
94
{
95
if
(!
UpdateVictim
())
96
return
;
97
98
events
.Update(diff);
99
100
while
(
uint32
eventId =
events
.ExecuteEvent())
101
{
102
switch
(eventId)
103
{
104
case
EVENT_STRIKE
:
105
DoCastVictim
(
SPELL_UNBALANCING_STRIKE
);
106
events
.ScheduleEvent(
EVENT_STRIKE
, 30000);
107
return
;
108
case
EVENT_SHOUT
:
109
DoCastAOE
(
SPELL_DISRUPTING_SHOUT
);
110
events
.ScheduleEvent(
EVENT_SHOUT
, 25000);
111
return
;
112
case
EVENT_KNIFE
:
113
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0, 45.0f))
114
DoCast
(target,
SPELL_JAGGED_KNIFE
);
115
events
.ScheduleEvent(
EVENT_KNIFE
, 10000);
116
return
;
117
case
EVENT_COMMAND
:
118
DoPlaySoundToSet
(
me
,
SOUND_COMMND
);
119
events
.ScheduleEvent(
EVENT_COMMAND
, 40000);
120
return
;
121
}
122
}
123
124
DoMeleeAttackIfReady
();
125
}
126
};
127
};
128
129
void
AddSC_boss_razuvious
()
130
{
131
new
boss_razuvious
();
132
}
Spells
Spells
Definition
BattlegroundIC.h:645
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
TypeID::TYPEID_UNIT
@ TYPEID_UNIT
Definition
Object.h:54
ScriptMgr.h
ScriptedCreature.h
SELECT_TARGET_RANDOM
@ SELECT_TARGET_RANDOM
Definition
UnitAI.h:23
Events
Events
Definition
alterac_valley.cpp:40
EVENT_NONE
@ EVENT_NONE
Definition
boss_felmyst.cpp:84
EVENT_SHOUT
@ EVENT_SHOUT
Definition
boss_overlord_wyrmthalak.cpp:21
EVENT_STRIKE
@ EVENT_STRIKE
Definition
boss_pyroguard_emberseer.cpp:320
SOUND_SLAY
#define SOUND_SLAY
Definition
boss_razuvious.cpp:25
AddSC_boss_razuvious
void AddSC_boss_razuvious()
Definition
boss_razuvious.cpp:129
SOUND_COMMND
#define SOUND_COMMND
Definition
boss_razuvious.cpp:26
SOUND_DEATH
#define SOUND_DEATH
Definition
boss_razuvious.cpp:27
SPELL_HOPELESS
@ SPELL_HOPELESS
Definition
boss_razuvious.cpp:35
SPELL_JAGGED_KNIFE
@ SPELL_JAGGED_KNIFE
Definition
boss_razuvious.cpp:34
SPELL_UNBALANCING_STRIKE
@ SPELL_UNBALANCING_STRIKE
Definition
boss_razuvious.cpp:32
SPELL_DISRUPTING_SHOUT
@ SPELL_DISRUPTING_SHOUT
Definition
boss_razuvious.cpp:33
SOUND_AGGRO
#define SOUND_AGGRO
Definition
boss_razuvious.cpp:24
EVENT_KNIFE
@ EVENT_KNIFE
Definition
boss_razuvious.cpp:43
EVENT_COMMAND
@ EVENT_COMMAND
Definition
boss_razuvious.cpp:44
EVENT_SHOUT
@ EVENT_SHOUT
Definition
boss_razuvious.cpp:42
EVENT_STRIKE
@ EVENT_STRIKE
Definition
boss_razuvious.cpp:41
SPELL_UNBALANCING_STRIKE
@ SPELL_UNBALANCING_STRIKE
Definition
boss_twinemperors.cpp:29
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::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::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
UnitAI::DoCastAOE
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition
UnitAI.cpp:176
Unit
Definition
Unit.h:1367
boss_razuvious
Definition
boss_razuvious.cpp:48
boss_razuvious::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_razuvious.cpp:52
boss_razuvious::boss_razuvious
boss_razuvious()
Definition
boss_razuvious.cpp:50
naxxramas.h
BOSS_RAZUVIOUS
@ BOSS_RAZUVIOUS
Definition
naxxramas.h:23
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
ScriptedAI::DoPlaySoundToSet
void DoPlaySoundToSet(WorldObject *source, uint32 soundId)
Definition
ScriptedCreature.cpp:164
boss_razuvious::boss_razuviousAI
Definition
boss_razuvious.cpp:58
boss_razuvious::boss_razuviousAI::boss_razuviousAI
boss_razuviousAI(Creature *creature)
Definition
boss_razuvious.cpp:59
boss_razuvious::boss_razuviousAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_razuvious.cpp:76
boss_razuvious::boss_razuviousAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_razuvious.cpp:93
boss_razuvious::boss_razuviousAI::DamageTaken
void DamageTaken(Unit *pDone_by, uint32 &uiDamage) OVERRIDE
Definition
boss_razuvious.cpp:67
boss_razuvious::boss_razuviousAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_razuvious.cpp:83
boss_razuvious::boss_razuviousAI::KilledUnit
void KilledUnit(Unit *) OVERRIDE
Definition
boss_razuvious.cpp:61
src
server
scripts
Northrend
Naxxramas
boss_razuvious.cpp
Generated on
for Project SkyFire Core by
1.17.0