TrinityCore
boss_aku_mai.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 "blackfathom_deeps.h"
20#include "ScriptedCreature.h"
21
23{
26};
27
29{
32};
33
34struct boss_aku_mai : public BossAI
35{
36 boss_aku_mai(Creature* creature) : BossAI(creature, DATA_AKU_MAI)
37 {
38 Initialize();
39 }
40
42 {
43 IsEnraged = false;
44 }
45
46 void Reset() override
47 {
48 Initialize();
49 _Reset();
50 }
51
52 void JustEngagedWith(Unit* who) override
53 {
56 }
57
58 void DamageTaken(Unit* /*atacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
59 {
60 if (!IsEnraged && me->HealthBelowPctDamaged(30, damage))
61 {
63 IsEnraged = true;
64 }
65 }
66
67 void ExecuteEvent(uint32 eventId) override
68 {
69 switch (eventId)
70 {
74 break;
75 default:
76 break;
77 }
78 }
79
80 private:
82};
83
85{
87}
uint32_t uint32
Definition: Define.h:142
Spells
Definition: PlayerAI.cpp:32
DamageEffectType
Definition: UnitDefines.h:131
#define RegisterBlackfathomDeepsCreatureAI(ai_name)
@ DATA_AKU_MAI
void AddSC_boss_aku_mai()
@ SPELL_FRENZIED_RAGE
@ SPELL_POISON_CLOUD
@ EVENT_POISON_CLOUD
@ EVENT_FRENZIED_RAGE
void JustEngagedWith(Unit *who) override
EventMap events
Creature *const me
Definition: CreatureAI.h:61
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
Definition: Unit.h:781
void ExecuteEvent(uint32 eventId) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void JustEngagedWith(Unit *who) override
void Initialize()
boss_aku_mai(Creature *creature)
void Reset() override