TrinityCore
Loading...
Searching...
No Matches
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 "ScriptMgr.h"
27#include "TaskScheduler.h"
28#include "TemporarySummon.h"
29#include "WaypointDefines.h"
30
31/*
32 * TODO:
33 * - replace bosses by dummy npcs also after grid unload
34 */
35
36Position const DefenseSystemLocation = { 1888.146f, 803.382f, 58.60389f, 3.071779f }; // sniff
37
38static constexpr Position CyanigosaSpawnLocation = { 1922.109f, 804.4493f, 52.49254f, 3.176499f }; // sniff
39static constexpr Position CyanigosaJumpLocation = { 1888.32f, 804.473f, 38.3578f, 0.0f }; // sniff
40
41static constexpr Position SaboteurSpawnLocation = { 1886.251f, 803.0743f, 38.42326f, 3.211406f }; // sniff
42
43static constexpr Position PortalPositions[] = // sniff
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
52static constexpr Position PortalElitePositions[] = // sniff
53{
54 { 1911.281f, 800.9722f, 39.91673f, 3.01942f }, // 5
55 { 1926.516f, 763.6616f, 52.35725f, 2.251475f }, // 6
56 { 1922.464f, 847.0699f, 48.50161f, 3.961897f } // 7
57};
58
60{
61 { 1877.51f, 850.1042f, 44.65989f, 4.782202f }, // 0 - Intro
62 { 1890.637f, 753.4705f, 48.72239f, 1.710423f }, // 1 - Intro
63 { 1936.073f, 803.1979f, 53.37491f, 3.124139f }, // 2 - Intro
64 { 1886.545f, 803.2014f, 40.40931f, 3.159046f }, // 3 - Boss 1/2
65 { 1924.096f, 804.3707f, 54.29256f, 3.228859f } // 4 - Boss 3
66};
67
68static constexpr uint32 EncouterPortalsCount = std::ranges::size(PortalPositions) + std::ranges::size(PortalElitePositions);
69
70WaypointPath const MoraggPath = // sniff
71{
73 {
74 { 0, 1893.895f, 728.1261f, 47.75016f },
75 { 1, 1892.997f, 738.4987f, 47.66684f },
76 { 2, 1889.76f, 758.1089f, 47.66684f }
77 },
79};
80
81WaypointPath const ErekemPath = // sniff
82{
84 {
85 { 0, 1871.456f, 871.0361f, 43.41524f },
86 { 1, 1874.948f, 859.5452f, 43.33349f },
87 { 2, 1877.245f, 851.967f, 43.3335f, 4.921828f }
88 },
90};
91
93{
95 {
96 { 0, 1853.752f, 862.4528f, 43.41614f },
97 { 1, 1866.931f, 854.577f, 43.3335f },
98 { 2, 1872.973f, 850.7875f, 43.3335f }
99 },
101};
102
104{
106 {
107 { 0, 1892.418f, 872.2831f, 43.41563f },
108 { 1, 1885.639f, 859.0245f, 43.3335f },
109 { 2, 1882.432f, 852.2423f, 43.3335f }
110 },
112};
113
114WaypointPath const IchoronPath = // sniff
115{
117 {
118 { 0, 1942.041f, 749.5228f, 30.95229f },
119 { 1, 1930.571f, 762.9065f, 31.98814f },
120 { 2, 1923.657f, 770.6718f, 34.07256f },
121 { 3, 1910.631f, 784.4096f, 37.09015f },
122 { 4, 1906.595f, 788.3828f, 37.99429f }
123 },
125};
126
128{
130 {
131 { 0, 1844.557f, 748.7083f, 38.74205f },
132 { 1, 1854.618f, 761.5295f, 38.65631f },
133 { 2, 1862.17f, 773.2255f, 38.74879f }
134 },
136};
137
138WaypointPath const XevozzPath = // sniff
139{
141 {
142 { 0, 1908.417f, 845.8502f, 38.71947f },
143 { 1, 1905.557f, 841.3157f, 38.65529f },
144 { 2, 1899.453f, 832.533f, 38.70752f }
145 },
147};
148
149WaypointPath const ZuramatPath = // sniff
150{
152 {
153 { 0, 1934.151f, 860.9463f, 47.29499f },
154 { 1, 1927.085f, 852.1342f, 47.19214f },
155 { 2, 1923.226f, 847.3297f, 47.15541f }
156 },
158};
159
170
179
192
205
206static constexpr MinionData minionData[] =
207{
209};
210
212{
213 { DATA_1ST_BOSS, {{ 2019 }} },
214 { DATA_2ND_BOSS, {{ 2018 }} },
215 { DATA_CYANIGOSA, {{ 2020 }} }
216};
217
219{
220 public:
222
224 {
243
244 void OnCreatureCreate(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].IsEmpty())
253 {
254 ErekemGuardGUIDs[i] = creature->GetGUID();
255 break;
256 }
257 break;
258 default:
259 break;
260 }
261 }
262
263 void OnCreatureRemove(Creature* creature) override
264 {
266
267 switch (creature->GetEntry())
268 {
269 case NPC_EREKEM_GUARD:
270 for (uint8 i = 0; i < ErekemGuardCount; ++i)
271 if (ErekemGuardGUIDs[i] == creature->GetGUID())
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].IsEmpty())
291 {
293 break;
294 }
295 break;
296 default:
297 break;
298 }
299 }
300
302 {
304
305 switch (go->GetEntry())
306 {
308 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
309 if (ActivationCrystalGUIDs[i] == go->GetGUID())
310 {
312 break;
313 }
314 break;
315 default:
316 break;
317 }
318 }
319
320 bool CheckRequiredBosses(uint32 bossId, Player const* player = nullptr) const override
321 {
322 if (_SkipCheckRequiredBosses(player))
323 return true;
324
325 switch (bossId)
326 {
327 case DATA_MORAGG:
328 case DATA_EREKEM:
329 case DATA_ICHORON:
330 case DATA_LAVANTHOR:
331 case DATA_XEVOZZ:
332 case DATA_ZURAMAT:
334 if (!(WaveCount == 6 && FirstBossId == bossId) && !(WaveCount == 12 && SecondBossId == bossId))
335 return false;
336 break;
337 case DATA_CYANIGOSA:
338 if (WaveCount < 18)
339 return false;
340 break;
341 default:
342 break;
343 }
344
345 return true;
346 }
347
348 bool SetBossState(uint32 type, EncounterState state) override
349 {
350 if (!InstanceScript::SetBossState(type, state))
351 return false;
352
353 switch (type)
354 {
355 case DATA_CYANIGOSA:
356 if (state == DONE)
358 break;
359 case DATA_MORAGG:
360 case DATA_EREKEM:
361 case DATA_ICHORON:
362 case DATA_LAVANTHOR:
363 case DATA_XEVOZZ:
364 case DATA_ZURAMAT:
365 // this won't work correctly because bossstate was initializd with TO_BE_DECIDED
366 if (WaveCount == 6)
368 else if (WaveCount == 12)
370
371 if (state == DONE)
373 break;
374 default:
375 break;
376 }
377
378 return true;
379 }
380
381 void SetData(uint32 type, uint32 data) override
382 {
383 switch (type)
384 {
385 case DATA_WAVE_COUNT:
386 WaveCount = data;
387 if (WaveCount)
388 {
389 Scheduler.Schedule(Seconds(IsBossWave(WaveCount - 1) ? 45 : 5), [this](TaskContext const& /*task*/)
390 {
391 AddWave();
392 });
393 }
394 break;
396 DoorIntegrity = data;
397 Defenseless = false;
399 break;
401 switch (WaveCount)
402 {
403 case 6:
405 break;
406 case 12:
408 break;
409 }
410 break;
412 EventState = data;
413 if (data == IN_PROGRESS) // Start event
414 {
418
419 WaveCount = 1;
420 Scheduler.Async([this]
421 {
422 AddWave();
423 });
424
425 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
427 crystal->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
428
429 Scheduler.Schedule(Seconds(3), [this](TaskContext& task)
430 {
432 task.Repeat(Seconds(3));
433 });
434 }
435 else if (data == NOT_STARTED)
436 {
437 if (GameObject* mainDoor = GetGameObject(DATA_MAIN_DOOR))
438 {
439 mainDoor->SetGoState(GO_STATE_ACTIVE);
440 mainDoor->RemoveFlag(GO_FLAG_LOCKED);
441 }
442
446
447 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
449 crystal->SetFlag(GO_FLAG_NOT_SELECTABLE);
450 }
451 else if (data == DONE)
452 {
453 if (GameObject* mainDoor = GetGameObject(DATA_MAIN_DOOR))
454 {
455 mainDoor->SetGoState(GO_STATE_ACTIVE);
456 mainDoor->RemoveFlag(GO_FLAG_LOCKED);
457 }
458
460
461 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
463 crystal->SetFlag(GO_FLAG_NOT_SELECTABLE);
464
465 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
466 sinclari->AI()->DoAction(ACTION_SINCLARI_OUTRO);
467 }
468 break;
470 HandleCells(data, false);
471 break;
472 }
473 }
474
475 uint32 GetData(uint32 type) const override
476 {
477 switch (type)
478 {
479 case DATA_1ST_BOSS:
480 return FirstBossId;
481 case DATA_2ND_BOSS:
482 return SecondBossId;
484 return EventState;
485 case DATA_WAVE_COUNT:
486 return WaveCount;
488 return DoorIntegrity;
489 case DATA_DEFENSELESS:
490 return Defenseless ? 1 : 0;
491 default:
492 break;
493 }
494
495 return 0;
496 }
497
498 ObjectGuid GetGuidData(uint32 type) const override
499 {
500 switch (type)
501 {
505 default:
506 break;
507 }
508
509 return InstanceScript::GetGuidData(type);
510 }
511
529
530 void HandleCells(uint8 bossId, bool open = true)
531 {
532 switch (bossId)
533 {
534 case DATA_MORAGG:
536 break;
537 case DATA_EREKEM:
541 break;
542 case DATA_ICHORON:
544 break;
545 case DATA_LAVANTHOR:
547 break;
548 case DATA_XEVOZZ:
550 break;
551 case DATA_ZURAMAT:
553 break;
554 default:
555 break;
556 }
557 }
558
560 {
561 switch (bossId)
562 {
563 case DATA_MORAGG:
564 Scheduler.Schedule(Seconds(2), [this](TaskContext& task)
565 {
566 if (Creature* moragg = GetCreature(DATA_MORAGG))
567 {
568 moragg->PlayDirectSound(SOUND_MORAGG_SPAWN);
569 moragg->CastSpell(moragg, SPELL_MORAGG_EMOTE_ROAR);
570 }
571
572 task.Schedule(Seconds(3), [this](TaskContext& task)
573 {
574 if (Creature* moragg = GetCreature(DATA_MORAGG))
575 moragg->GetMotionMaster()->MovePath(MoraggPath, false);
576
577 task.Schedule(Seconds(8), [this](TaskContext const& /*task*/)
578 {
579 if (Creature* moragg = GetCreature(DATA_MORAGG))
580 {
581 moragg->SetImmuneToAll(false);
582 moragg->AI()->DoZoneInCombat(moragg);
583 }
584 });
585 });
586 });
587 break;
588 case DATA_EREKEM:
589 Scheduler.Schedule(Seconds(3), [this](TaskContext& task)
590 {
591 if (Creature* erekem = GetCreature(DATA_EREKEM))
592 erekem->AI()->Talk(SAY_EREKEM_SPAWN);
593
594 task.Schedule(Seconds(5), [this](TaskContext& task)
595 {
596 if (Creature* erekem = GetCreature(DATA_EREKEM))
597 erekem->GetMotionMaster()->MovePath(ErekemPath, false);
598
600 guard->GetMotionMaster()->MovePath(ErekemGuardLeftPath, false);
602 guard->GetMotionMaster()->MovePath(ErekemGuardRightPath, false);
603
604 task.Schedule(Seconds(6), [this](TaskContext& task)
605 {
606 if (Creature* erekem = GetCreature(DATA_EREKEM))
607 erekem->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
608
609 task.Schedule(Seconds(1), [this](TaskContext const& /*task*/)
610 {
612 {
613 if (Creature* guard = instance->GetCreature(GetGuidData(i)))
614 guard->SetImmuneToAll(false);
615 }
616
617 if (Creature* erekem = GetCreature(DATA_EREKEM))
618 {
619 erekem->SetImmuneToAll(false);
620 erekem->AI()->DoZoneInCombat(erekem);
621 }
622 });
623 });
624 });
625 });
626 break;
627 case DATA_ICHORON:
628 Scheduler.Schedule(Seconds(2), [this](TaskContext& task)
629 {
630 if (Creature* ichoron = GetCreature(DATA_ICHORON))
631 ichoron->AI()->Talk(SAY_ICHORON_SPAWN);
632
633 task.Schedule(Seconds(3), [this](TaskContext& task)
634 {
635 if (Creature* ichoron = GetCreature(DATA_ICHORON))
636 ichoron->GetMotionMaster()->MovePath(IchoronPath, false);
637
638 task.Schedule(Seconds(14), [this](TaskContext const& /*task*/)
639 {
640 if (Creature* ichoron = GetCreature(DATA_ICHORON))
641 {
642 ichoron->SetImmuneToAll(false);
643 ichoron->AI()->DoZoneInCombat(ichoron);
644 }
645 });
646 });
647 });
648 break;
649 case DATA_LAVANTHOR:
650 Scheduler.Schedule(Seconds(1), [this](TaskContext& task)
651 {
652 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
653 lavanthor->CastSpell(lavanthor, SPELL_LAVANTHOR_SPECIAL_UNARMED);
654
655 task.Schedule(Seconds(3), [this](TaskContext& task)
656 {
657 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
658 lavanthor->GetMotionMaster()->MovePath(LavanthorPath, false);
659
660 task.Schedule(Seconds(8), [this](TaskContext const& /*task*/)
661 {
662 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
663 {
664 lavanthor->SetImmuneToAll(false);
665 lavanthor->AI()->DoZoneInCombat(lavanthor);
666 }
667 });
668 });
669 });
670 break;
671 case DATA_XEVOZZ:
672 Scheduler.Schedule(Seconds(2), [this](TaskContext& task)
673 {
674 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
675 xevozz->AI()->Talk(SAY_XEVOZZ_SPAWN);
676
677 task.Schedule(Seconds(3), [this](TaskContext& task)
678 {
679 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
680 xevozz->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NO_SHEATHE);
681
682 task.Schedule(Seconds(4), [this](TaskContext& task)
683 {
684 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
685 xevozz->GetMotionMaster()->MovePath(XevozzPath, false);
686
687 task.Schedule(Seconds(4), [this](TaskContext const& /*task*/)
688 {
689 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
690 {
691 xevozz->SetImmuneToAll(false);
692 xevozz->AI()->DoZoneInCombat(xevozz);
693 }
694 });
695 });
696 });
697 });
698 break;
699 case DATA_ZURAMAT:
700 Scheduler.Schedule(Seconds(2), [this](TaskContext& task)
701 {
702 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
703 {
704 zuramat->CastSpell(zuramat, SPELL_ZURAMAT_COSMETIC_CHANNEL_OMNI);
705 zuramat->AI()->Talk(SAY_ZURAMAT_SPAWN);
706 }
707
708 task.Schedule(Seconds(6), [this](TaskContext& task)
709 {
710 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
711 zuramat->GetMotionMaster()->MovePath(ZuramatPath, false);
712
713 task.Schedule(Seconds(4), [this](TaskContext const& /*task*/)
714 {
715 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
716 {
717 zuramat->SetImmuneToAll(false);
718 zuramat->AI()->DoZoneInCombat(zuramat);
719 }
720 });
721 });
722 });
723 break;
724 default:
725 return;
726 }
727
728 HandleCells(bossId);
729 }
730
732 {
733 if (bossId < DATA_CYANIGOSA || bossId > DATA_ZURAMAT)
734 return;
735
736 Creature* boss = GetCreature(bossId);
737 if (!boss)
738 return;
739
740 switch (bossId)
741 {
742 case DATA_CYANIGOSA:
743 boss->DespawnOrUnsummon();
744 break;
745 case DATA_EREKEM:
747 {
748 if (Creature* guard = instance->GetCreature(GetGuidData(i)))
749 {
750 if (guard->isDead())
751 guard->Respawn();
752
753 if (GetBossState(bossId) == DONE)
754 UpdateKilledBoss(guard);
755
756 guard->GetMotionMaster()->MoveTargetedHome();
757 guard->SetImmuneToAll(true);
758 }
759 }
760 [[fallthrough]];
761 default:
762 if (boss->isDead())
763 {
764 // respawn and update to a placeholder npc to avoid be looted again
765 boss->Respawn();
766 UpdateKilledBoss(boss);
767 }
768
770 boss->SetImmuneToAll(true);
771 break;
772 }
773 }
774
775 void AddWave()
776 {
778
779 switch (WaveCount)
780 {
781 case 6:
782 if (FirstBossId == 0)
784 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
785 {
788 }
789 break;
790 case 12:
791 if (SecondBossId == 0)
792 do
793 {
795 } while (SecondBossId == FirstBossId);
796 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
797 {
800 }
801 break;
802 case 18:
803 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
804 {
807 cyanigosa->CastSpell(cyanigosa, SPELL_CYANIGOSA_ARCANE_POWER_STATE, true);
809 }
810 break;
811 default:
812 SpawnPortal();
813 break;
814 }
815 }
816
817 bool CheckWipe() const
818 {
819 Map::PlayerList const& players = instance->GetPlayers();
820 for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
821 {
822 Player* player = itr->GetSource();
823 if (player->IsGameMaster())
824 continue;
825
826 if (player->IsAlive())
827 return false;
828 }
829
830 return true;
831 }
832
834 {
835 switch (boss->GetEntry())
836 {
837 case NPC_XEVOZZ:
839 break;
840 case NPC_LAVANTHOR:
842 break;
843 case NPC_ICHORON:
845 break;
846 case NPC_ZURAMAT:
848 break;
849 case NPC_EREKEM:
851 break;
852 case NPC_MORAGG:
854 break;
855 case NPC_EREKEM_GUARD:
857 break;
858 default:
859 break;
860 }
861 }
862
863 void Update(uint32 diff) override
864 {
865 // if we don't have any player in the instance
866 if (!instance->HavePlayers())
867 {
868 if (EventState == IN_PROGRESS) // if event is in progress, mark as fail
869 {
872 }
873 return;
874 }
875
876 Scheduler.Update(diff);
877
878 if (EventState == IN_PROGRESS)
879 {
880 // if door is destroyed, event is failed
883 }
884 }
885
887 {
888 // if main event is in progress and players have wiped then reset instance
889 if ((EventState == IN_PROGRESS && CheckWipe()) || EventState == FAIL)
890 {
894
895 WaveCount = 0;
896 DoorIntegrity = 100;
897 Defenseless = true;
899
901
902 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
903 sinclari->AI()->EnterEvadeMode();
904 }
905 }
906
908 {
909 Scheduler.Schedule(Seconds(2), [this](TaskContext& task)
910 {
911 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
912 cyanigosa->AI()->Talk(SAY_CYANIGOSA_SPAWN);
913
914 task.Schedule(Seconds(6), [this](TaskContext& task)
915 {
916 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
917 cyanigosa->GetMotionMaster()->MoveJump(EVENT_JUMP, CyanigosaJumpLocation, {}, 8.0f);
918
919 task.Schedule(Seconds(7), [this](TaskContext const& /*task*/)
920 {
921 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
922 {
923 cyanigosa->RemoveAurasDueToSpell(SPELL_CYANIGOSA_ARCANE_POWER_STATE);
924 cyanigosa->CastSpell(cyanigosa, SPELL_CYANIGOSA_TRANSFORM, true);
925 cyanigosa->SetImmuneToAll(false);
926 }
927 });
928 });
929 });
930 }
931
932 void ProcessEvent(WorldObject* /*go*/, uint32 eventId, WorldObject* /*invoker*/) override
933 {
934 if (eventId == EVENT_ACTIVATE_CRYSTAL)
935 {
937 Defenseless = false;
938 }
939 }
940
941 static bool IsBossWave(uint8 wave)
942 {
943 return wave && ((wave % 6) == 0);
944 }
945
946 protected:
948
949 static uint8 const ErekemGuardCount = 2;
951
954
957
962
964 };
965
967 {
969 }
970};
971
uint8_t uint8
Definition Define.h:156
uint32_t uint32
Definition Define.h:154
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition Duration.h:28
EncounterState
@ IN_PROGRESS
@ FAIL
@ DONE
@ NOT_STARTED
@ TEMPSUMMON_DEAD_DESPAWN
@ TEMPSUMMON_TIMED_DESPAWN
@ TEMPSUMMON_CORPSE_DESPAWN
Spells
Definition PlayerAI.cpp:32
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
@ EMOTE_ONESHOT_ROAR
@ EMOTE_ONESHOT_TALK_NO_SHEATHE
@ EVENT_JUMP
@ GO_FLAG_NOT_SELECTABLE
@ GO_FLAG_LOCKED
@ GO_STATE_ACTIVE
#define DataHeader
uint32 const EncounterCount
Yells
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
void Respawn(bool force=false)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool UpdateEntry(uint32 entry, CreatureData const *data=nullptr, bool updateLevel=true)
Definition Creature.cpp:593
void SetImmuneToAll(bool apply) override
Definition Creature.h:181
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 DoUpdateWorldState(int32 worldStateId, int32 value)
virtual void OnCreatureRemove(Creature *creature) override
virtual ObjectGuid GetGuidData(uint32 type) const override
virtual void OnGameObjectRemove(GameObject *go) override
void LoadObjectData(std::span< ObjectData const > creatureData, std::span< ObjectData const > gameObjectData)
InstanceMap * instance
void SetHeaders(std::string_view dataHeaders)
void LoadDungeonEncounterData(std::span< DungeonEncounterData const > encounters)
EncounterState GetBossState(uint32 id) const
virtual void OnGameObjectCreate(GameObject *go) override
void LoadMinionData(std::span< MinionData const > data)
GameObject * GetGameObject(uint32 type)
bool _SkipCheckRequiredBosses(Player const *player=nullptr) const
ObjectGuid GetObjectGuid(uint32 type) const
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:1186
bool HavePlayers() const
Definition Map.h:393
GameObject * GetGameObject(ObjectGuid const &guid)
Definition Map.cpp:3552
PlayerList const & GetPlayers() const
Definition Map.h:403
Creature * GetCreature(ObjectGuid const &guid)
Definition Map.cpp:3542
void MoveTargetedHome()
void Clear()
Definition ObjectGuid.h:329
uint32 GetEntry() const
Definition Object.h:89
bool IsGameMaster() const
Definition Player.h:1309
iterator end()
Definition RefManager.h:36
iterator begin()
Definition RefManager.h:35
TaskContext & Schedule(TaskScheduler::duration_t time, TaskScheduler::task_handler_t task)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & Async(std::function< void()> callable)
TaskScheduler & Update()
Update the scheduler to the current time.
MotionMaster * GetMotionMaster()
Definition Unit.h:1723
bool IsAlive() const
Definition Unit.h:1185
bool isDead() const
Definition Unit.h:1187
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:1398
InstanceScript * GetInstanceScript(InstanceMap *map) const override
@ DATA_WAVE_COUNT
static constexpr ObjectData creatureData[]
Position const PortalIntroPositions[]
@ SAY_ICHORON_SPAWN
@ SAY_CYANIGOSA_SPAWN
@ SAY_ZURAMAT_SPAWN
@ SOUND_MORAGG_SPAWN
void AddSC_instance_violet_hold()
WaypointPath const ZuramatPath
@ SPELL_ZURAMAT_COSMETIC_CHANNEL_OMNI
@ SPELL_MORAGG_EMOTE_ROAR
@ SPELL_CYANIGOSA_ARCANE_POWER_STATE
@ SPELL_LAVANTHOR_SPECIAL_UNARMED
@ SPELL_CYANIGOSA_TRANSFORM
WaypointPath const ErekemGuardLeftPath
static constexpr MinionData minionData[]
static constexpr Position CyanigosaSpawnLocation
static constexpr Position PortalPositions[]
WaypointPath const XevozzPath
WaypointPath const ErekemGuardRightPath
Position const DefenseSystemLocation
static constexpr ObjectData gameObjectData[]
static constexpr Position SaboteurSpawnLocation
WaypointPath const LavanthorPath
static constexpr DungeonEncounterData encounters[]
static constexpr uint32 EncouterPortalsCount
WaypointPath const ErekemPath
WaypointPath const MoraggPath
static constexpr Position CyanigosaJumpLocation
WaypointPath const IchoronPath
static constexpr Position PortalElitePositions[]
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
@ GO_XEVOZZ_DOOR
@ GO_ICHORON_DOOR
@ GO_ACTIVATION_CRYSTAL
@ GO_LAVANTHOR_DOOR
@ GO_EREKEM_DOOR
@ GO_MORAGG_DOOR
@ GO_ZURAMAT_DOOR
@ GO_EREKEM_GUARD_2_DOOR
@ GO_EREKEM_GUARD_1_DOOR
@ GO_MAIN_DOOR
@ 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
@ WORLD_STATE_VH_PRISON_STATE
@ WORLD_STATE_VH_SHOW
@ ACTION_SINCLARI_OUTRO
#define VioletHoldScriptName
Definition violet_hold.h:25
@ NPC_EREKEM_GUARD
@ NPC_TELEPORTATION_PORTAL_INTRO
Definition violet_hold.h:94
@ NPC_SINCLARI_TRIGGER
@ NPC_DUMMY_EREKEM_GUARD
@ NPC_SABOTEOUR
@ NPC_DUMMY_ICHORON
@ NPC_LAVANTHOR
Definition violet_hold.h:98
@ NPC_EREKEM
@ NPC_MORAGG
@ NPC_CYANIGOSA
@ NPC_ICHORON
Definition violet_hold.h:99
@ NPC_ZURAMAT
@ NPC_SINCLARI
@ NPC_DEFENSE_SYSTEM
@ NPC_DUMMY_ZURAMAT
@ NPC_XEVOZZ
Definition violet_hold.h:97
@ NPC_DUMMY_MORAGG
@ NPC_DUMMY_XEVOZZ
@ NPC_DUMMY_LAVANTHOR
@ NPC_DUMMY_EREKEM
@ NPC_TELEPORTATION_PORTAL
Definition violet_hold.h:92
@ NPC_TELEPORTATION_PORTAL_ELITE
Definition violet_hold.h:93
@ POINT_INTRO
Definition zulaman.cpp:64