Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_epoch_hunter.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6/* ScriptData
7SDName: Boss_Epoch_Hunter
8SD%Complete: 60
9SDComment: Missing spawns pre-event, missing speech to be coordinated with rest of escort event.
10SDCategory: Caverns of Time, Old Hillsbrad Foothills
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15#include "old_hillsbrad.h"
16
17/*###################
18# boss_epoch_hunter #
19####################*/
20
34
36{
37public:
38 boss_epoch_hunter() : CreatureScript("boss_epoch_hunter") { }
39
41 {
42 return new boss_epoch_hunterAI(creature);
43 }
44
46 {
48 {
49 instance = creature->GetInstanceScript();
50 }
51
53
58
60 {
61 SandBreath_Timer = std::rand() % 16000 + 8000;
62 ImpendingDeath_Timer = std::rand() % 30000 + 25000;
63 WingBuffet_Timer = 35000;
64 Mda_Timer = 40000;
65 }
66
67 void EnterCombat(Unit* /*who*/) OVERRIDE
68 {
70 }
71
72 void KilledUnit(Unit* /*victim*/) OVERRIDE
73 {
75 }
76
77 void JustDied(Unit* /*killer*/) OVERRIDE
78 {
80
83 }
84
86 {
87 //Return since we have no target
88 if (!UpdateVictim())
89 return;
90
91 //Sand Breath
92 if (SandBreath_Timer <= diff)
93 {
94 if (me->IsNonMeleeSpellCasted(false))
95 me->InterruptNonMeleeSpells(false);
96
98
100
101 SandBreath_Timer = std::rand() % 20000 + 10000;
102 } else SandBreath_Timer -= diff;
103
104 if (ImpendingDeath_Timer <= diff)
105 {
107 ImpendingDeath_Timer = 25000+rand()%5000;
108 } else ImpendingDeath_Timer -= diff;
109
110 if (WingBuffet_Timer <= diff)
111 {
112 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
113 DoCast(target, SPELL_WING_BUFFET);
114 WingBuffet_Timer = 25000+rand()%10000;
115 } else WingBuffet_Timer -= diff;
116
117 if (Mda_Timer <= diff)
118 {
120 Mda_Timer = 15000;
121 } else Mda_Timer -= diff;
122
124 }
125 };
126};
127
129{
130 new boss_epoch_hunter();
131}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ IN_PROGRESS
@ DONE
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
@ SAY_SLAY
#define SAY_DEATH
#define SAY_AGGRO
@ SAY_DEATH
@ SPELL_SAND_BREATH
@ SPELL_WING_BUFFET
@ SAY_AGGRO
@ SPELL_MAGIC_DISRUPTION_AURA
@ SAY_BREATH
@ SPELL_IMPENDING_DEATH
void AddSC_boss_epoch_hunter()
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
CreatureScript(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition UnitAI.cpp:66
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
Definition Unit.h:1367
InstanceScript * GetInstanceScript()
Definition Object.cpp:1612
CreatureAI * GetAI(Creature *creature) const OVERRIDE
@ TYPE_THRALL_PART4
@ TYPE_THRALL_EVENT
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================