Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_highlord_omokk.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 "
blackrock_spire.h
"
9
10
enum
Spells
11
{
12
SPELL_FRENZY
= 8269,
13
SPELL_KNOCK_AWAY
= 10101
14
};
15
16
enum
Events
17
{
18
EVENT_FRENZY
= 1,
19
EVENT_KNOCK_AWAY
= 2
20
};
21
22
class
boss_highlord_omokk
:
public
CreatureScript
23
{
24
public
:
25
boss_highlord_omokk
() :
CreatureScript
(
"boss_highlord_omokk"
) { }
26
27
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
28
{
29
return
new
boss_highlordomokkAI
(creature);
30
}
31
32
struct
boss_highlordomokkAI
:
public
BossAI
33
{
34
boss_highlordomokkAI
(
Creature
* creature) :
BossAI
(creature,
DATA_HIGHLORD_OMOKK
) { }
35
36
void
Reset
()
OVERRIDE
37
{
38
_Reset
();
39
}
40
41
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
42
{
43
_EnterCombat
();
44
events
.ScheduleEvent(
EVENT_FRENZY
, 20000);
45
events
.ScheduleEvent(
EVENT_KNOCK_AWAY
, 18000);
46
}
47
48
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
49
{
50
_JustDied
();
51
}
52
53
void
UpdateAI
(
uint32
diff)
OVERRIDE
54
{
55
if
(!
UpdateVictim
())
56
return
;
57
58
events
.Update(diff);
59
60
if
(
me
->HasUnitState(
UNIT_STATE_CASTING
))
61
return
;
62
63
while
(
uint32
eventId =
events
.ExecuteEvent())
64
{
65
switch
(eventId)
66
{
67
case
EVENT_FRENZY
:
68
DoCastVictim
(
SPELL_FRENZY
);
69
events
.ScheduleEvent(
EVENT_FRENZY
, 60000);
70
break
;
71
case
EVENT_KNOCK_AWAY
:
72
DoCastVictim
(
SPELL_KNOCK_AWAY
);
73
events
.ScheduleEvent(
EVENT_KNOCK_AWAY
, 12000);
74
break
;
75
default
:
76
break
;
77
}
78
}
79
DoMeleeAttackIfReady
();
80
}
81
};
82
};
83
84
void
AddSC_boss_highlordomokk
()
85
{
86
new
boss_highlord_omokk
();
87
}
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
blackrock_spire.h
DATA_HIGHLORD_OMOKK
@ DATA_HIGHLORD_OMOKK
Definition
blackrock_spire.h:15
SPELL_FRENZY
@ SPELL_FRENZY
Definition
boss_drekthar.cpp:14
EVENT_FRENZY
@ EVENT_FRENZY
Definition
boss_gizrul_the_slavener.cpp:27
SPELL_KNOCK_AWAY
@ SPELL_KNOCK_AWAY
Definition
boss_gyth.cpp:16
EVENT_KNOCK_AWAY
@ EVENT_KNOCK_AWAY
Definition
boss_gyth.cpp:32
SPELL_KNOCK_AWAY
@ SPELL_KNOCK_AWAY
Definition
boss_highlord_omokk.cpp:13
SPELL_FRENZY
@ SPELL_FRENZY
Definition
boss_highlord_omokk.cpp:12
AddSC_boss_highlordomokk
void AddSC_boss_highlordomokk()
Definition
boss_highlord_omokk.cpp:84
EVENT_KNOCK_AWAY
@ EVENT_KNOCK_AWAY
Definition
boss_highlord_omokk.cpp:19
EVENT_FRENZY
@ EVENT_FRENZY
Definition
boss_highlord_omokk.cpp:18
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::_Reset
void _Reset()
Definition
ScriptedCreature.cpp:462
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::DoCastVictim
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition
UnitAI.cpp:168
Unit
Definition
Unit.h:1367
boss_highlord_omokk
Definition
boss_highlord_omokk.cpp:23
boss_highlord_omokk::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_highlord_omokk.cpp:27
boss_highlord_omokk::boss_highlord_omokk
boss_highlord_omokk()
Definition
boss_highlord_omokk.cpp:25
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
boss_highlord_omokk::boss_highlordomokkAI
Definition
boss_highlord_omokk.cpp:33
boss_highlord_omokk::boss_highlordomokkAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_highlord_omokk.cpp:48
boss_highlord_omokk::boss_highlordomokkAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_highlord_omokk.cpp:53
boss_highlord_omokk::boss_highlordomokkAI::Reset
void Reset() OVERRIDE
Definition
boss_highlord_omokk.cpp:36
boss_highlord_omokk::boss_highlordomokkAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_highlord_omokk.cpp:41
boss_highlord_omokk::boss_highlordomokkAI::boss_highlordomokkAI
boss_highlordomokkAI(Creature *creature)
Definition
boss_highlord_omokk.cpp:34
src
server
scripts
EasternKingdoms
BlackrockMountain
BlackrockSpire
boss_highlord_omokk.cpp
Generated on
for Project SkyFire Core by
1.17.0