TrinityCore
Loading...
Searching...
No Matches
boss_halazzi.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
31
33{
34};
35
37{
38};
39
41{
42 public:
43
44 boss_halazzi() : CreatureScript("boss_halazzi") { }
45
46 struct boss_halazziAI : public BossAI
47 {
48 boss_halazziAI(Creature* creature) : BossAI(creature, DATA_HALAZZI) { }
49
50 void Reset() override
51 {
52 _Reset();
53 }
54
55 void JustEngagedWith(Unit* who) override
56 {
59 }
60
61 void JustDied(Unit* /*killer*/) override
62 {
64 _JustDied();
65 }
66
67 void KilledUnit(Unit* victim) override
68 {
69 if (victim->GetTypeId() == TYPEID_PLAYER)
71 }
72
73 void UpdateAI(uint32 diff) override
74 {
75 if (!UpdateVictim())
76 return;
77
78 events.Update(diff);
79
81 return;
82 /*
83 while (uint32 eventId = events.ExecuteEvent())
84 {
85 switch (eventId)
86 {
87 default:
88 break;
89 }
90 }
91 */
92 }
93 };
94
95 CreatureAI* GetAI(Creature* creature) const override
96 {
97 return GetZulAmanAI<boss_halazziAI>(creature);
98 }
99};
100
102{
103 new boss_halazzi();
104}
uint32_t uint32
Definition Define.h:154
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
Spells
Definition PlayerAI.cpp:32
@ UNIT_STATE_CASTING
Definition Unit.h:276
void AddSC_boss_halazzi()
@ SAY_DEATH
@ SAY_MELEE
@ SAY_PLAYER_KILL
@ SAY_COMBINE
@ SAY_AGGRO
@ SAY_SPLIT
TypeID GetTypeId() const
Definition BaseEntity.h:166
void JustEngagedWith(Unit *who) override
EventMap events
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void Update(uint32 time)
Definition EventMap.h:61
Definition Unit.h:635
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
CreatureAI * GetAI(Creature *creature) const override
void JustEngagedWith(Unit *who) override
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
void KilledUnit(Unit *victim) override
boss_halazziAI(Creature *creature)
@ DATA_HALAZZI
Definition zulaman.h:33