Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_grimlok.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_Grimlok
8SD%Complete: 100
9SDComment:
10SDCategory: Uldaman
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15
25
27{
28public:
29 boss_grimlok() : CreatureScript("boss_grimlok") { }
30
31 struct boss_grimlokAI : public ScriptedAI
32 {
33 boss_grimlokAI(Creature* creature) : ScriptedAI(creature) { }
34
39
41 {
43 uiChainBoltTimer = 8000;
44 uiShrinkTimer = 28000;
45 uiBloodlustTimer = 25000;
46 }
47
48 void EnterCombat(Unit* /*who*/) OVERRIDE
49 {
51 }
52
53 void KilledUnit(Unit* /*victim*/) OVERRIDE
54 {
56 }
57
59 {
60 //Return since we have no target
61 if (!UpdateVictim())
62 return;
63
64 //uiLightningBoltTimer
65 if (uiLightningBoltTimer <= uiDiff)
66 {
69 } else uiLightningBoltTimer -= uiDiff;
70
71 //uiChainBoltTimer
72 if (uiChainBoltTimer <= uiDiff)
73 {
75 uiChainBoltTimer = 9000;
76 }
77 else uiChainBoltTimer -= uiDiff;
78
79 //uiBloodlustTimer
80 if (uiBloodlustTimer <= uiDiff)
81 {
83 uiBloodlustTimer = 25000;
84 }
85 else uiBloodlustTimer -= uiDiff;
86
87 //uiShrinkTimer
88 if (uiShrinkTimer <= uiDiff)
89 {
91 uiShrinkTimer = 28000;
92 }
93 else uiShrinkTimer -= uiDiff;
94
96 }
97 };
98
100 {
101 return new boss_grimlokAI(creature);
102 }
103};
104
106{
107 new boss_grimlok();
108}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
#define SAY_AGGRO
#define SAY_KILL
Grimlok
@ SPELL_SHRINK
@ SPELL_BLOODLUST
@ SAY_AGGRO
@ SAY_KILL
@ SPELL_LIGHTNING_BOLT
@ SPELL_CHAIN_BOLT
void AddSC_boss_grimlok()
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
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================
void KilledUnit(Unit *) OVERRIDE
void EnterCombat(Unit *) OVERRIDE
boss_grimlokAI(Creature *creature)