Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_gehennas.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_Gehennas
8
SD%Complete: 90
9
SDComment: Adds MC NYI
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_GEHENNAS_CURSE
= 19716,
21
SPELL_RAIN_OF_FIRE
= 19717,
22
SPELL_SHADOW_BOLT
= 19728,
23
};
24
25
enum
Events
26
{
27
EVENT_GEHENNAS_CURSE
= 1,
28
EVENT_RAIN_OF_FIRE
= 2,
29
EVENT_SHADOW_BOLT
= 3,
30
};
31
32
class
boss_gehennas
:
public
CreatureScript
33
{
34
public
:
35
boss_gehennas
() :
CreatureScript
(
"boss_gehennas"
) { }
36
37
struct
boss_gehennasAI
:
public
BossAI
38
{
39
boss_gehennasAI
(
Creature
* creature) :
BossAI
(creature,
BOSS_GEHENNAS
)
40
{
41
}
42
43
void
EnterCombat
(
Unit
* victim)
OVERRIDE
44
{
45
BossAI::EnterCombat
(victim);
46
events
.ScheduleEvent(
EVENT_GEHENNAS_CURSE
, 12000);
47
events
.ScheduleEvent(
EVENT_RAIN_OF_FIRE
, 10000);
48
events
.ScheduleEvent(
EVENT_SHADOW_BOLT
, 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_GEHENNAS_CURSE
:
66
DoCastVictim
(
SPELL_GEHENNAS_CURSE
);
67
events
.ScheduleEvent(
EVENT_GEHENNAS_CURSE
, std::rand() % 30000 + 22000);
68
break
;
69
case
EVENT_RAIN_OF_FIRE
:
70
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0))
71
DoCast
(target,
SPELL_RAIN_OF_FIRE
);
72
events
.ScheduleEvent(
EVENT_RAIN_OF_FIRE
, std::rand() % 12000 + 4000);
73
break
;
74
case
EVENT_SHADOW_BOLT
:
75
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 1))
76
DoCast
(target,
SPELL_SHADOW_BOLT
);
77
events
.ScheduleEvent(
EVENT_SHADOW_BOLT
, 7000);
78
break
;
79
default
:
80
break
;
81
}
82
}
83
84
DoMeleeAttackIfReady
();
85
}
86
};
87
88
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
89
{
90
return
new
boss_gehennasAI
(creature);
91
}
92
};
93
94
void
AddSC_boss_gehennas
()
95
{
96
new
boss_gehennas
();
97
}
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
SELECT_TARGET_RANDOM
@ SELECT_TARGET_RANDOM
Definition
UnitAI.h:23
Events
Events
Definition
alterac_valley.cpp:40
SPELL_RAIN_OF_FIRE
@ SPELL_RAIN_OF_FIRE
Definition
boss_gehennas.cpp:21
SPELL_SHADOW_BOLT
@ SPELL_SHADOW_BOLT
Definition
boss_gehennas.cpp:22
SPELL_GEHENNAS_CURSE
@ SPELL_GEHENNAS_CURSE
Definition
boss_gehennas.cpp:20
AddSC_boss_gehennas
void AddSC_boss_gehennas()
Definition
boss_gehennas.cpp:94
EVENT_GEHENNAS_CURSE
@ EVENT_GEHENNAS_CURSE
Definition
boss_gehennas.cpp:27
EVENT_RAIN_OF_FIRE
@ EVENT_RAIN_OF_FIRE
Definition
boss_gehennas.cpp:28
EVENT_SHADOW_BOLT
@ EVENT_SHADOW_BOLT
Definition
boss_gehennas.cpp:29
EVENT_SHADOW_BOLT
@ EVENT_SHADOW_BOLT
Definition
boss_nefarian.cpp:16
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::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
boss_gehennas
Definition
boss_gehennas.cpp:33
boss_gehennas::boss_gehennas
boss_gehennas()
Definition
boss_gehennas.cpp:35
boss_gehennas::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_gehennas.cpp:88
molten_core.h
BOSS_GEHENNAS
@ BOSS_GEHENNAS
Definition
molten_core.h:13
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
boss_gehennas::boss_gehennasAI
Definition
boss_gehennas.cpp:38
boss_gehennas::boss_gehennasAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_gehennas.cpp:51
boss_gehennas::boss_gehennasAI::EnterCombat
void EnterCombat(Unit *victim) OVERRIDE
Definition
boss_gehennas.cpp:43
boss_gehennas::boss_gehennasAI::boss_gehennasAI
boss_gehennasAI(Creature *creature)
Definition
boss_gehennas.cpp:39
src
server
scripts
EasternKingdoms
BlackrockMountain
MoltenCore
boss_gehennas.cpp
Generated on
for Project SkyFire Core by
1.17.0