TrinityCore
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
19SDName: boss_timmy_the_cruel
20SD%Complete: 100
21SDComment:
22SDCategory: Stratholme
23EndScriptData */
24
25#include "ScriptMgr.h"
26#include "ScriptedCreature.h"
27#include "stratholme.h"
28
29enum Says
30{
31 SAY_SPAWN = 0
32};
33
35{
36 SPELL_RAVENOUSCLAW = 17470
37};
38
40{
41public:
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
50 {
52 {
53 Initialize();
54 }
55
57 {
58 RavenousClaw_Timer = 10000;
59 HasYelled = false;
60 }
61
64
65 void Reset() override
66 {
68
69 Initialize();
70 }
71
72 void JustEngagedWith(Unit* who) override
73 {
75
76 if (!HasYelled)
77 {
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
94 //15 seconds until we should cast this again
95 RavenousClaw_Timer = 15000;
96 } else RavenousClaw_Timer -= diff;
97 }
98 };
99
100};
101
103{
105}
uint32_t uint32
Definition: Define.h:142
Spells
Definition: PlayerAI.cpp:32
Says
@ SPELL_RAVENOUSCLAW
void AddSC_boss_timmy_the_cruel()
void JustEngagedWith(Unit *who) override
void Reset() override
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
Definition: Unit.h:627
CreatureAI * GetAI(Creature *creature) const override
@ BOSS_TIMMY_THE_CRUEL
Definition: stratholme.h:29