TrinityCore
Loading...
Searching...
No Matches
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
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
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:154
Spells
Definition PlayerAI.cpp:32
@ UNIT_STATE_CASTING
Definition Unit.h:276
@ DATA_BEAUTY
Sounds
@ SOUND_DEATH
@ SOUND_AGGRO
@ SPELL_TERRIFYING_ROAR
@ SPELL_FLAMEBREAK
@ SPELL_MAGMA_SPIT
@ SPELL_BERSERK
@ SPELL_BERSERKER_CHARGE
void AddSC_boss_beauty()
@ EVENT_BERSERK
@ EVENT_FLAMEBREAK
@ EVENT_BERSERKER_CHARGE
@ EVENT_TERRIFYING_ROAR
@ EVENT_MAGMA_SPIT
void JustEngagedWith(Unit *who) override
EventMap events
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
uint32 ExecuteEvent()
Definition EventMap.cpp:77
void Update(uint32 time)
Definition EventMap.h:61
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
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:635
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
CreatureAI * GetAI(Creature *creature) const override
void DoPlaySoundToSet(WorldObject *source, uint32 soundId)
void JustEngagedWith(Unit *who) override
boss_beautyAI(Creature *creature)
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override