TrinityCore
Loading...
Searching...
No Matches
boss_high_interrogator_gerstahn.cpp
Go to the documentation of this file.
1
/*
2
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3
*
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the
6
* Free Software Foundation; either version 2 of the License, or (at your
7
* option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
* more details.
13
*
14
* You should have received a copy of the GNU General Public License along
15
* with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#include "
ScriptMgr.h
"
19
#include "
blackrock_depths.h
"
20
#include "
ScriptedCreature.h
"
21
22
enum
Spells
23
{
24
SPELL_SHADOWWORDPAIN
= 14032,
25
SPELL_MANABURN
= 14033,
26
SPELL_PSYCHICSCREAM
= 13704,
27
SPELL_SHADOWSHIELD
= 12040
28
};
29
30
enum
Events
31
{
32
EVENT_SHADOW_WORD_PAIN
= 1,
33
EVENT_MANABURN
= 2,
34
EVENT_PSYCHIC_SCREAM
= 3,
35
EVENT_SHADOWSHIELD
= 4
36
};
37
38
class
boss_high_interrogator_gerstahn
:
public
CreatureScript
39
{
40
public
:
41
boss_high_interrogator_gerstahn
() :
CreatureScript
(
"boss_high_interrogator_gerstahn"
) { }
42
43
struct
boss_high_interrogator_gerstahnAI
:
public
ScriptedAI
44
{
45
boss_high_interrogator_gerstahnAI
(
Creature
* creature) :
ScriptedAI
(creature) { }
46
47
void
Reset
()
override
48
{
49
_events
.
Reset
();
50
}
51
52
void
JustEngagedWith
(
Unit
*
/*who*/
)
override
53
{
54
_events
.
ScheduleEvent
(
EVENT_SHADOW_WORD_PAIN
, 4s);
55
_events
.
ScheduleEvent
(
EVENT_MANABURN
, 14s);
56
_events
.
ScheduleEvent
(
EVENT_PSYCHIC_SCREAM
, 32s);
57
_events
.
ScheduleEvent
(
EVENT_SHADOWSHIELD
, 8s);
58
}
59
60
void
UpdateAI
(
uint32
diff)
override
61
{
62
if
(!
UpdateVictim
())
63
return
;
64
65
_events
.
Update
(diff);
66
67
while
(
uint32
eventId =
_events
.
ExecuteEvent
())
68
{
69
switch
(eventId)
70
{
71
case
EVENT_SHADOW_WORD_PAIN
:
72
if
(
Unit
* target =
SelectTarget
(
SelectTargetMethod::Random
, 0, 100.0f,
true
))
73
DoCast
(target,
SPELL_SHADOWWORDPAIN
);
74
_events
.
ScheduleEvent
(
EVENT_SHADOW_WORD_PAIN
, 7s);
75
break
;
76
case
EVENT_PSYCHIC_SCREAM
:
77
DoCastVictim
(
SPELL_PSYCHICSCREAM
);
78
_events
.
ScheduleEvent
(
EVENT_PSYCHIC_SCREAM
, 30s);
79
break
;
80
case
EVENT_MANABURN
:
81
if
(
Unit
* target =
SelectTarget
(
SelectTargetMethod::Random
, 0, 100.0f,
true
))
82
DoCast
(target,
SPELL_MANABURN
);
83
_events
.
ScheduleEvent
(
EVENT_MANABURN
, 10s);
84
break
;
85
case
EVENT_SHADOWSHIELD
:
86
DoCast
(
me
,
SPELL_SHADOWSHIELD
);
87
_events
.
ScheduleEvent
(
EVENT_SHADOWSHIELD
, 25s);
88
break
;
89
default
:
90
break
;
91
}
92
}
93
94
DoMeleeAttackIfReady
();
95
}
96
97
private
:
98
EventMap
_events
;
99
};
100
101
CreatureAI
*
GetAI
(
Creature
* creature)
const override
102
{
103
return
GetBlackrockDepthsAI<boss_high_interrogator_gerstahnAI>(creature);
104
}
105
};
106
107
void
AddSC_boss_high_interrogator_gerstahn
()
108
{
109
new
boss_high_interrogator_gerstahn
();
110
}
uint32
uint32_t uint32
Definition
Define.h:133
Spells
Spells
Definition
PlayerAI.cpp:32
ScriptMgr.h
ScriptedCreature.h
SelectTargetMethod::Random
@ Random
Events
Events
Definition
alterac_valley.cpp:52
blackrock_depths.h
SPELL_SHADOWSHIELD
@ SPELL_SHADOWSHIELD
Definition
boss_high_interrogator_gerstahn.cpp:27
SPELL_PSYCHICSCREAM
@ SPELL_PSYCHICSCREAM
Definition
boss_high_interrogator_gerstahn.cpp:26
SPELL_SHADOWWORDPAIN
@ SPELL_SHADOWWORDPAIN
Definition
boss_high_interrogator_gerstahn.cpp:24
SPELL_MANABURN
@ SPELL_MANABURN
Definition
boss_high_interrogator_gerstahn.cpp:25
AddSC_boss_high_interrogator_gerstahn
void AddSC_boss_high_interrogator_gerstahn()
Definition
boss_high_interrogator_gerstahn.cpp:107
EVENT_PSYCHIC_SCREAM
@ EVENT_PSYCHIC_SCREAM
Definition
boss_high_interrogator_gerstahn.cpp:34
EVENT_SHADOWSHIELD
@ EVENT_SHADOWSHIELD
Definition
boss_high_interrogator_gerstahn.cpp:35
EVENT_SHADOW_WORD_PAIN
@ EVENT_SHADOW_WORD_PAIN
Definition
boss_high_interrogator_gerstahn.cpp:32
EVENT_MANABURN
@ EVENT_MANABURN
Definition
boss_high_interrogator_gerstahn.cpp:33
CreatureAI
Definition
CreatureAI.h:80
CreatureAI::UpdateVictim
bool UpdateVictim()
Definition
CreatureAI.cpp:240
CreatureAI::me
Creature *const me
Definition
CreatureAI.h:82
CreatureScript
Definition
ScriptMgr.h:404
Creature
Definition
Creature.h:62
EventMap
Definition
EventMap.h:26
EventMap::Update
void Update(uint32 time)
Definition
EventMap.h:67
EventMap::ExecuteEvent
EventId ExecuteEvent()
Definition
EventMap.cpp:73
EventMap::ScheduleEvent
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition
EventMap.cpp:36
EventMap::Reset
void Reset()
Definition
EventMap.cpp:21
UnitAI::DoMeleeAttackIfReady
void DoMeleeAttackIfReady()
Definition
UnitAI.cpp:54
UnitAI::DoCastVictim
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition
UnitAI.cpp:166
UnitAI::SelectTarget
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition
UnitAI.cpp:96
UnitAI::DoCast
SpellCastResult DoCast(uint32 spellId)
Definition
UnitAI.cpp:106
Unit
Definition
Unit.h:769
boss_high_interrogator_gerstahn
Definition
boss_high_interrogator_gerstahn.cpp:39
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahn
boss_high_interrogator_gerstahn()
Definition
boss_high_interrogator_gerstahn.cpp:41
boss_high_interrogator_gerstahn::GetAI
CreatureAI * GetAI(Creature *creature) const override
Definition
boss_high_interrogator_gerstahn.cpp:101
ScriptedAI
Definition
ScriptedCreature.h:132
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI
Definition
boss_high_interrogator_gerstahn.cpp:44
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::_events
EventMap _events
Definition
boss_high_interrogator_gerstahn.cpp:98
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::boss_high_interrogator_gerstahnAI
boss_high_interrogator_gerstahnAI(Creature *creature)
Definition
boss_high_interrogator_gerstahn.cpp:45
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::UpdateAI
void UpdateAI(uint32 diff) override
Definition
boss_high_interrogator_gerstahn.cpp:60
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::JustEngagedWith
void JustEngagedWith(Unit *) override
Definition
boss_high_interrogator_gerstahn.cpp:52
boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI::Reset
void Reset() override
Definition
boss_high_interrogator_gerstahn.cpp:47
server
scripts
EasternKingdoms
BlackrockMountain
BlackrockDepths
boss_high_interrogator_gerstahn.cpp
Generated on Sun May 10 2026 02:30:19 for TrinityCore by
1.9.8