TrinityCore
boss_janalai.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 "zulaman.h"
21
22enum Says
23{
30 SAY_DEATH = 6
31};
32
34{
35};
36
38{
39};
40
42{
43 public:
44
45 boss_janalai() : CreatureScript("boss_janalai") { }
46
47 struct boss_janalaiAI : public BossAI
48 {
49 boss_janalaiAI(Creature* creature) : BossAI(creature, DATA_JANALAI) { }
50
51 void Reset() override
52 {
53 _Reset();
54 }
55
56 void JustEngagedWith(Unit* who) override
57 {
60 }
61
62 void JustDied(Unit* /*killer*/) override
63 {
65 _JustDied();
66 }
67
68 void KilledUnit(Unit* victim) override
69 {
70 if (victim->GetTypeId() == TYPEID_PLAYER)
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 default:
89 break;
90 }
91 }
92 */
93 }
94 };
95
96 CreatureAI* GetAI(Creature* creature) const override
97 {
98 return GetZulAmanAI<boss_janalaiAI>(creature);
99 }
100};
101
103{
104 new boss_janalai();
105}
uint32_t uint32
Definition: Define.h:142
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
Spells
Definition: PlayerAI.cpp:32
@ UNIT_STATE_CASTING
Definition: Unit.h:270
Says
@ SAY_DEATH
@ SAY_PLAYER_KILL
@ SAY_AGGRO
@ EMOTE_FRENZY
@ SAY_SUMMON_HATCHER
@ SAY_FIRE_BOMB
@ SAY_HATCH_ALL_EGGS
void AddSC_boss_janalai()
void JustEngagedWith(Unit *who) override
EventMap events
void _JustDied()
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
void Update(uint32 time)
Definition: EventMap.h:56
TypeID GetTypeId() const
Definition: Object.h:173
Definition: Unit.h:627
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
CreatureAI * GetAI(Creature *creature) const override
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
void JustDied(Unit *) override
boss_janalaiAI(Creature *creature)
void KilledUnit(Unit *victim) override
@ DATA_JANALAI
Definition: zulaman.h:32