TrinityCore
boss_beauty.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 "ScriptedCreature.h"
20#include "blackrock_caverns.h"
21
23{
24 SOUND_AGGRO = 18559,
25 SOUND_DEATH = 18563
26};
27
29{
30 SPELL_TERRIFYING_ROAR = 76028, // Not yet Implemented
34 SPELL_BERSERK = 82395 // Not yet Implemented
35};
36
38{
44};
45
47{
48 public:
49 boss_beauty(): CreatureScript("boss_beauty") { }
50
51 struct boss_beautyAI : public BossAI
52 {
53 boss_beautyAI(Creature* creature) : BossAI(creature, DATA_BEAUTY) { }
54
55 void Reset() override
56 {
57 _Reset();
58 }
59
60 void JustEngagedWith(Unit* who) override
61 {
67 }
68
69 void JustDied(Unit* /*killer*/) override
70 {
71 _JustDied();
73 }
74
75 void UpdateAI(uint32 diff) override
76 {
77 if (!UpdateVictim())
78 return;
79
80 events.Update(diff);
81
83 return;
84
85 while (uint32 eventId = events.ExecuteEvent())
86 {
87 switch (eventId)
88 {
92 break;
96 break;
100 break;
101 default:
102 break;
103 }
104 }
105 }
106 };
107
108 CreatureAI* GetAI(Creature* creature) const override
109 {
110 return GetBlackrockCavernsAI<boss_beautyAI>(creature);
111 }
112};
113
115{
116 new boss_beauty();
117}
uint32_t uint32
Definition: Define.h:142
Spells
Definition: PlayerAI.cpp:32
@ UNIT_STATE_CASTING
Definition: Unit.h:270
@ DATA_BEAUTY
Sounds
Definition: boss_beauty.cpp:23
@ SOUND_DEATH
Definition: boss_beauty.cpp:25
@ SOUND_AGGRO
Definition: boss_beauty.cpp:24
@ SPELL_TERRIFYING_ROAR
Definition: boss_beauty.cpp:30
@ SPELL_FLAMEBREAK
Definition: boss_beauty.cpp:33
@ SPELL_MAGMA_SPIT
Definition: boss_beauty.cpp:32
@ SPELL_BERSERK
Definition: boss_beauty.cpp:34
@ SPELL_BERSERKER_CHARGE
Definition: boss_beauty.cpp:31
void AddSC_boss_beauty()
@ EVENT_BERSERK
Definition: boss_beauty.cpp:43
@ EVENT_FLAMEBREAK
Definition: boss_beauty.cpp:42
@ EVENT_BERSERKER_CHARGE
Definition: boss_beauty.cpp:40
@ EVENT_TERRIFYING_ROAR
Definition: boss_beauty.cpp:39
@ EVENT_MAGMA_SPIT
Definition: boss_beauty.cpp:41
void JustEngagedWith(Unit *who) override
EventMap events
void _JustDied()
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:79
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
CreatureAI * GetAI(Creature *creature) const override
void DoPlaySoundToSet(WorldObject *source, uint32 soundId)
void JustEngagedWith(Unit *who) override
Definition: boss_beauty.cpp:60
boss_beautyAI(Creature *creature)
Definition: boss_beauty.cpp:53
void JustDied(Unit *) override
Definition: boss_beauty.cpp:69
void UpdateAI(uint32 diff) override
Definition: boss_beauty.cpp:75