Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_gelihast.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#include "ScriptMgr.h"
7#include "ScriptedCreature.h"
8#include "blackfathom_deeps.h"
9
11{
12 SPELL_NET = 6533
13};
14
16{
17public:
18 boss_gelihast() : CreatureScript("boss_gelihast") { }
19
21 {
22 return new boss_gelihastAI(creature);
23 }
24
26 {
27 boss_gelihastAI(Creature* creature) : ScriptedAI(creature)
28 {
29 instance = creature->GetInstanceScript();
30 }
31
33
35
37 {
38 netTimer = std::rand() % 4000 + 2000;
39 if (instance)
41 }
42
43 void EnterCombat(Unit* /*who*/) OVERRIDE
44 {
45 if (instance)
47 }
48
49 void JustDied(Unit* /*killer*/) OVERRIDE
50 {
51 if (instance)
52 instance->SetData(TYPE_GELIHAST, DONE);
53 }
54
56 {
57 if (!UpdateVictim())
58 return;
59
60 if (netTimer < diff)
61 {
63 netTimer = std::rand() % 7000 + 4000;
64 } else netTimer -= diff;
65
67 }
68 };
69};
70
72{
73 new boss_gelihast();
74}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ IN_PROGRESS
@ DONE
@ NOT_STARTED
@ TYPE_GELIHAST
@ SPELL_NET
void AddSC_boss_gelihast()
bool UpdateVictim()
CreatureScript(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
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
ScriptedAI(Creature *creature)
boss_gelihastAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void EnterCombat(Unit *) OVERRIDE
void JustDied(Unit *) OVERRIDE