TrinityCore
Loading...
Searching...
No Matches
boss_timmy_the_cruel.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
/* ScriptData
19
SDName: boss_timmy_the_cruel
20
SD%Complete: 100
21
SDComment:
22
SDCategory: Stratholme
23
EndScriptData */
24
25
#include "
ScriptMgr.h
"
26
#include "
ScriptedCreature.h
"
27
#include "
stratholme.h
"
28
29
enum
Says
30
{
31
SAY_SPAWN
= 0
32
};
33
34
enum
Spells
35
{
36
SPELL_RAVENOUSCLAW
= 17470
37
};
38
39
class
boss_timmy_the_cruel
:
public
CreatureScript
40
{
41
public
:
42
boss_timmy_the_cruel
() :
CreatureScript
(
"boss_timmy_the_cruel"
) { }
43
44
CreatureAI
*
GetAI
(
Creature
* creature)
const override
45
{
46
return
GetStratholmeAI<boss_timmy_the_cruelAI>(creature);
47
}
48
49
struct
boss_timmy_the_cruelAI
:
public
BossAI
50
{
51
boss_timmy_the_cruelAI
(
Creature
* creature) :
BossAI
(creature,
BOSS_TIMMY_THE_CRUEL
)
52
{
53
Initialize
();
54
}
55
56
void
Initialize
()
57
{
58
RavenousClaw_Timer
= 10000;
59
HasYelled
=
false
;
60
}
61
62
uint32
RavenousClaw_Timer
;
63
bool
HasYelled
;
64
65
void
Reset
()
override
66
{
67
BossAI::Reset
();
68
69
Initialize
();
70
}
71
72
void
JustEngagedWith
(
Unit
* who)
override
73
{
74
BossAI::JustEngagedWith
(who);
75
76
if
(!
HasYelled
)
77
{
78
Talk
(
SAY_SPAWN
);
79
HasYelled
=
true
;
80
}
81
}
82
83
void
UpdateAI
(
uint32
diff)
override
84
{
85
//Return since we have no target
86
if
(!
UpdateVictim
())
87
return
;
88
89
//RavenousClaw
90
if
(
RavenousClaw_Timer
<= diff)
91
{
92
//Cast
93
DoCastVictim
(
SPELL_RAVENOUSCLAW
);
94
//15 seconds until we should cast this again
95
RavenousClaw_Timer
= 15000;
96
}
else
RavenousClaw_Timer
-= diff;
97
}
98
};
99
100
};
101
102
void
AddSC_boss_timmy_the_cruel
()
103
{
104
new
boss_timmy_the_cruel
();
105
}
uint32
uint32_t uint32
Definition
Define.h:154
Spells
Spells
Definition
PlayerAI.cpp:32
ScriptMgr.h
ScriptedCreature.h
Talk
Talk
Definition
boss_hadronox.cpp:130
Says
Says
Definition
boss_halycon.cpp:29
SAY_SPAWN
@ SAY_SPAWN
Definition
boss_timmy_the_cruel.cpp:31
SPELL_RAVENOUSCLAW
@ SPELL_RAVENOUSCLAW
Definition
boss_timmy_the_cruel.cpp:36
AddSC_boss_timmy_the_cruel
void AddSC_boss_timmy_the_cruel()
Definition
boss_timmy_the_cruel.cpp:102
BossAI
Definition
ScriptedCreature.h:308
BossAI::JustEngagedWith
void JustEngagedWith(Unit *who) override
Definition
ScriptedCreature.h:329
BossAI::Reset
void Reset() override
Definition
ScriptedCreature.h:328
CreatureAI
Definition
CreatureAI.h:61
CreatureAI::UpdateVictim
bool UpdateVictim()
Definition
CreatureAI.cpp:244
CreatureScript
Definition
ScriptMgr.h:441
Creature
Definition
Creature.h:82
UnitAI::DoCastVictim
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition
UnitAI.cpp:180
Unit
Definition
Unit.h:635
boss_timmy_the_cruel
Definition
boss_timmy_the_cruel.cpp:40
boss_timmy_the_cruel::GetAI
CreatureAI * GetAI(Creature *creature) const override
Definition
boss_timmy_the_cruel.cpp:44
boss_timmy_the_cruel::boss_timmy_the_cruel
boss_timmy_the_cruel()
Definition
boss_timmy_the_cruel.cpp:42
stratholme.h
BOSS_TIMMY_THE_CRUEL
@ BOSS_TIMMY_THE_CRUEL
Definition
stratholme.h:29
boss_timmy_the_cruel::boss_timmy_the_cruelAI
Definition
boss_timmy_the_cruel.cpp:50
boss_timmy_the_cruel::boss_timmy_the_cruelAI::UpdateAI
void UpdateAI(uint32 diff) override
Definition
boss_timmy_the_cruel.cpp:83
boss_timmy_the_cruel::boss_timmy_the_cruelAI::Initialize
void Initialize()
Definition
boss_timmy_the_cruel.cpp:56
boss_timmy_the_cruel::boss_timmy_the_cruelAI::HasYelled
bool HasYelled
Definition
boss_timmy_the_cruel.cpp:63
boss_timmy_the_cruel::boss_timmy_the_cruelAI::Reset
void Reset() override
Definition
boss_timmy_the_cruel.cpp:65
boss_timmy_the_cruel::boss_timmy_the_cruelAI::RavenousClaw_Timer
uint32 RavenousClaw_Timer
Definition
boss_timmy_the_cruel.cpp:62
boss_timmy_the_cruel::boss_timmy_the_cruelAI::JustEngagedWith
void JustEngagedWith(Unit *who) override
Definition
boss_timmy_the_cruel.cpp:72
boss_timmy_the_cruel::boss_timmy_the_cruelAI::boss_timmy_the_cruelAI
boss_timmy_the_cruelAI(Creature *creature)
Definition
boss_timmy_the_cruel.cpp:51
server
scripts
EasternKingdoms
Stratholme
boss_timmy_the_cruel.cpp
Generated on Sun May 10 2026 02:09:08 for TrinityCore by
1.9.8