TrinityCore
Loading...
Searching...
No Matches
boss_gahzranka.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 "zulgurub.h"
19#include "ScriptedCreature.h"
20#include "ScriptMgr.h"
21
23{
25 SPELL_MASSIVEGEYSER = 22421, // Not working. (summon)
26 SPELL_SLAM = 24326
27};
28
35
36struct boss_gahzranka : public BossAI
37{
38 boss_gahzranka(Creature* creature) : BossAI(creature, DATA_GAHZRANKA) { }
39
40 void Reset() override
41 {
42 _Reset();
43 }
44
45 void JustDied(Unit* /*killer*/) override
46 {
47 _JustDied();
48 }
49
57
58 void UpdateAI(uint32 diff) override
59 {
60 if (!UpdateVictim())
61 return;
62
63 events.Update(diff);
64
66 return;
67
68 while (uint32 eventId = events.ExecuteEvent())
69 {
70 switch (eventId)
71 {
75 break;
79 break;
80 case EVENT_SLAM:
83 break;
84 default:
85 break;
86 }
87
89 return;
90 }
91
93 }
94};
95
uint32_t uint32
Definition Define.h:133
Spells
Definition PlayerAI.cpp:32
@ UNIT_STATE_CASTING
Definition Unit.h:235
@ SPELL_MASSIVEGEYSER
@ SPELL_FROSTBREATH
@ SPELL_SLAM
void AddSC_boss_gahzranka()
@ EVENT_MASSIVEGEYSER
@ EVENT_SLAM
@ EVENT_FROSTBREATH
void JustEngagedWith(Unit *who) override
EventMap events
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
void Update(uint32 time)
Definition EventMap.h:67
EventId ExecuteEvent()
Definition EventMap.cpp:73
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:166
Definition Unit.h:769
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void JustDied(Unit *) override
boss_gahzranka(Creature *creature)
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
void Reset() override
#define RegisterZulGurubCreatureAI(ai_name)
Definition zulgurub.h:91
@ DATA_GAHZRANKA
Definition zulgurub.h:38