Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
boss_high_interrogator_gerstahn.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
9
enum
Spells
10
{
11
SPELL_SHADOWWORDPAIN
= 10894,
12
SPELL_MANABURN
= 10876,
13
SPELL_PSYCHICSCREAM
= 8122,
14
SPELL_SHADOWSHIELD
= 22417
15
};
16
17
class
boss_high_interrogator_gerstahn
:
public
CreatureScript
18
{
19
public
:
20
boss_high_interrogator_gerstahn
() :
CreatureScript
(
"boss_high_interrogator_gerstahn"
) { }
21
22
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
23
{
24
return
new
boss_high_interrogator_gerstahnAI
(creature);
25
}
26
27
struct
boss_high_interrogator_gerstahnAI
:
public
ScriptedAI
28
{
29
boss_high_interrogator_gerstahnAI
(
Creature
* creature) :
ScriptedAI
(creature) { }
30
31
uint32
ShadowWordPain_Timer
;
32
uint32
ManaBurn_Timer
;
33
uint32
PsychicScream_Timer
;
34
uint32
ShadowShield_Timer
;
35
36
void
Reset
()
OVERRIDE
37
{
38
ShadowWordPain_Timer
= 4000;
39
ManaBurn_Timer
= 14000;
40
PsychicScream_Timer
= 32000;
41
ShadowShield_Timer
= 8000;
42
}
43
44
void
EnterCombat
(
Unit
*
/*who*/
)
OVERRIDE
{ }
45
46
void
UpdateAI
(
uint32
diff)
OVERRIDE
47
{
48
//Return since we have no target
49
if
(!
UpdateVictim
())
50
return
;
51
52
//ShadowWordPain_Timer
53
if
(
ShadowWordPain_Timer
<= diff)
54
{
55
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0, 100,
true
))
56
DoCast
(target,
SPELL_SHADOWWORDPAIN
);
57
ShadowWordPain_Timer
= 7000;
58
}
else
ShadowWordPain_Timer
-= diff;
59
60
//ManaBurn_Timer
61
if
(
ManaBurn_Timer
<= diff)
62
{
63
if
(
Unit
* target =
SelectTarget
(
SELECT_TARGET_RANDOM
, 0, 100,
true
))
64
DoCast
(target,
SPELL_MANABURN
);
65
ManaBurn_Timer
= 10000;
66
}
else
ManaBurn_Timer
-= diff;
67
68
//PsychicScream_Timer
69
if
(
PsychicScream_Timer
<= diff)
70
{
71
DoCastVictim
(
SPELL_PSYCHICSCREAM
);
72
PsychicScream_Timer
= 30000;
73
}
else
PsychicScream_Timer
-= diff;
74
75
//ShadowShield_Timer
76
if
(
ShadowShield_Timer
<= diff)
77
{
78
DoCast
(
me
,
SPELL_SHADOWSHIELD
);
79
ShadowShield_Timer
= 25000;
80
}
else
ShadowShield_Timer
-= diff;
81
82
DoMeleeAttackIfReady
();
83
}
84
};
85
};
86
87
void
AddSC_boss_high_interrogator_gerstahn
()
88
{
89
new
boss_high_interrogator_gerstahn
();
90
}
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
SELECT_TARGET_RANDOM
@ SELECT_TARGET_RANDOM
Definition
UnitAI.h:23
SPELL_SHADOWSHIELD
@ SPELL_SHADOWSHIELD
Definition
boss_high_interrogator_gerstahn.cpp:14
SPELL_PSYCHICSCREAM
@ SPELL_PSYCHICSCREAM
Definition
boss_high_interrogator_gerstahn.cpp:13
SPELL_SHADOWWORDPAIN
@ SPELL_SHADOWWORDPAIN
Definition
boss_high_interrogator_gerstahn.cpp:11
SPELL_MANABURN
@ SPELL_MANABURN
Definition
boss_high_interrogator_gerstahn.cpp:12
AddSC_boss_high_interrogator_gerstahn
void AddSC_boss_high_interrogator_gerstahn()
Definition
boss_high_interrogator_gerstahn.cpp:87
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_high_interrogator_gerstahn
Definition
boss_high_interrogator_gerstahn.cpp:18
boss_high_interrogator_gerstahn::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
boss_high_interrogator_gerstahn.cpp:22
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahn
boss_high_interrogator_gerstahn()
Definition
boss_high_interrogator_gerstahn.cpp:20
ScriptedAI::me
Creature * me
Definition
ScriptedCreature.h:182
ScriptedAI::ScriptedAI
ScriptedAI(Creature *creature)
Definition
ScriptedCreature.cpp:85
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI
Definition
boss_high_interrogator_gerstahn.cpp:28
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::Reset
void Reset() OVERRIDE
Definition
boss_high_interrogator_gerstahn.cpp:36
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::PsychicScream_Timer
uint32 PsychicScream_Timer
Definition
boss_high_interrogator_gerstahn.cpp:33
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::boss_high_interrogator_gerstahnAI
boss_high_interrogator_gerstahnAI(Creature *creature)
Definition
boss_high_interrogator_gerstahn.cpp:29
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::ShadowShield_Timer
uint32 ShadowShield_Timer
Definition
boss_high_interrogator_gerstahn.cpp:34
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::UpdateAI
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition
boss_high_interrogator_gerstahn.cpp:46
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::ShadowWordPain_Timer
uint32 ShadowWordPain_Timer
Definition
boss_high_interrogator_gerstahn.cpp:31
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::ManaBurn_Timer
uint32 ManaBurn_Timer
Definition
boss_high_interrogator_gerstahn.cpp:32
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::EnterCombat
void EnterCombat(Unit *) OVERRIDE
Definition
boss_high_interrogator_gerstahn.cpp:44
src
server
scripts
EasternKingdoms
BlackrockMountain
BlackrockDepths
boss_high_interrogator_gerstahn.cpp
Generated on
for Project SkyFire Core by
1.17.0