TrinityCore
boss_daakara.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{
36 SAY_DEATH = 12
37};
38
40{
41};
42
44{
45};
46
48{
49 public:
50
51 boss_daakara() : CreatureScript("boss_daakara") { }
52
53 struct boss_daakaraAI : public BossAI
54 {
55 boss_daakaraAI(Creature* creature) : BossAI(creature, DATA_DAAKARA) { }
56
57 void Reset() override
58 {
59 _Reset();
60 }
61
62 void JustEngagedWith(Unit* who) override
63 {
66 }
67
68 void JustDied(Unit* /*killer*/) override
69 {
71 _JustDied();
72 }
73
74 void KilledUnit(Unit* victim) override
75 {
76 if (victim->GetTypeId() == TYPEID_PLAYER)
78 }
79
80 void UpdateAI(uint32 diff) override
81 {
82 if (!UpdateVictim())
83 return;
84
85 events.Update(diff);
86
88 return;
89 /*
90 while (uint32 eventId = events.ExecuteEvent())
91 {
92 switch (eventId)
93 {
94 default:
95 break;
96 }
97 }
98 */
99 }
100 };
101
102 CreatureAI* GetAI(Creature* creature) const override
103 {
104 return GetZulAmanAI<boss_daakaraAI>(creature);
105 }
106};
107
109{
110 new boss_daakara();
111}
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
@ SAY_DEATH
@ SAY_TRANSFORMS_EAGLE
@ SAY_PLAYER_KILL
@ SAY_AGGRO
@ SAY_ABSORBS_EAGLE_SPIRIT
@ SAY_ABSORBS_LYNX_SPIRIT
@ SAY_TRANSFORMS_LYNX
@ SAY_FIRE_BREATH
@ SAY_TRANSFORMS_DRAGONHAWK
@ SAY_ABSORBS_DRAGONHAWK_SPIRIT
@ SAY_ABSORBS_BEAR_SPIRIT
@ SAY_INTRO
@ SAY_TRANSFORMS_BEAR
void AddSC_boss_daakara()
Says
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 UpdateAI(uint32 diff) override
void JustDied(Unit *) override
void JustEngagedWith(Unit *who) override
void KilledUnit(Unit *victim) override
boss_daakaraAI(Creature *creature)
@ DATA_DAAKARA
Definition: zulaman.h:35