TrinityCore
Loading...
Searching...
No Matches
boss_epoch_hunter.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/* ScriptData
19SDName: Boss_Epoch_Hunter
20SD%Complete: 60
21SDComment: Missing spawns pre-event, missing speech to be coordinated with rest of escort event.
22SDCategory: Caverns of Time, Old Hillsbrad Foothills
23EndScriptData */
24
25#include "ScriptMgr.h"
26#include "InstanceScript.h"
27#include "old_hillsbrad.h"
28#include "ScriptedCreature.h"
29
30/*###################
31# boss_epoch_hunter #
32####################*/
33
47
49{
51 {
52 Initialize();
53 }
54
56 {
57 SandBreath_Timer = urand(8000, 16000);
58 ImpendingDeath_Timer = urand(25000, 30000);
59 WingBuffet_Timer = 35000;
60 Mda_Timer = 40000;
61 }
62
67
68 void Reset() override
69 {
71 Initialize();
72 }
73
74 void JustEngagedWith(Unit* who) override
75 {
78 }
79
80 void KilledUnit(Unit* /*victim*/) override
81 {
83 }
84
85 void JustDied(Unit* killer) override
86 {
87 BossAI::JustDied(killer);
89
91 }
92
93 void UpdateAI(uint32 diff) override
94 {
95 //Return since we have no target
96 if (!UpdateVictim())
97 return;
98
99 //Sand Breath
100 if (SandBreath_Timer <= diff)
101 {
102 if (me->IsNonMeleeSpellCast(false))
104
106
108
109 SandBreath_Timer = urand(10000, 20000);
110 } else SandBreath_Timer -= diff;
111
112 if (ImpendingDeath_Timer <= diff)
113 {
115 ImpendingDeath_Timer = 25000 + rand32() % 5000;
116 } else ImpendingDeath_Timer -= diff;
117
118 if (WingBuffet_Timer <= diff)
119 {
121 DoCast(target, SPELL_WING_BUFFET);
122 WingBuffet_Timer = 25000 + rand32() % 10000;
123 } else WingBuffet_Timer -= diff;
124
125 if (Mda_Timer <= diff)
126 {
128 Mda_Timer = 15000;
129 } else Mda_Timer -= diff;
130 }
131};
132
uint32_t uint32
Definition Define.h:154
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
uint32 rand32()
Definition Random.cpp:70
@ SAY_DEATH
@ SPELL_SAND_BREATH
@ SPELL_WING_BUFFET
@ SAY_AGGRO
@ SPELL_MAGIC_DISRUPTION_AURA
@ SAY_ENTER
@ SAY_BREATH
@ SPELL_IMPENDING_DEATH
void AddSC_boss_epoch_hunter()
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void JustDied(Unit *) override
void Reset() override
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:180
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:79
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition Unit.cpp:3231
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition Unit.cpp:3201
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:100
@ OH_ESCORT_FINISHED
#define RegisterOldHillsbradCreatureAI(ai_name)
@ DATA_EPOCH_HUNTER
@ TYPE_THRALL_EVENT
void JustEngagedWith(Unit *who) override
void JustDied(Unit *killer) override
void Reset() override
boss_epoch_hunter(Creature *creature)
void UpdateAI(uint32 diff) override
void KilledUnit(Unit *) override