Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_revelosh.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_Revelosh
8
SD%Complete: 100
9
SDComment:
10
SDCategory: Uldaman
11
EndScriptData */
12
13
#include "
ScriptMgr.h
"
14
#include "
ScriptedCreature.h
"
15
16
enum
Revelosh
17
{
18
SPELL_LIGHTNING_BOLT
= 15801,
19
SPELL_CHAIN_LIGHTNING
= 16006
20
};
21
22
class
boss_revelosh
:
public
CreatureScript
23
{
24
public
:
25
boss_revelosh
() :
CreatureScript
(
"boss_revelosh"
) { }
26
27
struct
boss_reveloshAI
:
public
ScriptedAI
28
{
29
boss_reveloshAI
(
Creature
* creature) :
ScriptedAI
(creature) { }
30
31
uint32
uiLightningBoltTimer
;
32
uint32
uiChainLightningTimer
;
33
34
void
Reset
()
OVERRIDE
35
{
36
uiLightningBoltTimer
= 4000;
37
uiChainLightningTimer
= 28000;
38
}
39
40
void
UpdateAI
(
uint32
uiDiff)
OVERRIDE
41
{
42
//Return since we have no target
43
if
(!
UpdateVictim
())
44
return
;
45
46
//uiLightningBoltTimer
47
if
(
uiLightningBoltTimer
<= uiDiff)
48
{
49
DoCastVictim
(
SPELL_LIGHTNING_BOLT
);
50
uiLightningBoltTimer
= 4000;
51
}
else
uiLightningBoltTimer
-= uiDiff;
52
53
//uiChainLightningTimer
54
if
(
uiChainLightningTimer
<= uiDiff)
55
{
56
DoCastVictim
(
SPELL_CHAIN_LIGHTNING
);
57
uiChainLightningTimer
= 20000;
58
}
59
else
uiChainLightningTimer
-= uiDiff;
60
61
DoMeleeAttackIfReady
();
62
}
63
};
64
65
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
66
{
67
return
new
boss_reveloshAI
(creature);
68
}
69
};
70
71
void
AddSC_boss_revelosh
()
72
{
73
new
boss_revelosh
();
74
}
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
ScriptMgr.h
ScriptedCreature.h
SPELL_LIGHTNING_BOLT
@ SPELL_LIGHTNING_BOLT
Definition
boss_grimlok.cpp:20
Revelosh
Revelosh
Definition
boss_revelosh.cpp:17
SPELL_LIGHTNING_BOLT
@ SPELL_LIGHTNING_BOLT
Definition
boss_revelosh.cpp:18
SPELL_CHAIN_LIGHTNING
@ SPELL_CHAIN_LIGHTNING
Definition
boss_revelosh.cpp:19
AddSC_boss_revelosh
void AddSC_boss_revelosh()
Definition
boss_revelosh.cpp:71
SPELL_CHAIN_LIGHTNING
@ SPELL_CHAIN_LIGHTNING
Definition
bosses_opera.cpp:73
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
boss_revelosh
Definition
boss_revelosh.cpp:23
boss_revelosh::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_revelosh.cpp:65
boss_revelosh::boss_revelosh
boss_revelosh()
Definition
boss_revelosh.cpp:25
ScriptedAI::ScriptedAI
ScriptedAI(Creature *creature)
Definition
ScriptedCreature.cpp:85
boss_revelosh::boss_reveloshAI
Definition
boss_revelosh.cpp:28
boss_revelosh::boss_reveloshAI::uiChainLightningTimer
uint32 uiChainLightningTimer
Definition
boss_revelosh.cpp:32
boss_revelosh::boss_reveloshAI::uiLightningBoltTimer
uint32 uiLightningBoltTimer
Definition
boss_revelosh.cpp:31
boss_revelosh::boss_reveloshAI::Reset
void Reset() OVERRIDE
Definition
boss_revelosh.cpp:34
boss_revelosh::boss_reveloshAI::UpdateAI
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_revelosh.cpp:40
boss_revelosh::boss_reveloshAI::boss_reveloshAI
boss_reveloshAI(Creature *creature)
Definition
boss_revelosh.cpp:29
src
server
scripts
EasternKingdoms
Uldaman
boss_revelosh.cpp
Generated on
for Project SkyFire Core by
1.17.0