-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstance_blackrock_spire.cpp
715 lines (656 loc) · 25.5 KB
/
instance_blackrock_spire.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#include "ObjectMgr.h"
#include "ScriptMgr.h"
#include "ObjectDefines.h"
#include "Cell.h"
#include "CellImpl.h"
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "InstanceScript.h"
#include "ScriptedCreature.h"
#include "blackrock_spire.h"
//uint32 const DragonspireRunes[7] = { GO_HALL_RUNE_1, GO_HALL_RUNE_2, GO_HALL_RUNE_3, GO_HALL_RUNE_4, GO_HALL_RUNE_5, GO_HALL_RUNE_6, GO_HALL_RUNE_7 };
uint32 const DragonspireMobs[3] = { NPC_BLACKHAND_DREADWEAVER, NPC_BLACKHAND_SUMMONER, NPC_BLACKHAND_VETERAN };
enum EventIds
{
EVENT_DARGONSPIRE_ROOM_STORE = 1,
EVENT_DARGONSPIRE_ROOM_CHECK = 2,
EVENT_UROK_DOOMHOWL_SPAWNS_1 = 3,
EVENT_UROK_DOOMHOWL_SPAWNS_2 = 4,
EVENT_UROK_DOOMHOWL_SPAWNS_3 = 5,
EVENT_UROK_DOOMHOWL_SPAWNS_4 = 6,
EVENT_UROK_DOOMHOWL_SPAWNS_5 = 7,
EVENT_UROK_DOOMHOWL_SPAWN_IN = 8
};
struct AddSpawns
{
uint32 WaveNumber;
uint32 GUID;
uint32 killed; //boolean
};
AddSpawns RendSpawns[] =
{
{ 1,0,0 }, //100
{ 1,0,0 },
{ 1,0,0 },
{ 1,0,0 },
{ 2,0,0 }, //104
{ 2,0,0 },
{ 2,0,0 },
{ 3,0,0 }, //107
{ 3,0,0 },
{ 3,0,0 },
{ 3,0,0 },
{ 4,0,0 }, //111
{ 4,0,0 },
{ 4,0,0 },
{ 4,0,0 },
{ 5,0,0 }, //115
{ 5,0,0 },
{ 5,0,0 },
{ 5,0,0 },
{ 5,0,0 },
{ 6,0,0 }, //120
{ 6,0,0 },
{ 6,0,0 },
{ 6,0,0 },
{ 6,0,0 }
};
class instance_blackrock_spire : public InstanceMapScript
{
public:
instance_blackrock_spire() : InstanceMapScript(BRSScriptName, 229) { }
struct instance_blackrock_spireMapScript : public InstanceScript
{
instance_blackrock_spireMapScript(InstanceMap* map) : InstanceScript(map)
{
SetBossNumber(EncounterCount);
HighlordOmokk = 0;
ShadowHunterVoshgajin = 0;
WarMasterVoone = 0;
MotherSmolderweb = 0;
UrokDoomhowl = 0;
QuartermasterZigris = 0;
GizrultheSlavener = 0;
Halycon = 0;
OverlordWyrmthalak = 0;
PyroguardEmberseer = 0;
WarchiefRendBlackhand = 0;
Gyth = 0;
LordVictorNefarius = 0;
TheBeast = 0;
GeneralDrakkisath = 0;
go_emberseerin = 0;
go_doors = 0;
go_emberseerout = 0;
go_blackrockaltar = 0;
go_portcullis_active = 0;
go_portcullis_tobossrooms = 0;
go_urok_pile = 0;
Wave1Index = 0;
memset(go_roomrunes, 0, sizeof(go_roomrunes));
memset(go_emberseerrunes, 0, sizeof(go_emberseerrunes));
}
void CreatureLooted(Creature* creature, LootType loot)
{
switch (creature->GetEntry())
{
case NPC_THE_BEAST:
if (loot == LOOT_SKINNING)
{
creature->CastSpell(creature, SPELL_FINKLE_IS_EINHORN, true);
}
break;
}
}
void OnCreatureCreate(Creature* creature)
{
switch (creature->GetEntry())
{
case NPC_HIGHLORD_OMOKK:
HighlordOmokk = creature->GetGUID();
break;
case NPC_SHADOW_HUNTER_VOSHGAJIN:
ShadowHunterVoshgajin = creature->GetGUID();
break;
case NPC_WARMASTER_VOONE:
WarMasterVoone = creature->GetGUID();
break;
case NPC_MOTHER_SMOLDERWEB:
MotherSmolderweb = creature->GetGUID();
break;
case NPC_UROK_DOOMHOWL:
UrokDoomhowl = creature->GetGUID();
break;
case NPC_QUARTERMASTER_ZIGRIS:
QuartermasterZigris = creature->GetGUID();
break;
case NPC_GIZRUL_THE_SLAVENER:
GizrultheSlavener = creature->GetGUID();
break;
case NPC_HALYCON:
Halycon = creature->GetGUID();
break;
case NPC_OVERLORD_WYRMTHALAK:
OverlordWyrmthalak = creature->GetGUID();
break;
case NPC_PYROGAURD_EMBERSEER:
PyroguardEmberseer = creature->GetGUID();
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
creature->DisappearAndDie();
break;
case NPC_WARCHIEF_REND_BLACKHAND:
WarchiefRendBlackhand = creature->GetGUID();
if (GetBossState(DATA_GYTH) == DONE)
creature->DisappearAndDie();
break;
case NPC_GYTH:
Gyth = creature->GetGUID();
break;
case NPC_THE_BEAST:
TheBeast = creature->GetGUID();
break;
case NPC_GENERAL_DRAKKISATH:
GeneralDrakkisath = creature->GetGUID();
break;
case NPC_LORD_VICTOR_NEFARIUS:
LordVictorNefarius = creature->GetGUID();
if (GetBossState(DATA_GYTH) == DONE)
creature->DisappearAndDie();
break;
//Add the wave1 add GUIDs to an array so we can move them later
case 10442: //NPC_CHROMATIC_WHELP
if (Wave1Index < 4)
{
RendSpawns[Wave1Index].GUID = creature->GetGUID();
Wave1Index += 1;
}
break;
case 10447: //NPC_CHROMATIC_DRAGONSPAWN
if (Wave1Index < 4)
{
RendSpawns[Wave1Index].GUID = creature->GetGUID();
Wave1Index += 1;
}
break;
}
}
void OnGameObjectCreate(GameObject* go)
{
switch (go->GetEntry())
{
case GO_WHELP_SPAWNER:
go->CastSpell(NULL, SPELL_SUMMON_ROOKERY_WHELP);
break;
case GO_EMBERSEER_IN:
go_emberseerin = go->GetGUID();
if (GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE)
HandleGameObject(0, true, go);
break;
case GO_DOORS:
go_doors = go->GetGUID();
if (GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE)
HandleGameObject(0, true, go);
break;
case GO_EMBERSEER_OUT:
go_emberseerout = go->GetGUID();
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
HandleGameObject(0, true, go);
break;
case GO_HALL_RUNE_1:
go_roomrunes[0] = go->GetGUID();
if (GetBossState(DATA_HALL_RUNE_1) == DONE)
HandleGameObject(0, false, go);
break;
case GO_HALL_RUNE_2:
go_roomrunes[1] = go->GetGUID();
if (GetBossState(DATA_HALL_RUNE_2) == DONE)
HandleGameObject(0, false, go);
break;
case GO_HALL_RUNE_3:
go_roomrunes[2] = go->GetGUID();
if (GetBossState(DATA_HALL_RUNE_3) == DONE)
HandleGameObject(0, false, go);
break;
case GO_HALL_RUNE_4:
go_roomrunes[3] = go->GetGUID();
if (GetBossState(DATA_HALL_RUNE_4) == DONE)
HandleGameObject(0, false, go);
break;
case GO_HALL_RUNE_5:
go_roomrunes[4] = go->GetGUID();
if (GetBossState(DATA_HALL_RUNE_5) == DONE)
HandleGameObject(0, false, go);
break;
case GO_HALL_RUNE_6:
go_roomrunes[5] = go->GetGUID();
if (GetBossState(DATA_HALL_RUNE_6) == DONE)
HandleGameObject(0, false, go);
break;
case GO_HALL_RUNE_7:
go_roomrunes[6] = go->GetGUID();
if (GetBossState(DATA_HALL_RUNE_7) == DONE)
HandleGameObject(0, false, go);
break;
case GO_EMBERSEER_RUNE_1:
go_emberseerrunes[0] = go->GetGUID();
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
HandleGameObject(0, false, go);
break;
case GO_EMBERSEER_RUNE_2:
go_emberseerrunes[1] = go->GetGUID();
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
HandleGameObject(0, false, go);
break;
case GO_EMBERSEER_RUNE_3:
go_emberseerrunes[2] = go->GetGUID();
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
HandleGameObject(0, false, go);
break;
case GO_EMBERSEER_RUNE_4:
go_emberseerrunes[3] = go->GetGUID();
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
HandleGameObject(0, false, go);
break;
case GO_EMBERSEER_RUNE_5:
go_emberseerrunes[4] = go->GetGUID();
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
HandleGameObject(0, false, go);
break;
case GO_EMBERSEER_RUNE_6:
go_emberseerrunes[5] = go->GetGUID();
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
HandleGameObject(0, false, go);
break;
case GO_EMBERSEER_RUNE_7:
go_emberseerrunes[6] = go->GetGUID();
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
HandleGameObject(0, false, go);
break;
case GO_PORTCULLIS_ACTIVE:
go_portcullis_active = go->GetGUID();
if (GetBossState(DATA_GYTH) == DONE)
HandleGameObject(0, true, go);
break;
case GO_PORTCULLIS_TOBOSSROOMS:
go_portcullis_tobossrooms = go->GetGUID();
if (GetBossState(DATA_GYTH) == DONE)
HandleGameObject(0, true, go);
break;
case GO_UROK_PILE:
go_urok_pile = go->GetGUID();
break;
default:
break;
}
}
bool SetBossState(uint32 type, EncounterState state)
{
if (!InstanceScript::SetBossState(type, state))
return false;
switch (type)
{
case DATA_HIGHLORD_OMOKK:
case DATA_SHADOW_HUNTER_VOSHGAJIN:
case DATA_WARMASTER_VOONE:
case DATA_MOTHER_SMOLDERWEB:
case DATA_UROK_DOOMHOWL:
case DATA_QUARTERMASTER_ZIGRIS:
case DATA_GIZRUL_THE_SLAVENER:
case DATA_HALYCON:
case DATA_OVERLORD_WYRMTHALAK:
case DATA_PYROGAURD_EMBERSEER:
case DATA_WARCHIEF_REND_BLACKHAND:
case DATA_GYTH:
case DATA_THE_BEAST:
case DATA_GENERAL_DRAKKISATH:
case DATA_DRAGONSPIRE_ROOM:
break;
default:
break;
}
return true;
}
void ProcessEvent(WorldObject* /*obj*/, uint32 eventId)
{
switch (eventId)
{
case EVENT_PYROGUARD_EMBERSEER:
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == NOT_STARTED)
{
if (Creature* Emberseer = instance->GetCreature(PyroguardEmberseer))
Emberseer->AI()->SetData(1, 1);
}
break;
case EVENT_UROK_DOOMHOWL:
if (GetBossState(DATA_UROK_DOOMHOWL) == NOT_STARTED)
{
if (GameObject* pile = instance->GetGameObject(go_urok_pile))
pile->SetLootState(GO_JUST_DEACTIVATED);
}
break;
default:
break;
}
}
void SetData(uint32 type, uint32 data)
{
switch (type)
{
case AREATRIGGER:
if (data == AREATRIGGER_DRAGONSPIRE_HALL)
{
if (GetBossState(DATA_DRAGONSPIRE_ROOM) != DONE)
Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_STORE, 1000);
}
default:
break;
}
}
uint64 GetData64(uint32 type) const
{
//Add Helper - Everything is stored in RendSpawns and is accessed by using getData from 100 to 125
if (type >= 100 && type < 125) {
// Rend Event Wave 1 Add Helpers (return GUID of wave1)
return RendSpawns[(type - 100)].GUID;
}
switch (type)
{
case DATA_HIGHLORD_OMOKK:
return HighlordOmokk;
case DATA_SHADOW_HUNTER_VOSHGAJIN:
return ShadowHunterVoshgajin;
case DATA_WARMASTER_VOONE:
return WarMasterVoone;
case DATA_MOTHER_SMOLDERWEB:
return MotherSmolderweb;
case DATA_UROK_DOOMHOWL:
return UrokDoomhowl;
case DATA_QUARTERMASTER_ZIGRIS:
return QuartermasterZigris;
case DATA_GIZRUL_THE_SLAVENER:
return GizrultheSlavener;
case DATA_HALYCON:
return Halycon;
case DATA_OVERLORD_WYRMTHALAK:
return OverlordWyrmthalak;
case DATA_PYROGAURD_EMBERSEER:
return PyroguardEmberseer;
case DATA_WARCHIEF_REND_BLACKHAND:
return WarchiefRendBlackhand;
case DATA_GYTH:
return Gyth;
case DATA_THE_BEAST:
return TheBeast;
case DATA_GENERAL_DRAKKISATH:
return GeneralDrakkisath;
case GO_EMBERSEER_IN:
return go_emberseerin;
case GO_DOORS:
return go_doors;
case GO_EMBERSEER_OUT:
return go_emberseerout;
case GO_HALL_RUNE_1:
return go_roomrunes[0];
case GO_HALL_RUNE_2:
return go_roomrunes[1];
case GO_HALL_RUNE_3:
return go_roomrunes[2];
case GO_HALL_RUNE_4:
return go_roomrunes[3];
case GO_HALL_RUNE_5:
return go_roomrunes[4];
case GO_HALL_RUNE_6:
return go_roomrunes[5];
case GO_HALL_RUNE_7:
return go_roomrunes[6];
case GO_EMBERSEER_RUNE_1:
return go_emberseerrunes[0];
case GO_EMBERSEER_RUNE_2:
return go_emberseerrunes[1];
case GO_EMBERSEER_RUNE_3:
return go_emberseerrunes[2];
case GO_EMBERSEER_RUNE_4:
return go_emberseerrunes[3];
case GO_EMBERSEER_RUNE_5:
return go_emberseerrunes[4];
case GO_EMBERSEER_RUNE_6:
return go_emberseerrunes[5];
case GO_EMBERSEER_RUNE_7:
return go_emberseerrunes[6];
case GO_PORTCULLIS_ACTIVE:
return go_portcullis_active;
case GO_PORTCULLIS_TOBOSSROOMS:
return go_portcullis_tobossrooms;
default:
break;
}
return 0;
}
void Update(uint32 diff)
{
Events.Update(diff);
while (uint32 eventId = Events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_DARGONSPIRE_ROOM_STORE:
Dragonspireroomstore();
Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_CHECK, 3000);
break;
case EVENT_DARGONSPIRE_ROOM_CHECK:
Dragonspireroomcheck();
if ((GetBossState(DATA_DRAGONSPIRE_ROOM) != DONE))
Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_CHECK, 3000);
break;
default:
break;
}
}
}
void Dragonspireroomstore()
{
uint8 creatureCount;
for (uint8 i = 0; i < 7; ++i)
{
creatureCount = 0;
if (GameObject* rune = instance->GetGameObject(go_roomrunes[i]))
{
for (uint8 j = 0; j < 3; ++j)
{
std::list<Creature*> creatureList;
GetCreatureListWithEntryInGrid(creatureList, rune, DragonspireMobs[j], 15.0f);
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
{
if (Creature* creature = *itr)
{
runecreaturelist[i][creatureCount] = creature->GetGUID();
++creatureCount;
}
}
}
}
}
}
void Dragonspireroomcheck()
{
Creature* mob = NULL;
GameObject* rune = NULL;
for (uint8 i = 0; i < 7; ++i)
{
bool _mobAlive = false;
rune = instance->GetGameObject(go_roomrunes[i]);
if (!rune)
continue;
if (rune->GetGoState() == GO_STATE_ACTIVE)
{
for (uint8 ii = 0; ii < 5; ++ii)
{
mob = instance->GetCreature(runecreaturelist[i][ii]);
if (mob && mob->IsAlive())
_mobAlive = true;
}
}
if (!_mobAlive && rune->GetGoState() == GO_STATE_ACTIVE)
{
HandleGameObject(0, false, rune);
switch (rune->GetEntry())
{
case GO_HALL_RUNE_1:
SetBossState(DATA_HALL_RUNE_1, DONE);
break;
case GO_HALL_RUNE_2:
SetBossState(DATA_HALL_RUNE_2, DONE);
break;
case GO_HALL_RUNE_3:
SetBossState(DATA_HALL_RUNE_3, DONE);
break;
case GO_HALL_RUNE_4:
SetBossState(DATA_HALL_RUNE_4, DONE);
break;
case GO_HALL_RUNE_5:
SetBossState(DATA_HALL_RUNE_5, DONE);
break;
case GO_HALL_RUNE_6:
SetBossState(DATA_HALL_RUNE_6, DONE);
break;
case GO_HALL_RUNE_7:
SetBossState(DATA_HALL_RUNE_7, DONE);
break;
default:
break;
}
}
}
if (GetBossState(DATA_HALL_RUNE_1) == DONE && GetBossState(DATA_HALL_RUNE_2) == DONE && GetBossState(DATA_HALL_RUNE_3) == DONE &&
GetBossState(DATA_HALL_RUNE_4) == DONE && GetBossState(DATA_HALL_RUNE_5) == DONE && GetBossState(DATA_HALL_RUNE_6) == DONE &&
GetBossState(DATA_HALL_RUNE_7) == DONE)
{
SetBossState(DATA_DRAGONSPIRE_ROOM, DONE);
if (GameObject* door1 = instance->GetGameObject(go_emberseerin))
HandleGameObject(0, true, door1);
if (GameObject* door2 = instance->GetGameObject(go_doors))
HandleGameObject(0, true, door2);
}
}
std::string GetSaveData()
{
OUT_SAVE_INST_DATA;
std::ostringstream saveStream;
saveStream << "B S " << GetBossSaveData();
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
}
void Load(const char* strIn)
{
if (!strIn)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(strIn);
char dataHead1, dataHead2;
std::istringstream loadStream(strIn);
loadStream >> dataHead1 >> dataHead2;
if (dataHead1 == 'B' && dataHead2 == 'S')
{
for (uint8 i = 0; i < EncounterCount; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
SetBossState(i, EncounterState(tmpState));
}
}
else
OUT_LOAD_INST_DATA_FAIL;
OUT_LOAD_INST_DATA_COMPLETE;
}
protected:
EventMap Events;
uint64 HighlordOmokk;
uint64 ShadowHunterVoshgajin;
uint64 WarMasterVoone;
uint64 MotherSmolderweb;
uint64 UrokDoomhowl;
uint64 QuartermasterZigris;
uint64 GizrultheSlavener;
uint64 Halycon;
uint64 OverlordWyrmthalak;
uint64 PyroguardEmberseer;
uint64 WarchiefRendBlackhand;
uint64 Gyth;
uint64 LordVictorNefarius;
uint64 TheBeast;
uint64 GeneralDrakkisath;
uint64 go_emberseerin;
uint64 go_doors;
uint64 go_emberseerout;
uint64 go_blackrockaltar;
uint64 go_roomrunes[7];
uint64 go_emberseerrunes[7];
uint64 runecreaturelist[7][5];
uint64 go_portcullis_active;
uint64 go_portcullis_tobossrooms;
uint64 go_urok_pile;
uint64 Wave1Index;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
{
return new instance_blackrock_spireMapScript(map);
}
};
/*#####
# at_dragonspire_hall
#####*/
class at_dragonspire_hall : public AreaTriggerScript
{
public:
at_dragonspire_hall() : AreaTriggerScript("at_dragonspire_hall") { }
bool OnTrigger(Player* player, const AreaTrigger* /*at*/)
{
if (player && player->IsAlive())
{
if (InstanceScript* instance = player->GetInstanceScript())
{
instance->SetData(AREATRIGGER, AREATRIGGER_DRAGONSPIRE_HALL);
return true;
}
}
return false;
}
};
/*#####
# at_blackrock_stadium
#####*/
class at_blackrock_stadium : public AreaTriggerScript
{
public:
at_blackrock_stadium() : AreaTriggerScript("at_blackrock_stadium") { }
bool OnTrigger(Player* player, const AreaTrigger* /*at*/)
{
if (player && player->IsAlive())
{
InstanceScript* instance = player->GetInstanceScript();
if (!instance)
return false;
if (Creature* rend = player->FindNearestCreature(NPC_WARCHIEF_REND_BLACKHAND, 50.0f))
{
rend->AI()->SetData(AREATRIGGER, AREATRIGGER_BLACKROCK_STADIUM);
return true;
}
}
return false;
}
};
void AddSC_instance_blackrock_spire()
{
new instance_blackrock_spire();
new at_dragonspire_hall();
new at_blackrock_stadium();
}