Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_lucifron.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_Lucifron
8
SD%Complete: 100
9
SDComment:
10
SDCategory: Molten Core
11
EndScriptData */
12
13
#include "
ObjectMgr.h
"
14
#include "
ScriptMgr.h
"
15
#include "
ScriptedCreature.h
"
16
#include "
molten_core.h
"
17
18
enum
Spells
19
{
20
SPELL_IMPENDING_DOOM
= 19702,
21
SPELL_LUCIFRON_CURSE
= 19703,
22
SPELL_SHADOW_SHOCK
= 20603,
23
};
24
25
enum
Events
26
{
27
EVENT_IMPENDING_DOOM
= 1,
28
EVENT_LUCIFRON_CURSE
= 2,
29
EVENT_SHADOW_SHOCK
= 3,
30
};
31
32
class
boss_lucifron
:
public
CreatureScript
33
{
34
public
:
35
boss_lucifron
() :
CreatureScript
(
"boss_lucifron"
) { }
36
37
struct
boss_lucifronAI
:
public
BossAI
38
{
39
boss_lucifronAI
(
Creature
* creature) :
BossAI
(creature,
BOSS_LUCIFRON
)
40
{
41
}
42
43
void
EnterCombat
(
Unit
* victim)
OVERRIDE
44
{
45
BossAI::EnterCombat
(victim);
46
events
.ScheduleEvent(
EVENT_IMPENDING_DOOM
, 10000);
47
events
.ScheduleEvent(
EVENT_LUCIFRON_CURSE
, 20000);
48
events
.ScheduleEvent(
EVENT_SHADOW_SHOCK
, 6000);
49
}
50
51
void
UpdateAI
(
uint32
diff)
OVERRIDE
52
{
53
if
(!
UpdateVictim
())
54
return
;
55
56
events
.Update(diff);
57
58
if
(
me
->HasUnitState(
UNIT_STATE_CASTING
))
59
return
;
60
61
while
(
uint32
eventId =
events
.ExecuteEvent())
62
{
63
switch
(eventId)
64
{
65
case
EVENT_IMPENDING_DOOM
:
66
DoCastVictim
(
SPELL_IMPENDING_DOOM
);
67
events
.ScheduleEvent(
EVENT_IMPENDING_DOOM
, 20000);
68
break
;
69
case
EVENT_LUCIFRON_CURSE
:
70
DoCastVictim
(
SPELL_LUCIFRON_CURSE
);
71
events
.ScheduleEvent(
EVENT_LUCIFRON_CURSE
, 15000);
72
break
;
73
case
EVENT_SHADOW_SHOCK
:
74
DoCastVictim
(
SPELL_SHADOW_SHOCK
);
75
events
.ScheduleEvent(
EVENT_SHADOW_SHOCK
, 6000);
76
break
;
77
default
:
78
break
;
79
}
80
}
81
82
DoMeleeAttackIfReady
();
83
}
84
};
85
86
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
87
{
88
return
new
boss_lucifronAI
(creature);
89
}
90
};
91
92
void
AddSC_boss_lucifron
()
93
{
94
new
boss_lucifron
();
95
}
Spells
Spells
Definition
BattlegroundIC.h:645
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
ObjectMgr.h
ScriptMgr.h
ScriptedCreature.h
UNIT_STATE_CASTING
@ UNIT_STATE_CASTING
Definition
Unit.h:527
Events
Events
Definition
alterac_valley.cpp:40
AddSC_boss_lucifron
void AddSC_boss_lucifron()
Definition
boss_lucifron.cpp:92
SPELL_LUCIFRON_CURSE
@ SPELL_LUCIFRON_CURSE
Definition
boss_lucifron.cpp:21
SPELL_IMPENDING_DOOM
@ SPELL_IMPENDING_DOOM
Definition
boss_lucifron.cpp:20
SPELL_SHADOW_SHOCK
@ SPELL_SHADOW_SHOCK
Definition
boss_lucifron.cpp:22
EVENT_IMPENDING_DOOM
@ EVENT_IMPENDING_DOOM
Definition
boss_lucifron.cpp:27
EVENT_LUCIFRON_CURSE
@ EVENT_LUCIFRON_CURSE
Definition
boss_lucifron.cpp:28
EVENT_SHADOW_SHOCK
@ EVENT_SHADOW_SHOCK
Definition
boss_lucifron.cpp:29
BossAI::events
EventMap events
Definition
ScriptedCreature.h:439
BossAI::BossAI
BossAI(Creature *creature, uint32 bossId)
Definition
ScriptedCreature.cpp:456
BossAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
ScriptedCreature.h:404
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_lucifron
Definition
boss_lucifron.cpp:33
boss_lucifron::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_lucifron.cpp:86
boss_lucifron::boss_lucifron
boss_lucifron()
Definition
boss_lucifron.cpp:35
molten_core.h
BOSS_LUCIFRON
@ BOSS_LUCIFRON
Definition
molten_core.h:11
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
boss_lucifron::boss_lucifronAI
Definition
boss_lucifron.cpp:38
boss_lucifron::boss_lucifronAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_lucifron.cpp:51
boss_lucifron::boss_lucifronAI::EnterCombat
void EnterCombat(Unit *victim) OVERRIDE
Definition
boss_lucifron.cpp:43
boss_lucifron::boss_lucifronAI::boss_lucifronAI
boss_lucifronAI(Creature *creature)
Definition
boss_lucifron.cpp:39
src
server
scripts
EasternKingdoms
BlackrockMountain
MoltenCore
boss_lucifron.cpp
Generated on
for Project SkyFire Core by
1.17.0