TrinityCore
boss_halycon.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 "ScriptedCreature.h"
21
23{
24 SPELL_REND = 13738,
26};
27
28enum Says
29{
30 EMOTE_DEATH = 0
31};
32
34{
37};
38
39const Position SummonLocation = { -167.9561f, -411.7844f, 76.23057f, 1.53589f };
40
41struct boss_halycon : public BossAI
42{
43 boss_halycon(Creature* creature) : BossAI(creature, DATA_HALYCON)
44 {
45 Initialize();
46 }
47
49 {
50 Summoned = false;
51 }
52
53 void Reset() override
54 {
55 _Reset();
56 Initialize();
57 }
58
59 void JustEngagedWith(Unit* who) override
60 {
64 }
65
66 void JustDied(Unit* /*killer*/) override
67 {
70
71 Summoned = true;
72 }
73
74 void UpdateAI(uint32 diff) override
75 {
76 if (!UpdateVictim())
77 return;
78
79 events.Update(diff);
80
82 return;
83
84 while (uint32 eventId = events.ExecuteEvent())
85 {
86 switch (eventId)
87 {
88 case EVENT_REND:
91 break;
92 case EVENT_THRASH:
94 break;
95 default:
96 break;
97 }
98
100 return;
101 }
102 }
103 private:
105};
106
108{
110}
uint32_t uint32
Definition: Define.h:142
@ TEMPSUMMON_TIMED_DESPAWN
Definition: ObjectDefines.h:65
Spells
Definition: PlayerAI.cpp:32
@ UNIT_STATE_CASTING
Definition: Unit.h:270
#define RegisterBlackrockSpireCreatureAI(ai_name)
@ NPC_GIZRUL_THE_SLAVENER
@ DATA_HALYCON
Says
@ EMOTE_DEATH
@ SPELL_THRASH
@ SPELL_REND
void AddSC_boss_halycon()
@ EVENT_REND
@ EVENT_THRASH
void JustEngagedWith(Unit *who) override
EventMap events
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
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
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
void JustEngagedWith(Unit *who) override
void Reset() override
void JustDied(Unit *) override
boss_halycon(Creature *creature)
void UpdateAI(uint32 diff) override
void Initialize()