Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_captain_skarloc.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_Captain_Skarloc
8SD%Complete: 75
9SDComment: Missing adds, missing waypoints to move up to Thrall once spawned + speech before enter combat.
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_captain_skarloc #
19#######################*/
20
36
38{
39public:
40 boss_captain_skarloc() : CreatureScript("boss_captain_skarloc") { }
41
43 {
44 return new boss_captain_skarlocAI(creature);
45 }
46
48 {
50 {
51 instance = creature->GetInstanceScript();
52 }
53
55
62
64 {
65 Holy_Light_Timer = std::rand() % 30000 + 20000;
66 Cleanse_Timer = 10000;
67 HammerOfJustice_Timer = std::rand() % 35000 + 20000;
68 HolyShield_Timer = 240000;
69 DevotionAura_Timer = 3000;
70 Consecration_Timer = 8000;
71 }
72
73 void EnterCombat(Unit* /*who*/) OVERRIDE
74 {
75 //This is not correct. Should taunt Thrall before engage in combat
78 }
79
80 void KilledUnit(Unit* /*victim*/) OVERRIDE
81 {
83 }
84
85 void JustDied(Unit* /*killer*/) OVERRIDE
86 {
88
91 }
92
94 {
95 //Return since we have no target
96 if (!UpdateVictim())
97 return;
98
99 //Holy_Light
100 if (Holy_Light_Timer <= diff)
101 {
103 Holy_Light_Timer = 30000;
104 } else Holy_Light_Timer -= diff;
105
106 //Cleanse
107 if (Cleanse_Timer <= diff)
108 {
110 Cleanse_Timer = 10000;
111 } else Cleanse_Timer -= diff;
112
113 //Hammer of Justice
114 if (HammerOfJustice_Timer <= diff)
115 {
117 HammerOfJustice_Timer = 60000;
118 } else HammerOfJustice_Timer -= diff;
119
120 //Holy Shield
121 if (HolyShield_Timer <= diff)
122 {
124 HolyShield_Timer = 240000;
125 } else HolyShield_Timer -= diff;
126
127 //Devotion_Aura
128 if (DevotionAura_Timer <= diff)
129 {
131 DevotionAura_Timer = std::rand() % 55000 + 45000;
132 } else DevotionAura_Timer -= diff;
133
134 //Consecration
135 if (Consecration_Timer <= diff)
136 {
137 //DoCastVictim(SPELL_CONSECRATION);
138 Consecration_Timer = std::rand() % 10000 + 5000;
139 } else Consecration_Timer -= diff;
140
142 }
143 };
144};
145
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ IN_PROGRESS
@ DONE
@ SAY_SLAY
@ SPELL_HAMMER_OF_JUSTICE
@ SPELL_CONSECRATION
@ SPELL_DEVOTION_AURA
@ SPELL_HOLY_SHIELD
@ SPELL_HOLY_LIGHT
void AddSC_boss_captain_skarloc()
#define SAY_DEATH
@ SPELL_CLEANSE
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
InstanceScript * GetInstanceScript()
Definition Object.cpp:1612
CreatureAI * GetAI(Creature *creature) const OVERRIDE
@ TYPE_THRALL_PART1
@ TYPE_THRALL_EVENT
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================