TrinityCore
boss_death_knight_darkreaver.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_Death_knight_darkreaver
20SD%Complete: 100
21SDComment:
22SDCategory: Scholomance
23EndScriptData */
24
25#include "ScriptMgr.h"
26#include "scholomance.h"
27#include "ScriptedCreature.h"
28
30{
31public:
32 boss_death_knight_darkreaver() : CreatureScript("boss_death_knight_darkreaver") { }
33
34 CreatureAI* GetAI(Creature* creature) const override
35 {
36 return GetScholomanceAI<boss_death_knight_darkreaverAI>(creature);
37 }
38
40 {
42
43 void Reset() override
44 {
45 }
46
47 void DamageTaken(Unit* /*done_by*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
48 {
49 if (me->GetHealth() <= damage)
50 DoCast(me, 23261, true); //Summon Darkreaver's Fallen Charger
51 }
52
53 void JustEngagedWith(Unit* /*who*/) override
54 {
55 }
56 };
57
58};
59
61{
63}
uint32_t uint32
Definition: Define.h:142
DamageEffectType
Definition: UnitDefines.h:131
void AddSC_boss_death_knight_darkreaver()
Creature *const me
Definition: CreatureAI.h:61
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
uint64 GetHealth() const
Definition: Unit.h:776
CreatureAI * GetAI(Creature *creature) const override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override