TrinityCore
instance_violet_hold.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#include "violet_hold.h"
19#include "Creature.h"
20#include "CreatureAI.h"
21#include "GameObject.h"
22#include "InstanceScript.h"
23#include "Map.h"
24#include "MotionMaster.h"
25#include "Player.h"
26#include "TaskScheduler.h"
27#include "ScriptMgr.h"
28#include "TemporarySummon.h"
29
30/*
31 * TODO:
32 * - replace bosses by dummy npcs also after grid unload
33 */
34
35Position const DefenseSystemLocation = { 1888.146f, 803.382f, 58.60389f, 3.071779f }; // sniff
36
37Position const CyanigosaSpawnLocation = { 1922.109f, 804.4493f, 52.49254f, 3.176499f }; // sniff
38Position const CyanigosaJumpLocation = { 1888.32f, 804.473f, 38.3578f, 0.0f }; // sniff
39
40Position const SaboteurSpawnLocation = { 1886.251f, 803.0743f, 38.42326f, 3.211406f }; // sniff
41
44{
45 { 1877.523f, 850.1788f, 45.36822f, 4.34587f }, // 0
46 { 1890.679f, 753.4202f, 48.771f, 1.675516f }, // 1
47 { 1936.09f, 803.1875f, 54.09715f, 3.054326f }, // 2
48 { 1858.243f, 770.2379f, 40.42146f, 0.9075712f }, // 3
49 { 1907.288f, 831.1111f, 40.22015f, 3.560472f } // 4
50};
51
54{
55 { 1911.281f, 800.9722f, 39.91673f, 3.01942f }, // 5
56 { 1926.516f, 763.6616f, 52.35725f, 2.251475f }, // 6
57 { 1922.464f, 847.0699f, 48.50161f, 3.961897f } // 7
58};
59
62{
63 { 1877.51f, 850.1042f, 44.65989f, 4.782202f }, // 0 - Intro
64 { 1890.637f, 753.4705f, 48.72239f, 1.710423f }, // 1 - Intro
65 { 1936.073f, 803.1979f, 53.37491f, 3.124139f }, // 2 - Intro
66 { 1886.545f, 803.2014f, 40.40931f, 3.159046f }, // 3 - Boss 1/2
67 { 1924.096f, 804.3707f, 54.29256f, 3.228859f } // 4 - Boss 3
68};
69
71
74{
75 { 1893.895f, 728.1261f, 47.75016f },
76 { 1892.997f, 738.4987f, 47.66684f },
77 { 1889.76f, 758.1089f, 47.66684f }
78};
79
82{
83 { 1871.456f, 871.0361f, 43.41524f },
84 { 1874.948f, 859.5452f, 43.33349f },
85 { 1877.245f, 851.967f, 43.3335f }
86};
87
90{
91 { 1853.752f, 862.4528f, 43.41614f },
92 { 1866.931f, 854.577f, 43.3335f },
93 { 1872.973f, 850.7875f, 43.3335f }
94};
95
98{
99 { 1892.418f, 872.2831f, 43.41563f },
100 { 1885.639f, 859.0245f, 43.3335f },
101 { 1882.432f, 852.2423f, 43.3335f }
102};
103
106{
107 { 1942.041f, 749.5228f, 30.95229f },
108 { 1930.571f, 762.9065f, 31.98814f },
109 { 1923.657f, 770.6718f, 34.07256f },
110 { 1910.631f, 784.4096f, 37.09015f },
111 { 1906.595f, 788.3828f, 37.99429f }
112};
113
116{
117 { 1844.557f, 748.7083f, 38.74205f },
118 { 1854.618f, 761.5295f, 38.65631f },
119 { 1862.17f, 773.2255f, 38.74879f }
120};
121
124{
125 { 1908.417f, 845.8502f, 38.71947f },
126 { 1905.557f, 841.3157f, 38.65529f },
127 { 1899.453f, 832.533f, 38.70752f }
128};
129
132{
133 { 1934.151f, 860.9463f, 47.29499f },
134 { 1927.085f, 852.1342f, 47.19214f },
135 { 1923.226f, 847.3297f, 47.15541f }
136};
137
139{
145
146 SOUND_MORAGG_SPAWN = 10112
148
150{
157
159{
169 { 0, 0 } // END
170};
171
173{
183 { 0, 0 } // END
184};
185
187{
189 { 0, 0 } // END
190};
191
193{
194 { DATA_1ST_BOSS, {{ 2019 }} },
195 { DATA_2ND_BOSS, {{ 2018 }} },
196 { DATA_CYANIGOSA, {{ 2020 }} }
197};
198
200{
201 public:
203
205 {
207 FirstBossId(*this, "FirstBossId", 0),
208 SecondBossId(*this, "SecondBossId", 0)
209 {
215
216 DoorIntegrity = 100;
217 WaveCount = 0;
219
221
222 Defenseless = true;
223 }
224
225 void OnCreatureCreate(Creature* creature) override
226 {
228
229 switch (creature->GetEntry())
230 {
231 case NPC_EREKEM_GUARD:
232 for (uint8 i = 0; i < ErekemGuardCount; ++i)
233 if (ErekemGuardGUIDs[i].IsEmpty())
234 {
235 ErekemGuardGUIDs[i] = creature->GetGUID();
236 break;
237 }
238 break;
239 default:
240 break;
241 }
242 }
243
244 void OnCreatureRemove(Creature* creature) override
245 {
247
248 switch (creature->GetEntry())
249 {
250 case NPC_EREKEM_GUARD:
251 for (uint8 i = 0; i < ErekemGuardCount; ++i)
252 if (ErekemGuardGUIDs[i] == creature->GetGUID())
253 {
255 break;
256 }
257 break;
258 default:
259 break;
260 }
261 }
262
264 {
266
267 switch (go->GetEntry())
268 {
270 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
271 if (ActivationCrystalGUIDs[i].IsEmpty())
272 {
274 break;
275 }
276 break;
277 default:
278 break;
279 }
280 }
281
283 {
285
286 switch (go->GetEntry())
287 {
289 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
290 if (ActivationCrystalGUIDs[i] == go->GetGUID())
291 {
293 break;
294 }
295 break;
296 default:
297 break;
298 }
299 }
300
301 bool CheckRequiredBosses(uint32 bossId, Player const* player = nullptr) const override
302 {
303 if (_SkipCheckRequiredBosses(player))
304 return true;
305
306 switch (bossId)
307 {
308 case DATA_MORAGG:
309 case DATA_EREKEM:
310 case DATA_ICHORON:
311 case DATA_LAVANTHOR:
312 case DATA_XEVOZZ:
313 case DATA_ZURAMAT:
315 if (!(WaveCount == 6 && FirstBossId == bossId) && !(WaveCount == 12 && SecondBossId == bossId))
316 return false;
317 break;
318 case DATA_CYANIGOSA:
319 if (WaveCount < 18)
320 return false;
321 break;
322 default:
323 break;
324 }
325
326 return true;
327 }
328
329 bool SetBossState(uint32 type, EncounterState state) override
330 {
331 if (!InstanceScript::SetBossState(type, state))
332 return false;
333
334 switch (type)
335 {
336 case DATA_CYANIGOSA:
337 if (state == DONE)
339 break;
340 case DATA_MORAGG:
341 case DATA_EREKEM:
342 case DATA_ICHORON:
343 case DATA_LAVANTHOR:
344 case DATA_XEVOZZ:
345 case DATA_ZURAMAT:
346 // this won't work correctly because bossstate was initializd with TO_BE_DECIDED
347 if (WaveCount == 6)
349 else if (WaveCount == 12)
351
352 if (state == DONE)
354 break;
355 default:
356 break;
357 }
358
359 return true;
360 }
361
362 void SetData(uint32 type, uint32 data) override
363 {
364 switch (type)
365 {
366 case DATA_WAVE_COUNT:
367 WaveCount = data;
368 if (WaveCount)
369 {
370 Scheduler.Schedule(Seconds(IsBossWave(WaveCount - 1) ? 45 : 5), [this](TaskContext /*task*/)
371 {
372 AddWave();
373 });
374 }
375 break;
377 DoorIntegrity = data;
378 Defenseless = false;
380 break;
382 switch (WaveCount)
383 {
384 case 6:
386 break;
387 case 12:
389 break;
390 }
391 break;
393 EventState = data;
394 if (data == IN_PROGRESS) // Start event
395 {
399
400 WaveCount = 1;
401 Scheduler.Async([this]
402 {
403 AddWave();
404 });
405
406 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
408 crystal->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
409
410 Scheduler.Schedule(Seconds(3), [this](TaskContext task)
411 {
413 task.Repeat(Seconds(3));
414 });
415 }
416 else if (data == NOT_STARTED)
417 {
418 if (GameObject* mainDoor = GetGameObject(DATA_MAIN_DOOR))
419 {
420 mainDoor->SetGoState(GO_STATE_ACTIVE);
421 mainDoor->RemoveFlag(GO_FLAG_LOCKED);
422 }
423
427
428 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
430 crystal->SetFlag(GO_FLAG_NOT_SELECTABLE);
431 }
432 else if (data == DONE)
433 {
434 if (GameObject* mainDoor = GetGameObject(DATA_MAIN_DOOR))
435 {
436 mainDoor->SetGoState(GO_STATE_ACTIVE);
437 mainDoor->RemoveFlag(GO_FLAG_LOCKED);
438 }
439
441
442 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
444 crystal->SetFlag(GO_FLAG_NOT_SELECTABLE);
445
446 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
447 sinclari->AI()->DoAction(ACTION_SINCLARI_OUTRO);
448 }
449 break;
451 HandleCells(data, false);
452 break;
453 }
454 }
455
456 uint32 GetData(uint32 type) const override
457 {
458 switch (type)
459 {
460 case DATA_1ST_BOSS:
461 return FirstBossId;
462 case DATA_2ND_BOSS:
463 return SecondBossId;
465 return EventState;
466 case DATA_WAVE_COUNT:
467 return WaveCount;
469 return DoorIntegrity;
470 case DATA_DEFENSELESS:
471 return Defenseless ? 1 : 0;
472 default:
473 break;
474 }
475
476 return 0;
477 }
478
479 ObjectGuid GetGuidData(uint32 type) const override
480 {
481 switch (type)
482 {
486 default:
487 break;
488 }
489
490 return InstanceScript::GetGuidData(type);
491 }
492
494 {
496 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
497 {
499 {
501 portal->AI()->SetData(DATA_PORTAL_LOCATION, LastPortalLocation);
502 }
503 else
504 {
506 portal->AI()->SetData(DATA_PORTAL_LOCATION, LastPortalLocation);
507 }
508 }
509 }
510
511 void HandleCells(uint8 bossId, bool open = true)
512 {
513 switch (bossId)
514 {
515 case DATA_MORAGG:
517 break;
518 case DATA_EREKEM:
522 break;
523 case DATA_ICHORON:
525 break;
526 case DATA_LAVANTHOR:
528 break;
529 case DATA_XEVOZZ:
531 break;
532 case DATA_ZURAMAT:
534 break;
535 default:
536 break;
537 }
538 }
539
541 {
542 switch (bossId)
543 {
544 case DATA_MORAGG:
545 Scheduler.Schedule(Seconds(2), [this](TaskContext task)
546 {
547 if (Creature* moragg = GetCreature(DATA_MORAGG))
548 {
549 moragg->PlayDirectSound(SOUND_MORAGG_SPAWN);
550 moragg->CastSpell(moragg, SPELL_MORAGG_EMOTE_ROAR);
551 }
552
553 task.Schedule(Seconds(3), [this](TaskContext task)
554 {
555 if (Creature* moragg = GetCreature(DATA_MORAGG))
556 moragg->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, MoraggPath, MoraggPathSize, true);
557
558 task.Schedule(Seconds(8), [this](TaskContext /*task*/)
559 {
560 if (Creature* moragg = GetCreature(DATA_MORAGG))
561 {
562 moragg->SetImmuneToAll(false);
563 moragg->AI()->DoZoneInCombat(moragg);
564 }
565 });
566 });
567 });
568 break;
569 case DATA_EREKEM:
570 Scheduler.Schedule(Seconds(3), [this](TaskContext task)
571 {
572 if (Creature* erekem = GetCreature(DATA_EREKEM))
573 erekem->AI()->Talk(SAY_EREKEM_SPAWN);
574
575 task.Schedule(Seconds(5), [this](TaskContext task)
576 {
577 if (Creature* erekem = GetCreature(DATA_EREKEM))
578 erekem->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, ErekemPath, ErekemPathSize, true);
579
581 guard->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, ErekemGuardLeftPath, ErekemGuardLeftPathSize, true);
583 guard->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, ErekemGuardRightPath, ErekemGuardRightPathSize, true);
584
585 task.Schedule(Seconds(6), [this](TaskContext task)
586 {
587 if (Creature* erekem = GetCreature(DATA_EREKEM))
588 erekem->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
589
590 task.Schedule(Seconds(1), [this](TaskContext /*task*/)
591 {
593 {
594 if (Creature* guard = instance->GetCreature(GetGuidData(i)))
595 guard->SetImmuneToAll(false);
596 }
597
598 if (Creature* erekem = GetCreature(DATA_EREKEM))
599 {
600 erekem->SetImmuneToAll(false);
601 erekem->AI()->DoZoneInCombat(erekem);
602 }
603 });
604 });
605 });
606 });
607 break;
608 case DATA_ICHORON:
609 Scheduler.Schedule(Seconds(2), [this](TaskContext task)
610 {
611 if (Creature* ichoron = GetCreature(DATA_ICHORON))
612 ichoron->AI()->Talk(SAY_ICHORON_SPAWN);
613
614 task.Schedule(Seconds(3), [this](TaskContext task)
615 {
616 if (Creature* ichoron = GetCreature(DATA_ICHORON))
617 ichoron->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, IchoronPath, IchoronPathSize, true);
618
619 task.Schedule(Seconds(14), [this](TaskContext /*task*/)
620 {
621 if (Creature* ichoron = GetCreature(DATA_ICHORON))
622 {
623 ichoron->SetImmuneToAll(false);
624 ichoron->AI()->DoZoneInCombat(ichoron);
625 }
626 });
627 });
628 });
629 break;
630 case DATA_LAVANTHOR:
631 Scheduler.Schedule(Seconds(1), [this](TaskContext task)
632 {
633 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
634 lavanthor->CastSpell(lavanthor, SPELL_LAVANTHOR_SPECIAL_UNARMED);
635
636 task.Schedule(Seconds(3), [this](TaskContext task)
637 {
638 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
639 lavanthor->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, LavanthorPath, LavanthorPathSize, true);
640
641 task.Schedule(Seconds(8), [this](TaskContext /*task*/)
642 {
643 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
644 {
645 lavanthor->SetImmuneToAll(false);
646 lavanthor->AI()->DoZoneInCombat(lavanthor);
647 }
648 });
649 });
650 });
651 break;
652 case DATA_XEVOZZ:
653 Scheduler.Schedule(Seconds(2), [this](TaskContext task)
654 {
655 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
656 xevozz->AI()->Talk(SAY_XEVOZZ_SPAWN);
657
658 task.Schedule(Seconds(3), [this](TaskContext task)
659 {
660 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
661 xevozz->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NO_SHEATHE);
662
663 task.Schedule(Seconds(4), [this](TaskContext task)
664 {
665 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
666 xevozz->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, XevozzPath, XevozzPathSize, true);
667
668 task.Schedule(Seconds(4), [this](TaskContext /*task*/)
669 {
670 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
671 {
672 xevozz->SetImmuneToAll(false);
673 xevozz->AI()->DoZoneInCombat(xevozz);
674 }
675 });
676 });
677 });
678 });
679 break;
680 case DATA_ZURAMAT:
681 Scheduler.Schedule(Seconds(2), [this](TaskContext task)
682 {
683 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
684 {
685 zuramat->CastSpell(zuramat, SPELL_ZURAMAT_COSMETIC_CHANNEL_OMNI);
686 zuramat->AI()->Talk(SAY_ZURAMAT_SPAWN);
687 }
688
689 task.Schedule(Seconds(6), [this](TaskContext task)
690 {
691 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
692 zuramat->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, ZuramatPath, ZuramatPathSize, true);
693
694 task.Schedule(Seconds(4), [this](TaskContext /*task*/)
695 {
696 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
697 {
698 zuramat->SetImmuneToAll(false);
699 zuramat->AI()->DoZoneInCombat(zuramat);
700 }
701 });
702 });
703 });
704 break;
705 default:
706 return;
707 }
708
709 HandleCells(bossId);
710 }
711
713 {
714 if (bossId < DATA_CYANIGOSA || bossId > DATA_ZURAMAT)
715 return;
716
717 Creature* boss = GetCreature(bossId);
718 if (!boss)
719 return;
720
721 switch (bossId)
722 {
723 case DATA_CYANIGOSA:
724 boss->DespawnOrUnsummon();
725 break;
726 case DATA_EREKEM:
728 {
729 if (Creature* guard = instance->GetCreature(GetGuidData(i)))
730 {
731 if (guard->isDead())
732 guard->Respawn();
733
734 if (GetBossState(bossId) == DONE)
735 UpdateKilledBoss(guard);
736
737 guard->GetMotionMaster()->MoveTargetedHome();
738 guard->SetImmuneToAll(true);
739 }
740 }
741 [[fallthrough]];
742 default:
743 if (boss->isDead())
744 {
745 // respawn and update to a placeholder npc to avoid be looted again
746 boss->Respawn();
747 UpdateKilledBoss(boss);
748 }
749
751 boss->SetImmuneToAll(true);
752 break;
753 }
754 }
755
756 void AddWave()
757 {
759
760 switch (WaveCount)
761 {
762 case 6:
763 if (FirstBossId == 0)
765 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
766 {
769 }
770 break;
771 case 12:
772 if (SecondBossId == 0)
773 do
774 {
776 } while (SecondBossId == FirstBossId);
777 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
778 {
781 }
782 break;
783 case 18:
784 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
785 {
788 cyanigosa->CastSpell(cyanigosa, SPELL_CYANIGOSA_ARCANE_POWER_STATE, true);
790 }
791 break;
792 default:
793 SpawnPortal();
794 break;
795 }
796 }
797
798 bool CheckWipe() const
799 {
800 Map::PlayerList const& players = instance->GetPlayers();
801 for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
802 {
803 Player* player = itr->GetSource();
804 if (player->IsGameMaster())
805 continue;
806
807 if (player->IsAlive())
808 return false;
809 }
810
811 return true;
812 }
813
815 {
816 switch (boss->GetEntry())
817 {
818 case NPC_XEVOZZ:
820 break;
821 case NPC_LAVANTHOR:
823 break;
824 case NPC_ICHORON:
826 break;
827 case NPC_ZURAMAT:
829 break;
830 case NPC_EREKEM:
832 break;
833 case NPC_MORAGG:
835 break;
836 case NPC_EREKEM_GUARD:
838 break;
839 default:
840 break;
841 }
842 }
843
844 void Update(uint32 diff) override
845 {
846 // if we don't have any player in the instance
847 if (!instance->HavePlayers())
848 {
849 if (EventState == IN_PROGRESS) // if event is in progress, mark as fail
850 {
853 }
854 return;
855 }
856
857 Scheduler.Update(diff);
858
859 if (EventState == IN_PROGRESS)
860 {
861 // if door is destroyed, event is failed
864 }
865 }
866
868 {
869 // if main event is in progress and players have wiped then reset instance
870 if ((EventState == IN_PROGRESS && CheckWipe()) || EventState == FAIL)
871 {
875
876 WaveCount = 0;
877 DoorIntegrity = 100;
878 Defenseless = true;
880
882
883 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
884 sinclari->AI()->EnterEvadeMode();
885 }
886 }
887
889 {
890 Scheduler.Schedule(Seconds(2), [this](TaskContext task)
891 {
892 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
893 cyanigosa->AI()->Talk(SAY_CYANIGOSA_SPAWN);
894
895 task.Schedule(Seconds(6), [this](TaskContext task)
896 {
897 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
898 cyanigosa->GetMotionMaster()->MoveJump(CyanigosaJumpLocation, 10.0f, 27.44744f);
899
900 task.Schedule(Seconds(7), [this](TaskContext /*task*/)
901 {
902 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
903 {
904 cyanigosa->RemoveAurasDueToSpell(SPELL_CYANIGOSA_ARCANE_POWER_STATE);
905 cyanigosa->CastSpell(cyanigosa, SPELL_CYANIGOSA_TRANSFORM, true);
906 cyanigosa->SetImmuneToAll(false);
907 }
908 });
909 });
910 });
911 }
912
913 void ProcessEvent(WorldObject* /*go*/, uint32 eventId, WorldObject* /*invoker*/) override
914 {
915 if (eventId == EVENT_ACTIVATE_CRYSTAL)
916 {
918 Defenseless = false;
919 }
920 }
921
922 static bool IsBossWave(uint8 wave)
923 {
924 return wave && ((wave % 6) == 0);
925 }
926
927 protected:
929
930 static uint8 const ErekemGuardCount = 2;
932
935
938
943
945 };
946
948 {
950 }
951};
952
954{
956}
uint8_t uint8
Definition: Define.h:144
uint32_t uint32
Definition: Define.h:142
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition: Duration.h:32
EncounterState
@ IN_PROGRESS
@ FAIL
@ DONE
@ NOT_STARTED
@ TEMPSUMMON_DEAD_DESPAWN
Definition: ObjectDefines.h:69
@ TEMPSUMMON_TIMED_DESPAWN
Definition: ObjectDefines.h:65
@ TEMPSUMMON_CORPSE_DESPAWN
Definition: ObjectDefines.h:67
Spells
Definition: PlayerAI.cpp:32
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
if(posix_memalign(&__mallocedMemory, __align, __size)) return NULL
@ EMOTE_ONESHOT_ROAR
@ EMOTE_ONESHOT_TALK_NO_SHEATHE
@ GO_FLAG_NOT_SELECTABLE
@ GO_FLAG_LOCKED
@ GO_STATE_ACTIVE
#define DataHeader
uint32 const EncounterCount
Yells
void Respawn(bool force=false)
Definition: Creature.cpp:2303
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
bool UpdateEntry(uint32 entry, CreatureData const *data=nullptr, bool updateLevel=true)
Definition: Creature.cpp:577
void SetImmuneToAll(bool apply) override
Definition: Creature.h:167
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
virtual void OnCreatureCreate(Creature *creature) override
Creature * GetCreature(uint32 type)
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
void LoadDungeonEncounterData(T const &encounters)
void DoUpdateWorldState(int32 worldStateId, int32 value)
virtual void OnCreatureRemove(Creature *creature) override
virtual ObjectGuid GetGuidData(uint32 type) const override
virtual void OnGameObjectRemove(GameObject *go) override
InstanceMap * instance
EncounterState GetBossState(uint32 id) const
virtual void OnGameObjectCreate(GameObject *go) override
void LoadMinionData(MinionData const *data)
GameObject * GetGameObject(uint32 type)
bool _SkipCheckRequiredBosses(Player const *player=nullptr) const
void SetHeaders(std::string const &dataHeaders)
ObjectGuid GetObjectGuid(uint32 type) const
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
iterator end()
Definition: MapRefManager.h:35
iterator begin()
Definition: MapRefManager.h:34
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, Milliseconds duration=0ms, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty, SmoothPhasingInfo const *smoothPhasingInfo=nullptr)
Definition: Object.cpp:1836
bool HavePlayers() const
Definition: Map.h:357
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3489
PlayerList const & GetPlayers() const
Definition: Map.h:367
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3479
void MoveTargetedHome()
void Clear()
Definition: ObjectGuid.h:286
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
bool IsGameMaster() const
Definition: Player.h:1178
TaskContext & Schedule(std::chrono::duration< Rep, Period > time, TaskScheduler::task_handler_t task)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< Rep, Period > time, task_handler_t task)
TaskScheduler & Async(std::function< void()> callable)
TaskScheduler & Update(success_t const &callback=nullptr)
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
bool IsAlive() const
Definition: Unit.h:1164
bool isDead() const
Definition: Unit.h:1166
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
InstanceScript * GetInstanceScript(InstanceMap *map) const override
@ DATA_WAVE_COUNT
Position const CyanigosaJumpLocation
uint32 const PortalPositionsSize
ObjectData const gameObjectData[]
uint32 const IchoronPathSize
uint32 const MoraggPathSize
Position const SaboteurSpawnLocation
uint32 const EncouterPortalsCount
@ SAY_ICHORON_SPAWN
@ SAY_CYANIGOSA_SPAWN
@ SAY_ZURAMAT_SPAWN
@ SAY_XEVOZZ_SPAWN
@ SOUND_MORAGG_SPAWN
@ SAY_EREKEM_SPAWN
void AddSC_instance_violet_hold()
ObjectData const creatureData[]
uint32 const PortalIntroPositionsSize
uint32 const ErekemPathSize
Position const PortalElitePositions[PortalElitePositionsSize]
uint32 const ErekemGuardRightPathSize
@ SPELL_ZURAMAT_COSMETIC_CHANNEL_OMNI
@ SPELL_MORAGG_EMOTE_ROAR
@ SPELL_CYANIGOSA_ARCANE_POWER_STATE
@ SPELL_LAVANTHOR_SPECIAL_UNARMED
@ SPELL_CYANIGOSA_TRANSFORM
uint32 const ErekemGuardLeftPathSize
MinionData const minionData[]
Position const ErekemGuardLeftPath[ErekemGuardLeftPathSize]
Position const IchoronPath[IchoronPathSize]
Position const CyanigosaSpawnLocation
Position const PortalPositions[PortalPositionsSize]
Position const ZuramatPath[ZuramatPathSize]
Position const PortalIntroPositions[PortalIntroPositionsSize]
Position const XevozzPath[XevozzPathSize]
Position const DefenseSystemLocation
uint32 const ZuramatPathSize
uint32 const PortalElitePositionsSize
Position const ErekemPath[ErekemPathSize]
uint32 const XevozzPathSize
uint32 const LavanthorPathSize
DungeonEncounterData const encounters[]
Position const MoraggPath[MoraggPathSize]
Position const ErekemGuardRightPath[ErekemGuardRightPathSize]
Position const LavanthorPath[LavanthorPathSize]
bool SetBossState(uint32 type, EncounterState state) override
void ProcessEvent(WorldObject *, uint32 eventId, WorldObject *) override
bool CheckRequiredBosses(uint32 bossId, Player const *player=nullptr) const override
@ EVENT_ACTIVATE_CRYSTAL
Definition: violet_hold.h:149
@ GO_XEVOZZ_DOOR
Definition: violet_hold.h:128
@ GO_ICHORON_DOOR
Definition: violet_hold.h:130
@ GO_ACTIVATION_CRYSTAL
Definition: violet_hold.h:136
@ GO_LAVANTHOR_DOOR
Definition: violet_hold.h:129
@ GO_EREKEM_DOOR
Definition: violet_hold.h:132
@ GO_MORAGG_DOOR
Definition: violet_hold.h:135
@ GO_ZURAMAT_DOOR
Definition: violet_hold.h:131
@ GO_EREKEM_GUARD_2_DOOR
Definition: violet_hold.h:134
@ GO_EREKEM_GUARD_1_DOOR
Definition: violet_hold.h:133
@ GO_MAIN_DOOR
Definition: violet_hold.h:127
@ DATA_ICHORON
Definition: violet_hold.h:56
@ DATA_EREKEM_LEFT_GUARD_CELL
Definition: violet_hold.h:76
@ DATA_MAIN_EVENT_STATE
Definition: violet_hold.h:62
@ DATA_HANDLE_CELLS
Definition: violet_hold.h:87
@ DATA_ZURAMAT
Definition: violet_hold.h:59
@ DATA_ZURAMAT_CELL
Definition: violet_hold.h:81
@ DATA_LAVANTHOR_CELL
Definition: violet_hold.h:79
@ DATA_XEVOZZ
Definition: violet_hold.h:58
@ DATA_2ND_BOSS
Definition: violet_hold.h:51
@ DATA_1ST_BOSS
Definition: violet_hold.h:50
@ DATA_SINCLARI_TRIGGER
Definition: violet_hold.h:86
@ DATA_EREKEM_GUARD_2
Definition: violet_hold.h:71
@ DATA_MAIN_DOOR
Definition: violet_hold.h:84
@ DATA_CYANIGOSA
Definition: violet_hold.h:52
@ DATA_EREKEM_CELL
Definition: violet_hold.h:75
@ DATA_XEVOZZ_CELL
Definition: violet_hold.h:80
@ DATA_EREKEM
Definition: violet_hold.h:55
@ DATA_LAVANTHOR
Definition: violet_hold.h:57
@ DATA_PORTAL_LOCATION
Definition: violet_hold.h:65
@ DATA_DOOR_INTEGRITY
Definition: violet_hold.h:64
@ DATA_EREKEM_GUARD_1
Definition: violet_hold.h:70
@ DATA_DEFENSELESS
Definition: violet_hold.h:67
@ DATA_SINCLARI
Definition: violet_hold.h:85
@ DATA_START_BOSS_ENCOUNTER
Definition: violet_hold.h:66
@ DATA_EREKEM_RIGHT_GUARD_CELL
Definition: violet_hold.h:77
@ DATA_MORAGG_CELL
Definition: violet_hold.h:74
@ DATA_ICHORON_CELL
Definition: violet_hold.h:78
@ DATA_MORAGG
Definition: violet_hold.h:54
@ WORLD_STATE_VH_WAVE_COUNT
Definition: violet_hold.h:144
@ WORLD_STATE_VH_PRISON_STATE
Definition: violet_hold.h:143
@ WORLD_STATE_VH_SHOW
Definition: violet_hold.h:142
@ ACTION_SINCLARI_OUTRO
Definition: violet_hold.h:154
#define VioletHoldScriptName
Definition: violet_hold.h:25
@ NPC_EREKEM_GUARD
Definition: violet_hold.h:106
@ NPC_TELEPORTATION_PORTAL_INTRO
Definition: violet_hold.h:94
@ NPC_SINCLARI_TRIGGER
Definition: violet_hold.h:119
@ NPC_DUMMY_EREKEM_GUARD
Definition: violet_hold.h:114
@ NPC_SABOTEOUR
Definition: violet_hold.h:120
@ NPC_DUMMY_ICHORON
Definition: violet_hold.h:111
@ NPC_LAVANTHOR
Definition: violet_hold.h:98
@ NPC_EREKEM
Definition: violet_hold.h:105
@ NPC_MORAGG
Definition: violet_hold.h:107
@ NPC_CYANIGOSA
Definition: violet_hold.h:117
@ NPC_ICHORON
Definition: violet_hold.h:99
@ NPC_ZURAMAT
Definition: violet_hold.h:102
@ NPC_SINCLARI
Definition: violet_hold.h:118
@ NPC_DEFENSE_SYSTEM
Definition: violet_hold.h:122
@ NPC_DUMMY_ZURAMAT
Definition: violet_hold.h:112
@ NPC_XEVOZZ
Definition: violet_hold.h:97
@ NPC_DUMMY_MORAGG
Definition: violet_hold.h:115
@ NPC_DUMMY_XEVOZZ
Definition: violet_hold.h:109
@ NPC_DUMMY_LAVANTHOR
Definition: violet_hold.h:110
@ NPC_DUMMY_EREKEM
Definition: violet_hold.h:113
@ NPC_TELEPORTATION_PORTAL
Definition: violet_hold.h:92
@ NPC_TELEPORTATION_PORTAL_ELITE
Definition: violet_hold.h:93
@ POINT_INTRO
Definition: zulaman.cpp:64