Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_the_maker.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_The_Maker
8
SD%Complete: 80
9
SDComment: Mind control no support
10
SDCategory: Hellfire Citadel, Blood Furnace
11
EndScriptData */
12
13
#include "
ScriptMgr.h
"
14
#include "
ScriptedCreature.h
"
15
#include "
blood_furnace.h
"
16
17
enum
Yells
18
{
19
SAY_AGGRO
= 0,
20
SAY_KILL
= 1,
21
SAY_DIE
= 2
22
};
23
24
enum
Spells
25
{
26
SPELL_ACID_SPRAY
= 38153,
27
SPELL_EXPLODING_BREAKER
= 30925,
28
SPELL_KNOCKDOWN
= 20276,
29
SPELL_DOMINATION
= 25772
30
};
31
32
class
boss_the_maker
:
public
CreatureScript
33
{
34
public
:
35
boss_the_maker
() :
CreatureScript
(
"boss_the_maker"
) { }
36
37
struct
boss_the_makerAI
:
public
ScriptedAI
38
{
39
boss_the_makerAI
(
Creature
* creature) :
ScriptedAI
(creature)
40
{
41
instance
= creature->
GetInstanceScript
();
42
}
43
44
InstanceScript
*
instance
;
45
46
uint32
AcidSpray_Timer
;
47
uint32
ExplodingBreaker_Timer
;
48
uint32
Domination_Timer
;
49
uint32
Knockdown_Timer
;
50
51
void
Reset
()
OVERRIDE
52
{
53
AcidSpray_Timer
= 15000;
54
ExplodingBreaker_Timer
= 6000;
55
Domination_Timer
= 120000;
56
Knockdown_Timer
= 10000;
57
58
if
(!
instance
)
59
return
;
60
61
instance
->SetData(
TYPE_THE_MAKER_EVENT
,
NOT_STARTED
);
62
instance
->HandleGameObject(
instance
->GetData64(
DATA_DOOR2
),
true
);
63
}
64
65
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
66
{
67
Talk
(
SAY_AGGRO
);
68
69
if
(!
instance
)
70
return
;
71
72
instance
->SetData(
TYPE_THE_MAKER_EVENT
,
IN_PROGRESS
);
73
instance
->HandleGameObject(
instance
->GetData64(
DATA_DOOR2
),
false
);
74
}
75
76
void
KilledUnit
(
Unit
*
/*victim*/
)
OVERRIDE
77
{
78
Talk
(
SAY_KILL
);
79
}
80
81
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
82
{
83
Talk
(
SAY_DIE
);
84
85
if
(!
instance
)
86
return
;
87
88
instance
->SetData(
TYPE_THE_MAKER_EVENT
,
DONE
);
89
instance
->HandleGameObject(
instance
->GetData64(
DATA_DOOR2
),
true
);
90
instance
->HandleGameObject(
instance
->GetData64(
DATA_DOOR3
),
true
);
91
}
92
93
void
UpdateAI
(
uint32
diff)
OVERRIDE
94
{
95
if
(!
UpdateVictim
())
96
return
;
97
98
if
(
AcidSpray_Timer
<= diff)
99
{
100
DoCastVictim
(
SPELL_ACID_SPRAY
);
101
AcidSpray_Timer
= 15000 + rand() % 8000;
102
}
103
else
104
AcidSpray_Timer
-= diff;
105
106
if
(
ExplodingBreaker_Timer
<= diff)
107
{
108
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0))
109
DoCast
(target,
SPELL_EXPLODING_BREAKER
);
110
ExplodingBreaker_Timer
= 4000 + rand() % 8000;
111
}
112
else
113
ExplodingBreaker_Timer
-= diff;
114
115
/* // Disabled until Core Support for mind control
116
if (domination_timer_timer <= diff)
117
{
118
Unit* target;
119
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
120
121
DoCast(target, SPELL_DOMINATION);
122
123
domination_timer = 120000;
124
} else domination_timer -=diff;
125
*/
126
127
if
(
Knockdown_Timer
<= diff)
128
{
129
DoCastVictim
(
SPELL_KNOCKDOWN
);
130
Knockdown_Timer
= 4000 + rand() % 8000;
131
}
132
else
133
Knockdown_Timer
-= diff;
134
135
DoMeleeAttackIfReady
();
136
}
137
};
138
139
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
140
{
141
return
new
boss_the_makerAI
(creature);
142
}
143
};
144
145
void
AddSC_boss_the_maker
()
146
{
147
new
boss_the_maker
();
148
}
149
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
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
blood_furnace.h
TYPE_THE_MAKER_EVENT
@ TYPE_THE_MAKER_EVENT
Definition
blood_furnace.h:14
DATA_DOOR3
@ DATA_DOOR3
Definition
blood_furnace.h:19
DATA_DOOR2
@ DATA_DOOR2
Definition
blood_furnace.h:18
SAY_AGGRO
#define SAY_AGGRO
Definition
boss_commander_kolurg.cpp:28
SAY_KILL
#define SAY_KILL
Definition
boss_commander_kolurg.cpp:29
SPELL_KNOCKDOWN
@ SPELL_KNOCKDOWN
Definition
boss_drekthar.cpp:13
SAY_DIE
@ SAY_DIE
Definition
boss_kelidan_the_breaker.cpp:29
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_the_maker.cpp:19
SAY_KILL
@ SAY_KILL
Definition
boss_the_maker.cpp:20
SAY_DIE
@ SAY_DIE
Definition
boss_the_maker.cpp:21
SPELL_KNOCKDOWN
@ SPELL_KNOCKDOWN
Definition
boss_the_maker.cpp:28
SPELL_EXPLODING_BREAKER
@ SPELL_EXPLODING_BREAKER
Definition
boss_the_maker.cpp:27
SPELL_ACID_SPRAY
@ SPELL_ACID_SPRAY
Definition
boss_the_maker.cpp:26
SPELL_DOMINATION
@ SPELL_DOMINATION
Definition
boss_the_maker.cpp:29
AddSC_boss_the_maker
void AddSC_boss_the_maker()
Definition
boss_the_maker.cpp:145
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_the_maker
Definition
boss_the_maker.cpp:33
boss_the_maker::boss_the_maker
boss_the_maker()
Definition
boss_the_maker.cpp:35
boss_the_maker::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_the_maker.cpp:139
ScriptedAI::ScriptedAI
ScriptedAI(Creature *creature)
Definition
ScriptedCreature.cpp:85
Yells
Definition
boss_illidan.cpp:256
boss_the_maker::boss_the_makerAI
Definition
boss_the_maker.cpp:38
boss_the_maker::boss_the_makerAI::Domination_Timer
uint32 Domination_Timer
Definition
boss_the_maker.cpp:48
boss_the_maker::boss_the_makerAI::Knockdown_Timer
uint32 Knockdown_Timer
Definition
boss_the_maker.cpp:49
boss_the_maker::boss_the_makerAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_the_maker.cpp:65
boss_the_maker::boss_the_makerAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_the_maker.cpp:93
boss_the_maker::boss_the_makerAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_the_maker.cpp:81
boss_the_maker::boss_the_makerAI::boss_the_makerAI
boss_the_makerAI(Creature *creature)
Definition
boss_the_maker.cpp:39
boss_the_maker::boss_the_makerAI::KilledUnit
void KilledUnit(Unit *) OVERRIDE
Definition
boss_the_maker.cpp:76
boss_the_maker::boss_the_makerAI::ExplodingBreaker_Timer
uint32 ExplodingBreaker_Timer
Definition
boss_the_maker.cpp:47
boss_the_maker::boss_the_makerAI::AcidSpray_Timer
uint32 AcidSpray_Timer
Definition
boss_the_maker.cpp:46
boss_the_maker::boss_the_makerAI::Reset
void Reset() OVERRIDE
Definition
boss_the_maker.cpp:51
boss_the_maker::boss_the_makerAI::instance
InstanceScript * instance
Definition
boss_the_maker.cpp:44
src
server
scripts
Outland
HellfireCitadel
BloodFurnace
boss_the_maker.cpp
Generated on
for Project SkyFire Core by
1.17.0