Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_gatewatcher_ironhand.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_Ironhand
8
SD%Complete: 75
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
Says
18
{
19
SAY_AGGRO
= 0,
20
SAY_HAMMER
= 1,
21
SAY_SLAY
= 2,
22
SAY_DEATH
= 3,
23
EMOTE_HAMMER
= 4
24
};
25
26
enum
Spells
27
{
28
SPELL_SHADOW_POWER
= 35322,
29
H_SPELL_SHADOW_POWER
= 39193,
30
SPELL_HAMMER_PUNCH
= 35326,
31
SPELL_JACKHAMMER
= 35327,
32
H_SPELL_JACKHAMMER
= 39194,
33
SPELL_STREAM_OF_MACHINE_FLUID
= 35311
34
};
35
36
enum
Events
37
{
38
EVENT_STREAM_OF_MACHINE_FLUID
= 0,
39
EVENT_JACKHAMMER
= 1,
40
EVENT_SHADOW_POWER
= 2
41
};
42
43
class
boss_gatewatcher_iron_hand
:
public
CreatureScript
44
{
45
public
:
46
boss_gatewatcher_iron_hand
():
CreatureScript
(
"boss_gatewatcher_iron_hand"
) { }
47
48
struct
boss_gatewatcher_iron_handAI
:
public
BossAI
49
{
50
boss_gatewatcher_iron_handAI
(
Creature
* creature) :
BossAI
(creature,
DATA_GATEWATCHER_IRON_HAND
) { }
51
52
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
53
{
54
_EnterCombat
();
55
events
.ScheduleEvent(
EVENT_STREAM_OF_MACHINE_FLUID
, 55000);
56
events
.ScheduleEvent(
EVENT_JACKHAMMER
, 45000);
57
events
.ScheduleEvent(
EVENT_SHADOW_POWER
, 25000);
58
Talk
(
SAY_AGGRO
);
59
}
60
61
void
KilledUnit
(
Unit
*
/*victim*/
)
OVERRIDE
62
{
63
if
(
roll_chance_i
(50))
64
Talk
(
SAY_SLAY
);
65
}
66
67
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
68
{
69
_JustDied
();
70
Talk
(
SAY_DEATH
);
71
}
72
73
void
UpdateAI
(
uint32
diff)
OVERRIDE
74
{
75
if
(!
UpdateVictim
())
76
return
;
77
78
events
.Update(diff);
79
80
if
(
me
->HasUnitState(
UNIT_STATE_CASTING
))
81
return
;
82
83
while
(
uint32
eventId =
events
.ExecuteEvent())
84
{
85
switch
(eventId)
86
{
87
case
EVENT_STREAM_OF_MACHINE_FLUID
:
88
DoCastVictim
(
SPELL_STREAM_OF_MACHINE_FLUID
,
true
);
89
events
.ScheduleEvent(
EVENT_STREAM_OF_MACHINE_FLUID
, std::rand() % 50000 + 35000);
90
break
;
91
case
EVENT_JACKHAMMER
:
92
Talk
(
EMOTE_HAMMER
);
94
DoCastVictim
(
SPELL_JACKHAMMER
,
true
);
95
if
(
roll_chance_i
(50))
96
Talk
(
SAY_HAMMER
);
97
events
.ScheduleEvent(
EVENT_JACKHAMMER
, 30000);
98
break
;
99
case
EVENT_SHADOW_POWER
:
100
DoCast
(
me
,
SPELL_SHADOW_POWER
);
101
events
.ScheduleEvent(
EVENT_SHADOW_POWER
, std::rand() % 28000 + 20000);
102
break
;
103
default
:
104
break
;
105
}
106
}
107
108
DoMeleeAttackIfReady
();
109
}
110
};
111
112
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
113
{
114
return
new
boss_gatewatcher_iron_handAI
(creature);
115
}
116
};
117
118
void
AddSC_boss_gatewatcher_iron_hand
()
119
{
120
new
boss_gatewatcher_iron_hand
();
121
}
122
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
roll_chance_i
bool roll_chance_i(int chance)
Definition
Util.h:89
Events
Events
Definition
alterac_valley.cpp:40
SAY_SLAY
@ SAY_SLAY
Definition
boss_alizabal.cpp:20
SAY_DEATH
#define SAY_DEATH
Definition
boss_commander_kolurg.cpp:30
SAY_AGGRO
#define SAY_AGGRO
Definition
boss_commander_kolurg.cpp:28
H_SPELL_SHADOW_POWER
@ H_SPELL_SHADOW_POWER
Definition
boss_gatewatcher_gyrokill.cpp:31
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
EVENT_SHADOW_POWER
@ EVENT_SHADOW_POWER
Definition
boss_gatewatcher_gyrokill.cpp:38
EVENT_STREAM_OF_MACHINE_FLUID
@ EVENT_STREAM_OF_MACHINE_FLUID
Definition
boss_gatewatcher_gyrokill.cpp:36
SAY_DEATH
@ SAY_DEATH
Definition
boss_gatewatcher_ironhand.cpp:22
SAY_AGGRO
@ SAY_AGGRO
Definition
boss_gatewatcher_ironhand.cpp:19
SAY_HAMMER
@ SAY_HAMMER
Definition
boss_gatewatcher_ironhand.cpp:20
SAY_SLAY
@ SAY_SLAY
Definition
boss_gatewatcher_ironhand.cpp:21
EMOTE_HAMMER
@ EMOTE_HAMMER
Definition
boss_gatewatcher_ironhand.cpp:23
AddSC_boss_gatewatcher_iron_hand
void AddSC_boss_gatewatcher_iron_hand()
Definition
boss_gatewatcher_ironhand.cpp:118
SPELL_HAMMER_PUNCH
@ SPELL_HAMMER_PUNCH
Definition
boss_gatewatcher_ironhand.cpp:30
H_SPELL_JACKHAMMER
@ H_SPELL_JACKHAMMER
Definition
boss_gatewatcher_ironhand.cpp:32
SPELL_STREAM_OF_MACHINE_FLUID
@ SPELL_STREAM_OF_MACHINE_FLUID
Definition
boss_gatewatcher_ironhand.cpp:33
SPELL_SHADOW_POWER
@ SPELL_SHADOW_POWER
Definition
boss_gatewatcher_ironhand.cpp:28
SPELL_JACKHAMMER
@ SPELL_JACKHAMMER
Definition
boss_gatewatcher_ironhand.cpp:31
EVENT_JACKHAMMER
@ EVENT_JACKHAMMER
Definition
boss_gatewatcher_ironhand.cpp:39
EVENT_SHADOW_POWER
@ EVENT_SHADOW_POWER
Definition
boss_gatewatcher_ironhand.cpp:40
EVENT_STREAM_OF_MACHINE_FLUID
@ EVENT_STREAM_OF_MACHINE_FLUID
Definition
boss_gatewatcher_ironhand.cpp:38
Says
Says
Definition
boss_halycon.cpp:17
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_iron_hand
Definition
boss_gatewatcher_ironhand.cpp:44
boss_gatewatcher_iron_hand::boss_gatewatcher_iron_hand
boss_gatewatcher_iron_hand()
Definition
boss_gatewatcher_ironhand.cpp:46
boss_gatewatcher_iron_hand::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_gatewatcher_ironhand.cpp:112
mechanar.h
DATA_GATEWATCHER_IRON_HAND
@ DATA_GATEWATCHER_IRON_HAND
Definition
mechanar.h:14
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
boss_gatewatcher_iron_hand::boss_gatewatcher_iron_handAI
Definition
boss_gatewatcher_ironhand.cpp:49
boss_gatewatcher_iron_hand::boss_gatewatcher_iron_handAI::KilledUnit
void KilledUnit(Unit *) OVERRIDE
Definition
boss_gatewatcher_ironhand.cpp:61
boss_gatewatcher_iron_hand::boss_gatewatcher_iron_handAI::boss_gatewatcher_iron_handAI
boss_gatewatcher_iron_handAI(Creature *creature)
Definition
boss_gatewatcher_ironhand.cpp:50
boss_gatewatcher_iron_hand::boss_gatewatcher_iron_handAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_gatewatcher_ironhand.cpp:73
boss_gatewatcher_iron_hand::boss_gatewatcher_iron_handAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_gatewatcher_ironhand.cpp:52
boss_gatewatcher_iron_hand::boss_gatewatcher_iron_handAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_gatewatcher_ironhand.cpp:67
src
server
scripts
Outland
TempestKeep
Mechanar
boss_gatewatcher_ironhand.cpp
Generated on
for Project SkyFire Core by
1.17.0