Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_nethekurse.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_Grand_Warlock_Nethekurse
8SD%Complete: 75
9SDComment: encounter not fully completed. missing part where boss kill minions.
10SDCategory: Hellfire Citadel, Shattered Halls
11EndScriptData */
12
13/* ContentData
14boss_grand_warlock_nethekurse
15npc_fel_orc_convert
16npc_lesser_shadow_fissure
17EndContentData */
18
19#include "ScriptMgr.h"
20#include "ScriptedCreature.h"
21#include "shattered_halls.h"
22
33
35{
36 SPELL_DEATH_COIL = 30500, // 30741 heroic
37 SPELL_DARK_SPIN = 30502, // core bug spell attack caster :D
38 SPELL_SHADOW_FISSURE = 30496, // Summon the ShadowFissure NPC
43 SPELL_TEMPORARY_VISUAL = 39312, // this is wrong, a temporary solution. spell consumption already has the purple visual, but doesn't display as it should
44
45 SPELL_SHADOW_SEAR = 30735 // cast on entry 17083 which then makes sound 1343
46 // 30948 cast on self by 17687
47};
48
55
57{
58 // Fel Orc Convert
60};
61
62// ########################################################
63// Grand Warlock Nethekurse
64// ########################################################
65
67{
68 public:
69 boss_grand_warlock_nethekurse() : CreatureScript("boss_grand_warlock_nethekurse") { }
70
72 {
74
76 {
78
79 IsIntroEvent = false;
80 IntroOnce = false;
81 IsMainEvent = false;
82 //HasTaunted = false;
83 SpinOnce = false;
84 Phase = false;
85
88
89 IntroEvent_Timer = 90000; // how long before getting bored and kills his minions?
90 DeathCoil_Timer = 20000;
92 Cleave_Timer = 5000;
93 }
94
95 void JustDied(Unit* /*killer*/) OVERRIDE
96 {
98
99 if (instance)
100 instance->SetBossState(DATA_NETHEKURSE, DONE);
101 }
102
103 void SetData(uint32 data, uint32 value) OVERRIDE
104 {
105 if (data != SETDATA_DATA)
106 return;
107
108 switch (value)
109 {
111 if (PeonEngagedCount >= 4)
112 return;
113
116 break;
118 if (PeonKilledCount >= 4)
119 return;
120
123
124 if (PeonKilledCount == 4)
125 {
126 IsIntroEvent = false;
127 IsMainEvent = true;
129 }
130 break;
131 default:
132 break;
133 }
134 }
135
137 {
139
141 IsIntroEvent = false;
143 PeonKilledCount = 4;
144 IsMainEvent = true;
146 }
147
149 {
151 return;
152
153 if (me->Attack(who, true))
154 {
155 if (Phase)
157 else
158 DoStartMovement(who);
159 }
160 }
161
163 {
164 if (!IntroOnce && me->IsWithinDistInMap(who, 30.0f))
165 {
166 if (who->GetTypeId() != TypeID::TYPEID_PLAYER)
167 return;
168
170 IntroOnce = true;
171 IsIntroEvent = true;
172
173 if (instance)
174 instance->SetBossState(DATA_NETHEKURSE, IN_PROGRESS);
175 }
176
178 return;
179
181 }
182
183 void EnterCombat(Unit* /*who*/) OVERRIDE
184 {
186 }
187
189 {
190 summoned->setFaction(16);
191 summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
192 summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
193
194 //triggered spell of consumption does not properly show it's SpellVisual, wrong spellid?
195 summoned->CastSpell(summoned, SPELL_TEMPORARY_VISUAL, true);
196 summoned->CastSpell(summoned, SPELL_CONSUMPTION, false, 0, 0, me->GetGUID());
197 }
198
199 void KilledUnit(Unit* /*victim*/) OVERRIDE
200 {
201 Talk(SAY_SLAY);
202 }
203
205 {
206 if (IsIntroEvent)
207 {
208 if (!instance)
209 return;
210
211 if (instance->GetBossState(DATA_NETHEKURSE) == IN_PROGRESS)
212 {
213 if (IntroEvent_Timer <= diff)
214 DoTauntPeons();
215 else
216 IntroEvent_Timer -= diff;
217 }
218 }
219
220 if (!UpdateVictim())
221 return;
222
223 if (!IsMainEvent)
224 return;
225
226 if (Phase)
227 {
228 if (!SpinOnce)
229 {
231 SpinOnce = true;
232 }
233
234 if (Cleave_Timer <= diff)
235 {
237 Cleave_Timer = 6000+rand()%2500;
238 }
239 else
240 Cleave_Timer -= diff;
241 }
242 else
243 {
244 if (ShadowFissure_Timer <= diff)
245 {
246 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
248 ShadowFissure_Timer = std::rand() % 15000 + 7500;
249 }
250 else
251 ShadowFissure_Timer -= diff;
252
253 if (DeathCoil_Timer <= diff)
254 {
255 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
256 DoCast(target, SPELL_DEATH_COIL);
257 DeathCoil_Timer = std::rand() % 20000 + 15000;
258 }
259 else
260 DeathCoil_Timer -= diff;
261
262 if (!HealthAbovePct(20))
263 Phase = true;
264
266 }
267 }
268
269 private:
280 //bool HasTaunted;
281 bool Phase;
282 };
283
285 {
286 return new boss_grand_warlock_nethekurseAI(creature);
287 }
288};
289
290// ########################################################
291// Fel Orc Convert
292// ########################################################
293
295{
296 public:
297 npc_fel_orc_convert() : CreatureScript("npc_fel_orc_convert") { }
298
300 {
302 {
303 instance = creature->GetInstanceScript();
304 }
305
307 {
308 me->SetNoCallAssistance(true); //we don't want any assistance (WE R HEROZ!)
309 }
310
311 void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
312
313 void EnterCombat(Unit* /*who*/) OVERRIDE
314 {
315 events.ScheduleEvent(EVENT_HEMORRHAGE, 3000);
316
317 if (instance)
319 if (Kurse && me->IsWithinDist(Kurse, 45.0f))
320 Kurse->AI()->SetData(SETDATA_DATA, SETDATA_PEON_AGGRO);
321 }
322
323 void JustDied(Unit* /*killer*/) OVERRIDE
324 {
325 if (instance)
326 {
327 if (instance->GetBossState(DATA_NETHEKURSE) != IN_PROGRESS)
328 return;
329
331 Kurse->AI()->SetData(SETDATA_DATA, SETDATA_PEON_DEATH);
332 }
333 }
334
336 {
337 if (!UpdateVictim())
338 return;
339
340 events.Update(diff);
341
342 if (events.ExecuteEvent() == EVENT_HEMORRHAGE)
343 {
345 events.ScheduleEvent(EVENT_HEMORRHAGE, 15000);
346 }
347
349 }
350
351 private:
354 };
355
357 {
358 return new npc_fel_orc_convertAI(creature);
359 }
360};
361
362// ########################################################
363// Lesser Shadow Fissure
364// ########################################################
365
367{
368 public:
369 npc_lesser_shadow_fissure() : CreatureScript("npc_lesser_shadow_fissure") { }
370
372 {
374
375 void Reset() OVERRIDE { }
376 void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
377 void AttackStart(Unit* /*who*/) OVERRIDE { }
378 void EnterCombat(Unit* /*who*/) OVERRIDE { }
379 };
380
382 {
383 return new npc_lesser_shadow_fissureAI(creature);
384 }
385};
386
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ IN_PROGRESS
@ DONE
@ TYPEID_PLAYER
Definition Object.h:55
@ UNIT_FLAG_NON_ATTACKABLE
Definition Unit.h:626
@ UNIT_FLAG_NOT_SELECTABLE
Definition Unit.h:650
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
@ UNIT_FIELD_FLAGS
@ SAY_SLAY
@ SAY_INTRO
#define SAY_AGGRO
@ SPELL_SHADOW_CLEAVE
@ SAY_PEON_DIES
@ SAY_PEON_ATTACKED
@ SAY_AGGRO
@ SAY_SLAY
@ SAY_TAUNT
@ SAY_DIE
@ SAY_INTRO
@ SETDATA_DATA
@ SETDATA_PEON_DEATH
@ SETDATA_PEON_AGGRO
@ SPELL_SHADOW_FISSURE
@ SPELL_DEATH_COIL
@ SPELL_TEMPORARY_VISUAL
@ SPELL_SHADOW_SEAR
@ SPELL_CONSUMPTION
@ SPELL_HEMORRHAGE
@ SPELL_DARK_SPIN
@ H_SPELL_SHADOW_SLAM
@ SPELL_SHADOW_CLEAVE
void AddSC_boss_grand_warlock_nethekurse()
@ EVENT_HEMORRHAGE
@ SPELL_SHADOW_FISSURE
@ SPELL_DEATH_COIL
Definition chapter1.cpp:34
InstanceScript *const instance
BossAI(Creature *creature, uint32 bossId)
virtual void MoveInLineOfSight(Unit *)
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
static Creature * GetCreature(WorldObject &object, uint64 guid)
Definition Unit.cpp:4905
InstanceScript * GetInstanceScript()
Definition Object.cpp:1612
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
@ NPC_GRAND_WARLOCK_NETHEKURSE
@ DATA_NETHEKURSE
void DoStartNoMovement(Unit *target)
Creature * me
bool HealthAbovePct(uint32 pct) const
ScriptedAI(Creature *creature)
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================