Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_shadow_hunter_voshgajin.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_CURSEOFBLOOD
= 24673,
13
SPELL_HEX
= 16708,
14
SPELL_CLEAVE
= 20691,
15
};
16
17
enum
Events
18
{
19
EVENT_CURSE_OF_BLOOD
= 1,
20
EVENT_HEX
= 2,
21
EVENT_CLEAVE
= 3,
22
};
23
24
class
boss_shadow_hunter_voshgajin
:
public
CreatureScript
25
{
26
public
:
27
boss_shadow_hunter_voshgajin
() :
CreatureScript
(
"boss_shadow_hunter_voshgajin"
) { }
28
29
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
30
{
31
return
new
boss_shadowvoshAI
(creature);
32
}
33
34
struct
boss_shadowvoshAI
:
public
BossAI
35
{
36
boss_shadowvoshAI
(
Creature
* creature) :
BossAI
(creature,
DATA_SHADOW_HUNTER_VOSHGAJIN
) { }
37
38
void
Reset
()
OVERRIDE
39
{
40
_Reset
();
41
//DoCast(me, SPELL_ICEARMOR, true);
42
}
43
44
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
45
{
46
_EnterCombat
();
47
events
.ScheduleEvent(
EVENT_CURSE_OF_BLOOD
, 2 *
IN_MILLISECONDS
);
48
events
.ScheduleEvent(
EVENT_HEX
, 8 *
IN_MILLISECONDS
);
49
events
.ScheduleEvent(
EVENT_CLEAVE
, 14 *
IN_MILLISECONDS
);
50
}
51
52
void
JustDied
(
Unit
*
/*killer*/
)
OVERRIDE
53
{
54
_JustDied
();
55
}
56
57
void
UpdateAI
(
uint32
diff)
OVERRIDE
58
{
59
if
(!
UpdateVictim
())
60
return
;
61
62
events
.Update(diff);
63
64
if
(
me
->HasUnitState(
UNIT_STATE_CASTING
))
65
return
;
66
67
while
(
uint32
eventId =
events
.ExecuteEvent())
68
{
69
switch
(eventId)
70
{
71
case
EVENT_CURSE_OF_BLOOD
:
72
DoCastVictim
(
SPELL_CURSEOFBLOOD
);
73
events
.ScheduleEvent(
EVENT_CURSE_OF_BLOOD
, 45 *
IN_MILLISECONDS
);
74
break
;
75
case
EVENT_HEX
:
76
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0, 100,
true
))
77
DoCast
(target,
SPELL_HEX
);
78
events
.ScheduleEvent(
EVENT_HEX
, 15 *
IN_MILLISECONDS
);
79
break
;
80
case
EVENT_CLEAVE
:
81
DoCastVictim
(
SPELL_CLEAVE
);
82
events
.ScheduleEvent(
EVENT_CLEAVE
, 7 *
IN_MILLISECONDS
);
83
break
;
84
}
85
}
86
DoMeleeAttackIfReady
();
87
}
88
};
89
};
90
91
void
AddSC_boss_shadowvosh
()
92
{
93
new
boss_shadow_hunter_voshgajin
();
94
}
Spells
Spells
Definition
BattlegroundIC.h:645
IN_MILLISECONDS
@ IN_MILLISECONDS
Definition
Common.h:125
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
SELECT_TARGET_RANDOM
@ SELECT_TARGET_RANDOM
Definition
UnitAI.h:23
SPELL_CLEAVE
@ SPELL_CLEAVE
Definition
alterac_valley.cpp:12
Events
Events
Definition
alterac_valley.cpp:40
EVENT_CLEAVE
@ EVENT_CLEAVE
Definition
alterac_valley.cpp:42
blackrock_spire.h
DATA_SHADOW_HUNTER_VOSHGAJIN
@ DATA_SHADOW_HUNTER_VOSHGAJIN
Definition
blackrock_spire.h:16
SPELL_CLEAVE
@ SPELL_CLEAVE
Definition
boss_shadow_hunter_voshgajin.cpp:14
SPELL_CURSEOFBLOOD
@ SPELL_CURSEOFBLOOD
Definition
boss_shadow_hunter_voshgajin.cpp:12
SPELL_HEX
@ SPELL_HEX
Definition
boss_shadow_hunter_voshgajin.cpp:13
AddSC_boss_shadowvosh
void AddSC_boss_shadowvosh()
Definition
boss_shadow_hunter_voshgajin.cpp:91
EVENT_CURSE_OF_BLOOD
@ EVENT_CURSE_OF_BLOOD
Definition
boss_shadow_hunter_voshgajin.cpp:19
EVENT_HEX
@ EVENT_HEX
Definition
boss_shadow_hunter_voshgajin.cpp:20
EVENT_CLEAVE
@ EVENT_CLEAVE
Definition
boss_shadow_hunter_voshgajin.cpp:21
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::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_shadow_hunter_voshgajin
Definition
boss_shadow_hunter_voshgajin.cpp:25
boss_shadow_hunter_voshgajin::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_shadow_hunter_voshgajin.cpp:29
boss_shadow_hunter_voshgajin::boss_shadow_hunter_voshgajin
boss_shadow_hunter_voshgajin()
Definition
boss_shadow_hunter_voshgajin.cpp:27
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
boss_shadow_hunter_voshgajin::boss_shadowvoshAI
Definition
boss_shadow_hunter_voshgajin.cpp:35
boss_shadow_hunter_voshgajin::boss_shadowvoshAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_shadow_hunter_voshgajin.cpp:57
boss_shadow_hunter_voshgajin::boss_shadowvoshAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_shadow_hunter_voshgajin.cpp:44
boss_shadow_hunter_voshgajin::boss_shadowvoshAI::JustDied
void JustDied(Unit *) OVERRIDE
Definition
boss_shadow_hunter_voshgajin.cpp:52
boss_shadow_hunter_voshgajin::boss_shadowvoshAI::boss_shadowvoshAI
boss_shadowvoshAI(Creature *creature)
Definition
boss_shadow_hunter_voshgajin.cpp:36
boss_shadow_hunter_voshgajin::boss_shadowvoshAI::Reset
void Reset() OVERRIDE
Definition
boss_shadow_hunter_voshgajin.cpp:38
src
server
scripts
EasternKingdoms
BlackrockMountain
BlackrockSpire
boss_shadow_hunter_voshgajin.cpp
Generated on
for Project SkyFire Core by
1.17.0