TrinityCore
boss_nalorakk.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{
35 SAY_DEATH = 11
36};
37
39{
40};
41
43{
44};
45
47{
48 public:
49
50 boss_nalorakk() : CreatureScript("boss_nalorakk") { }
51
52 struct boss_nalorakkAI : public BossAI
53 {
54 boss_nalorakkAI(Creature* creature) : BossAI(creature, DATA_NALORAKK) { }
55
56 void Reset() override
57 {
58 _Reset();
59 }
60
61 void JustEngagedWith(Unit* who) override
62 {
65 }
66
67 void JustDied(Unit* /*killer*/) override
68 {
70 _JustDied();
71 }
72
73 void KilledUnit(Unit* victim) override
74 {
75 if (victim->GetTypeId() == TYPEID_PLAYER)
77 }
78
79 void UpdateAI(uint32 diff) override
80 {
81 if (!UpdateVictim())
82 return;
83
84 events.Update(diff);
85
87 return;
88 /*
89 while (uint32 eventId = events.ExecuteEvent())
90 {
91 switch (eventId)
92 {
93 default:
94 break;
95 }
96 }
97 */
98 }
99 };
100
101 CreatureAI* GetAI(Creature* creature) const override
102 {
103 return GetZulAmanAI<boss_nalorakkAI>(creature);
104 }
105};
106
108{
109 new boss_nalorakk();
110}
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_SURGE
@ SAY_PLAYER_KILL
@ SAY_AGGRO
@ SAY_BEAR
@ EMOTE_SURGE
@ SAY_WAVE_1
@ SAY_WAVE_3
@ SAY_WAVE_4
@ SAY_TROLL
@ EMOTE_BEAR
@ SAY_WAVE_2
void AddSC_boss_nalorakk()
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 JustDied(Unit *) override
void KilledUnit(Unit *victim) override
boss_nalorakkAI(Creature *creature)
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *who) override
@ DATA_NALORAKK
Definition: zulaman.h:31