TrinityCore
boss_gizrul_the_slavener.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 "blackrock_spire.h"
20#include "MotionMaster.h"
21#include "ScriptedCreature.h"
22#include "TemporarySummon.h"
23
25{
28 SPELL_FRENZY = 8269
29};
30
32{
33 GIZRUL_PATH = 3219600
34};
35
37{
40 EVENT_FRENZY = 3
41};
42
44{
46
47 void Reset() override
48 {
49 _Reset();
50 }
51
52 void IsSummonedBy(WorldObject* /*summoner*/) override
53 {
55 }
56
57 void JustEngagedWith(Unit* who) override
58 {
62 }
63
64 void JustDied(Unit* /*killer*/) override
65 {
66 _JustDied();
67 }
68
69 void UpdateAI(uint32 diff) override
70 {
71 if (!UpdateVictim())
72 return;
73
74 events.Update(diff);
75
77 return;
78
79 while (uint32 eventId = events.ExecuteEvent())
80 {
81 switch (eventId)
82 {
86 break;
90 break;
91 default:
92 break;
93 }
94
96 return;
97 }
98 }
99};
100
102{
104}
uint32_t uint32
Definition: Define.h:142
Spells
Definition: PlayerAI.cpp:32
@ UNIT_STATE_CASTING
Definition: Unit.h:270
#define RegisterBlackrockSpireCreatureAI(ai_name)
@ DATA_GIZRUL_THE_SLAVENER
void AddSC_boss_gizrul_the_slavener()
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
void MovePath(uint32 pathId, bool repeatable, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, bool generatePath=true)
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
boss_gizrul_the_slavener(Creature *creature)
void IsSummonedBy(WorldObject *) override
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override