TrinityCore
boss_captain_skarloc.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_Captain_Skarloc
20SD%Complete: 75
21SDComment: Missing adds, missing waypoints to move up to Thrall once spawned + speech before enter combat.
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_captain_skarloc #
32#######################*/
33
35{
41
47 SPELL_CONSECRATION = 38385
48};
49
51{
53 {
54 Initialize();
55 }
56
58 {
59 Holy_Light_Timer = urand(20000, 30000);
60 Cleanse_Timer = 10000;
61 HammerOfJustice_Timer = urand(20000, 35000);
62 HolyShield_Timer = 240000;
63 DevotionAura_Timer = 3000;
64 Consecration_Timer = 8000;
65 }
66
73
74 void Reset() override
75 {
77 Initialize();
78 }
79
80 void JustEngagedWith(Unit* who) override
81 {
83 //This is not correct. Should taunt Thrall before engage in combat
86 }
87
88 void KilledUnit(Unit* /*victim*/) override
89 {
91 }
92
93 void JustDied(Unit* killer) override
94 {
95 BossAI::JustDied(killer);
97
99 }
100
101 void UpdateAI(uint32 diff) override
102 {
103 //Return since we have no target
104 if (!UpdateVictim())
105 return;
106
107 //Holy_Light
108 if (Holy_Light_Timer <= diff)
109 {
111 Holy_Light_Timer = 30000;
112 } else Holy_Light_Timer -= diff;
113
114 //Cleanse
115 if (Cleanse_Timer <= diff)
116 {
118 Cleanse_Timer = 10000;
119 } else Cleanse_Timer -= diff;
120
121 //Hammer of Justice
122 if (HammerOfJustice_Timer <= diff)
123 {
125 HammerOfJustice_Timer = 60000;
126 } else HammerOfJustice_Timer -= diff;
127
128 //Holy Shield
129 if (HolyShield_Timer <= diff)
130 {
132 HolyShield_Timer = 240000;
133 } else HolyShield_Timer -= diff;
134
135 //Devotion_Aura
136 if (DevotionAura_Timer <= diff)
137 {
139 DevotionAura_Timer = urand(45000, 55000);
140 } else DevotionAura_Timer -= diff;
141
142 //Consecration
143 if (Consecration_Timer <= diff)
144 {
145 //DoCastVictim(SPELL_CONSECRATION);
146 Consecration_Timer = urand(5000, 10000);
147 } else Consecration_Timer -= diff;
148 }
149};
150
152{
154}
uint32_t uint32
Definition: Define.h:142
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
@ SPELL_HAMMER_OF_JUSTICE
@ SPELL_CLEANSE
@ SPELL_CONSECRATION
@ SPELL_DEVOTION_AURA
@ SPELL_HOLY_SHIELD
@ SPELL_HOLY_LIGHT
void AddSC_boss_captain_skarloc()
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void JustDied(Unit *) override
void Reset() override
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:92
@ OH_ESCORT_HORSE_RIDE
Definition: old_hillsbrad.h:49
#define RegisterOldHillsbradCreatureAI(ai_name)
Definition: old_hillsbrad.h:63
@ DATA_CAPTAIN_SKARLOC
Definition: old_hillsbrad.h:31
@ TYPE_THRALL_EVENT
Definition: old_hillsbrad.h:35
void JustEngagedWith(Unit *who) override
boss_captain_skarloc(Creature *creature)
void KilledUnit(Unit *) override
void JustDied(Unit *killer) override
void UpdateAI(uint32 diff) override