TrinityCore
boss_zanzil.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 "zulgurub.h"
21
23{
25 EMOTE_ZANZIL_ZOMBIES = 1, // ID - 96319 Zanzil's Resurrection Elixir
26 SAY_ZANZIL_ZOMBIES = 2, // ID - 96319 Zanzil's Resurrection Elixir
27 EMOTE_ZANZIL_GRAVEYARD_GAS = 3, // ID - 96338 Zanzil's Graveyard Gas
28 SAY_ZANZIL_GRAVEYARD_GAS = 4, // ID - 96338 Zanzil's Graveyard Gas
29 EMOTE_ZANZIL_BERSEKER = 5, // ID - 96316 Zanzil's Resurrection Elixir
30 SAY_ZANZIL_BERSEKER = 6, // ID - 96316 Zanzil's Resurrection Elixir
32 SAY_DEATH = 8
33};
34
36{
37};
38
40{
41};
42
44{
45 public:
46 boss_zanzil() : CreatureScript("boss_zanzil") { }
47
48 struct boss_zanzilAI : public BossAI
49 {
50 boss_zanzilAI(Creature* creature) : BossAI(creature, DATA_ZANZIL) { }
51
52 void Reset() override
53 {
54 _Reset();
55 }
56
57 void JustEngagedWith(Unit* who) override
58 {
61 }
62
63 void JustDied(Unit* /*killer*/) override
64 {
65 _JustDied();
67 }
68
69 void KilledUnit(Unit* victim) override
70 {
71 if (victim->GetTypeId() == TYPEID_PLAYER)
73 }
74
75 void UpdateAI(uint32 diff) override
76 {
77 if (!UpdateVictim())
78 return;
79
80 events.Update(diff);
81
83 return;
84 /*
85 while (uint32 eventId = events.ExecuteEvent())
86 {
87 switch (eventId)
88 {
89 default:
90 break;
91 }
92 }
93 */
94 }
95 };
96
97 CreatureAI* GetAI(Creature* creature) const override
98 {
99 return GetZulGurubAI<boss_zanzilAI>(creature);
100 }
101};
102
104{
105 new boss_zanzil();
106}
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
Yells
@ SAY_DEATH
Definition: boss_zanzil.cpp:32
@ SAY_PLAYER_KILL
Definition: boss_zanzil.cpp:31
@ EMOTE_ZANZIL_GRAVEYARD_GAS
Definition: boss_zanzil.cpp:27
@ EMOTE_ZANZIL_ZOMBIES
Definition: boss_zanzil.cpp:25
@ SAY_AGGRO
Definition: boss_zanzil.cpp:24
@ SAY_ZANZIL_BERSEKER
Definition: boss_zanzil.cpp:30
@ SAY_ZANZIL_ZOMBIES
Definition: boss_zanzil.cpp:26
@ SAY_ZANZIL_GRAVEYARD_GAS
Definition: boss_zanzil.cpp:28
@ EMOTE_ZANZIL_BERSEKER
Definition: boss_zanzil.cpp:29
void AddSC_boss_zanzil()
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
Definition: boss_zanzil.cpp:97
boss_zanzilAI(Creature *creature)
Definition: boss_zanzil.cpp:50
void JustDied(Unit *) override
Definition: boss_zanzil.cpp:63
void KilledUnit(Unit *victim) override
Definition: boss_zanzil.cpp:69
void JustEngagedWith(Unit *who) override
Definition: boss_zanzil.cpp:57
void UpdateAI(uint32 diff) override
Definition: boss_zanzil.cpp:75
@ DATA_ZANZIL
Definition: zulgurub.h:33