Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_gatewatcher_gyrokill.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_gatewatcher_gyrokill
8
SD%Complete: 99%
9
SDComment:
10
SDCategory: Tempest Keep, The Mechanar
11
EndScriptData */
12
13
#include "
ScriptMgr.h
"
14
#include "
ScriptedCreature.h
"
15
#include "
mechanar.h
"
16
17
enum
Say
18
{
19
SAY_AGGRO
= 0,
20
SAY_SLAY
= 1,
21
SAY_SAW_BLADEs
= 2,
22
SAY_DEATH
= 3
23
};
24
25
enum
Spells
26
{
27
SPELL_STREAM_OF_MACHINE_FLUID
= 35311,
28
SPELL_SAW_BLADE
= 35318,
29
H_SPELL_SAW_BLADE
= 39192,
30
SPELL_SHADOW_POWER
= 35322,
31
H_SPELL_SHADOW_POWER
= 39193
32
};
33
34
enum
Events
35
{
36
EVENT_STREAM_OF_MACHINE_FLUID
= 1,
37
EVENT_SAW_BLADE
= 2,
38
EVENT_SHADOW_POWER
= 3
39
};
40
41
class
boss_gatewatcher_gyrokill
:
public
CreatureScript
42
{
43
public
:
44
boss_gatewatcher_gyrokill
() :
CreatureScript
(
"boss_gatewatcher_gyrokill"
) { }
45
46
struct
boss_gatewatcher_gyrokillAI
:
public
BossAI
47
{
48
boss_gatewatcher_gyrokillAI
(
Creature
* creature) :
BossAI
(creature,
DATA_GATEWATCHER_GYROKILL
) { }
49
50
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
51
{
52
_JustDied
();
53
Talk
(
SAY_DEATH
);
54
}
55
56
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
57
{
58
_EnterCombat
();
59
events
.ScheduleEvent(
EVENT_STREAM_OF_MACHINE_FLUID
, 10000);
60
events
.ScheduleEvent(
EVENT_SAW_BLADE
, 20000);
61
events
.ScheduleEvent(
EVENT_SHADOW_POWER
, 25000);
62
Talk
(
SAY_AGGRO
);
63
}
64
65
void
KilledUnit
(
Unit
*
/*victim*/
)
OVERRIDE
66
{
67
Talk
(
SAY_SLAY
);
68
}
69
70
void
UpdateAI
(
uint32
diff)
OVERRIDE
71
{
72
if
(!
UpdateVictim
())
73
return
;
74
75
events
.Update(diff);
76
77
if
(
me
->HasUnitState(
UNIT_STATE_CASTING
))
78
return
;
79
80
while
(
uint32
eventId =
events
.ExecuteEvent())
81
{
82
switch
(eventId)
83
{
84
case
EVENT_STREAM_OF_MACHINE_FLUID
:
85
DoCastVictim
(
SPELL_STREAM_OF_MACHINE_FLUID
,
true
);
86
events
.ScheduleEvent(
EVENT_STREAM_OF_MACHINE_FLUID
, std::rand() % 17000 + 13000);
87
break
;
88
case
EVENT_SAW_BLADE
:
89
DoCast
(
me
,
SPELL_SAW_BLADE
);
90
Talk
(
SAY_SAW_BLADEs
);
91
events
.ScheduleEvent(
EVENT_SAW_BLADE
, std::rand() % 30000 + 20000);
92
break
;
93
case
EVENT_SHADOW_POWER
:
94
DoCast
(
me
,
SPELL_SHADOW_POWER
);
95
events
.ScheduleEvent(
EVENT_SAW_BLADE
, std::rand() % 35000 + 25000);
96
break
;
97
default
:
98
break
;
99
}
100
}
101
102
DoMeleeAttackIfReady
();
103
}
104
};
105
106
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
107
{
108
return
new
boss_gatewatcher_gyrokillAI
(creature);
109
}
110
};
111
112
void
AddSC_boss_gatewatcher_gyrokill
()
113
{
114
new
boss_gatewatcher_gyrokill
();
115
}
Spells
Spells
Definition
BattlegroundIC.h:645
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
ScriptMgr.h
ScriptedCreature.h
UNIT_STATE_CASTING
@ UNIT_STATE_CASTING
Definition
Unit.h:527
Events
Events
Definition
alterac_valley.cpp:40
SAY_SLAY
@ SAY_SLAY
Definition
boss_alizabal.cpp:20
Say
Say
Definition
boss_broodlord_lashlayer.cpp:11
SAY_DEATH
#define SAY_DEATH
Definition
boss_commander_kolurg.cpp:30
SAY_AGGRO
#define SAY_AGGRO
Definition
boss_commander_kolurg.cpp:28
AddSC_boss_gatewatcher_gyrokill
void AddSC_boss_gatewatcher_gyrokill()
Definition
boss_gatewatcher_gyrokill.cpp:112
H_SPELL_SHADOW_POWER
@ H_SPELL_SHADOW_POWER
Definition
boss_gatewatcher_gyrokill.cpp:31
H_SPELL_SAW_BLADE
@ H_SPELL_SAW_BLADE
Definition
boss_gatewatcher_gyrokill.cpp:29
SPELL_STREAM_OF_MACHINE_FLUID
@ SPELL_STREAM_OF_MACHINE_FLUID
Definition
boss_gatewatcher_gyrokill.cpp:27
SPELL_SHADOW_POWER
@ SPELL_SHADOW_POWER
Definition
boss_gatewatcher_gyrokill.cpp:30
SPELL_SAW_BLADE
@ SPELL_SAW_BLADE
Definition
boss_gatewatcher_gyrokill.cpp:28
SAY_DEATH
@ SAY_DEATH
Definition
boss_gatewatcher_gyrokill.cpp:22
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_gatewatcher_gyrokill.cpp:19
SAY_SLAY
@ SAY_SLAY
Definition
boss_gatewatcher_gyrokill.cpp:20
SAY_SAW_BLADEs
@ SAY_SAW_BLADEs
Definition
boss_gatewatcher_gyrokill.cpp:21
EVENT_SHADOW_POWER
@ EVENT_SHADOW_POWER
Definition
boss_gatewatcher_gyrokill.cpp:38
EVENT_SAW_BLADE
@ EVENT_SAW_BLADE
Definition
boss_gatewatcher_gyrokill.cpp:37
EVENT_STREAM_OF_MACHINE_FLUID
@ EVENT_STREAM_OF_MACHINE_FLUID
Definition
boss_gatewatcher_gyrokill.cpp:36
SPELL_SAW_BLADE
@ SPELL_SAW_BLADE
Definition
boss_mekgineer_steamrigger.cpp:28
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
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_gatewatcher_gyrokill
Definition
boss_gatewatcher_gyrokill.cpp:42
boss_gatewatcher_gyrokill::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_gatewatcher_gyrokill.cpp:106
boss_gatewatcher_gyrokill::boss_gatewatcher_gyrokill
boss_gatewatcher_gyrokill()
Definition
boss_gatewatcher_gyrokill.cpp:44
mechanar.h
DATA_GATEWATCHER_GYROKILL
@ DATA_GATEWATCHER_GYROKILL
Definition
mechanar.h:13
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
boss_gatewatcher_gyrokill::boss_gatewatcher_gyrokillAI
Definition
boss_gatewatcher_gyrokill.cpp:47
boss_gatewatcher_gyrokill::boss_gatewatcher_gyrokillAI::boss_gatewatcher_gyrokillAI
boss_gatewatcher_gyrokillAI(Creature *creature)
Definition
boss_gatewatcher_gyrokill.cpp:48
boss_gatewatcher_gyrokill::boss_gatewatcher_gyrokillAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_gatewatcher_gyrokill.cpp:50
boss_gatewatcher_gyrokill::boss_gatewatcher_gyrokillAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_gatewatcher_gyrokill.cpp:56
boss_gatewatcher_gyrokill::boss_gatewatcher_gyrokillAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_gatewatcher_gyrokill.cpp:70
boss_gatewatcher_gyrokill::boss_gatewatcher_gyrokillAI::KilledUnit
void KilledUnit(Unit *) OVERRIDE
Definition
boss_gatewatcher_gyrokill.cpp:65
src
server
scripts
Outland
TempestKeep
Mechanar
boss_gatewatcher_gyrokill.cpp
Generated on
for Project SkyFire Core by
1.17.0