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 "GameObject.h"
20#include "InstanceScript.h"
21#include "Map.h"
22#include "MotionMaster.h"
23#include "Player.h"
24#include "ScriptedCreature.h"
25#include "ScriptMgr.h"
26#include "TemporarySummon.h"
27#include "WorldStatePackets.h"
28
29/*
30 * TODO:
31 * - replace bosses by dummy npcs also after grid unload
32 */
33
34Position const DefenseSystemLocation = { 1888.146f, 803.382f, 58.60389f, 3.071779f }; // sniff
35
36Position const CyanigosaSpawnLocation = { 1922.109f, 804.4493f, 52.49254f, 3.176499f }; // sniff
37Position const CyanigosaJumpLocation = { 1888.32f, 804.473f, 38.3578f, 0.0f }; // sniff
38
39Position const SaboteurSpawnLocation = { 1886.251f, 803.0743f, 38.42326f, 3.211406f }; // sniff
40
43{
44 { 1877.523f, 850.1788f, 45.36822f, 4.34587f }, // 0
45 { 1890.679f, 753.4202f, 48.771f, 1.675516f }, // 1
46 { 1936.09f, 803.1875f, 54.09715f, 3.054326f }, // 2
47 { 1858.243f, 770.2379f, 40.42146f, 0.9075712f }, // 3
48 { 1907.288f, 831.1111f, 40.22015f, 3.560472f } // 4
49};
50
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
61{
62 { 1877.51f, 850.1042f, 44.65989f, 4.782202f }, // 0 - Intro
63 { 1890.637f, 753.4705f, 48.72239f, 1.710423f }, // 1 - Intro
64 { 1936.073f, 803.1979f, 53.37491f, 3.124139f }, // 2 - Intro
65 { 1886.545f, 803.2014f, 40.40931f, 3.159046f }, // 3 - Boss 1/2
66 { 1924.096f, 804.3707f, 54.29256f, 3.228859f } // 4 - Boss 3
67};
68
70
73{
74 { 1893.895f, 728.1261f, 47.75016f },
75 { 1892.997f, 738.4987f, 47.66684f },
76 { 1889.76f, 758.1089f, 47.66684f }
77};
78
81{
82 { 1871.456f, 871.0361f, 43.41524f },
83 { 1874.948f, 859.5452f, 43.33349f },
84 { 1877.245f, 851.967f, 43.3335f }
85};
86
89{
90 { 1853.752f, 862.4528f, 43.41614f },
91 { 1866.931f, 854.577f, 43.3335f },
92 { 1872.973f, 850.7875f, 43.3335f }
93};
94
97{
98 { 1892.418f, 872.2831f, 43.41563f },
99 { 1885.639f, 859.0245f, 43.3335f },
100 { 1882.432f, 852.2423f, 43.3335f }
101};
102
105{
106 { 1942.041f, 749.5228f, 30.95229f },
107 { 1930.571f, 762.9065f, 31.98814f },
108 { 1923.657f, 770.6718f, 34.07256f },
109 { 1910.631f, 784.4096f, 37.09015f },
110 { 1906.595f, 788.3828f, 37.99429f }
111};
112
115{
116 { 1844.557f, 748.7083f, 38.74205f },
117 { 1854.618f, 761.5295f, 38.65631f },
118 { 1862.17f, 773.2255f, 38.74879f }
119};
120
123{
124 { 1908.417f, 845.8502f, 38.71947f },
125 { 1905.557f, 841.3157f, 38.65529f },
126 { 1899.453f, 832.533f, 38.70752f }
127};
128
131{
132 { 1934.151f, 860.9463f, 47.29499f },
133 { 1927.085f, 852.1342f, 47.19214f },
134 { 1923.226f, 847.3297f, 47.15541f }
135};
136
147
156
170
184
186{
188 { 0, 0, } // END
189};
190
192{
193 public:
195
197 {
216
217 void OnCreatureCreate(Creature* creature) override
218 {
220
221 switch (creature->GetEntry())
222 {
223 case NPC_EREKEM_GUARD:
224 for (uint8 i = 0; i < ErekemGuardCount; ++i)
225 if (ErekemGuardGUIDs[i].IsEmpty())
226 {
227 ErekemGuardGUIDs[i] = creature->GetGUID();
228 break;
229 }
230 break;
231 default:
232 break;
233 }
234 }
235
236 void OnCreatureRemove(Creature* creature) override
237 {
239
240 switch (creature->GetEntry())
241 {
242 case NPC_EREKEM_GUARD:
243 for (uint8 i = 0; i < ErekemGuardCount; ++i)
244 if (ErekemGuardGUIDs[i] == creature->GetGUID())
245 {
247 break;
248 }
249 break;
250 default:
251 break;
252 }
253 }
254
256 {
258
259 switch (go->GetEntry())
260 {
262 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
263 if (ActivationCrystalGUIDs[i].IsEmpty())
264 {
266 break;
267 }
268 break;
269 default:
270 break;
271 }
272 }
273
275 {
277
278 switch (go->GetEntry())
279 {
281 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
282 if (ActivationCrystalGUIDs[i] == go->GetGUID())
283 {
285 break;
286 }
287 break;
288 default:
289 break;
290 }
291 }
292
299
300 bool CheckRequiredBosses(uint32 bossId, Player const* player = nullptr) const override
301 {
302 if (_SkipCheckRequiredBosses(player))
303 return true;
304
305 switch (bossId)
306 {
307 case DATA_MORAGG:
308 case DATA_EREKEM:
309 case DATA_ICHORON:
310 case DATA_LAVANTHOR:
311 case DATA_XEVOZZ:
312 case DATA_ZURAMAT:
314 if (!(WaveCount == 6 && FirstBossId == bossId) && !(WaveCount == 12 && SecondBossId == bossId))
315 return false;
316 break;
317 case DATA_CYANIGOSA:
318 if (WaveCount < 18)
319 return false;
320 break;
321 default:
322 break;
323 }
324
325 return true;
326 }
327
328 bool SetBossState(uint32 type, EncounterState state) override
329 {
330 if (!InstanceScript::SetBossState(type, state))
331 return false;
332
333 switch (type)
334 {
335 case DATA_1ST_BOSS:
336 if (state == DONE)
338 break;
339 case DATA_2ND_BOSS:
340 if (state == DONE)
342 break;
343 case DATA_CYANIGOSA:
344 if (state == DONE)
346 break;
347 case DATA_MORAGG:
348 case DATA_EREKEM:
349 case DATA_ICHORON:
350 case DATA_LAVANTHOR:
351 case DATA_XEVOZZ:
352 case DATA_ZURAMAT:
353 // this won't work correctly because bossstate was initializd with TO_BE_DECIDED
354 if (WaveCount == 6)
356 else if (WaveCount == 12)
358
359 if (state == DONE)
361 break;
362 default:
363 break;
364 }
365
366 return true;
367 }
368
369 void SetData(uint32 type, uint32 data) override
370 {
371 switch (type)
372 {
373 case DATA_WAVE_COUNT:
374 WaveCount = data;
375 if (WaveCount)
376 {
377 Scheduler.Schedule(Seconds(IsBossWave(WaveCount - 1) ? 45 : 5), [this](TaskContext /*task*/)
378 {
379 AddWave();
380 });
381 }
382 break;
384 DoorIntegrity = data;
385 Defenseless = false;
387 break;
389 switch (WaveCount)
390 {
391 case 6:
393 break;
394 case 12:
396 break;
397 }
398 break;
400 EventState = data;
401 if (data == IN_PROGRESS) // Start event
402 {
406
407 WaveCount = 1;
409
410 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
412 crystal->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
413
414 Scheduler.Schedule(3s, [this](TaskContext task)
415 {
417 task.Repeat(3s);
418 });
419 }
420 else if (data == NOT_STARTED)
421 {
422 if (GameObject* mainDoor = GetGameObject(DATA_MAIN_DOOR))
423 {
424 mainDoor->SetGoState(GO_STATE_ACTIVE);
425 mainDoor->RemoveFlag(GO_FLAG_LOCKED);
426 }
427
431
432 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
434 crystal->SetFlag(GO_FLAG_NOT_SELECTABLE);
435 }
436 else if (data == DONE)
437 {
438 if (GameObject* mainDoor = GetGameObject(DATA_MAIN_DOOR))
439 {
440 mainDoor->SetGoState(GO_STATE_ACTIVE);
441 mainDoor->RemoveFlag(GO_FLAG_LOCKED);
442 }
443
445
446 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
448 crystal->SetFlag(GO_FLAG_NOT_SELECTABLE);
449
450 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
451 sinclari->AI()->DoAction(ACTION_SINCLARI_OUTRO);
452 }
453 break;
455 HandleCells(data, false);
456 break;
457 }
458 }
459
460 uint32 GetData(uint32 type) const override
461 {
462 switch (type)
463 {
464 case DATA_1ST_BOSS:
465 return FirstBossId;
466 case DATA_2ND_BOSS:
467 return SecondBossId;
469 return EventState;
470 case DATA_WAVE_COUNT:
471 return WaveCount;
473 return DoorIntegrity;
474 case DATA_DEFENSELESS:
475 return Defenseless ? 1 : 0;
476 default:
477 break;
478 }
479
480 return 0;
481 }
482
483 ObjectGuid GetGuidData(uint32 type) const override
484 {
485 switch (type)
486 {
490 default:
491 break;
492 }
493
494 return InstanceScript::GetGuidData(type);
495 }
496
514
515 void HandleCells(uint8 bossId, bool open = true)
516 {
517 switch (bossId)
518 {
519 case DATA_MORAGG:
521 break;
522 case DATA_EREKEM:
526 break;
527 case DATA_ICHORON:
529 break;
530 case DATA_LAVANTHOR:
532 break;
533 case DATA_XEVOZZ:
535 break;
536 case DATA_ZURAMAT:
538 break;
539 default:
540 break;
541 }
542 }
543
545 {
546 switch (bossId)
547 {
548 case DATA_MORAGG:
549 Scheduler.Schedule(2s, [this](TaskContext task)
550 {
551 if (Creature* moragg = GetCreature(DATA_MORAGG))
552 {
553 moragg->PlayDirectSound(SOUND_MORAGG_SPAWN);
554 moragg->CastSpell(moragg, SPELL_MORAGG_EMOTE_ROAR);
555 }
556
557 task.Schedule(3s, [this](TaskContext task)
558 {
559 if (Creature* moragg = GetCreature(DATA_MORAGG))
560 moragg->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, MoraggPath, MoraggPathSize, true);
561
562 task.Schedule(8s, [this](TaskContext /*task*/)
563 {
564 if (Creature* moragg = GetCreature(DATA_MORAGG))
565 {
566 moragg->SetImmuneToAll(false);
567 moragg->AI()->DoZoneInCombat(moragg);
568 }
569 });
570 });
571 });
572 break;
573 case DATA_EREKEM:
574 Scheduler.Schedule(3s, [this](TaskContext task)
575 {
576 if (Creature* erekem = GetCreature(DATA_EREKEM))
577 erekem->AI()->Talk(SAY_EREKEM_SPAWN);
578
579 task.Schedule(5s, [this](TaskContext task)
580 {
581 if (Creature* erekem = GetCreature(DATA_EREKEM))
582 erekem->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, ErekemPath, ErekemPathSize, true);
583
585 guard->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, ErekemGuardLeftPath, ErekemGuardLeftPathSize, true);
587 guard->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, ErekemGuardRightPath, ErekemGuardRightPathSize, true);
588
589 task.Schedule(6s, [this](TaskContext task)
590 {
591 if (Creature* erekem = GetCreature(DATA_EREKEM))
592 erekem->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
593
594 task.Schedule(1s, [this](TaskContext /*task*/)
595 {
597 {
598 if (Creature* guard = instance->GetCreature(GetGuidData(i)))
599 guard->SetImmuneToAll(false);
600 }
601
602 if (Creature* erekem = GetCreature(DATA_EREKEM))
603 {
604 erekem->SetImmuneToAll(false);
605 erekem->AI()->DoZoneInCombat(erekem);
606 }
607 });
608 });
609 });
610 });
611 break;
612 case DATA_ICHORON:
613 Scheduler.Schedule(2s, [this](TaskContext task)
614 {
615 if (Creature* ichoron = GetCreature(DATA_ICHORON))
616 ichoron->AI()->Talk(SAY_ICHORON_SPAWN);
617
618 task.Schedule(3s, [this](TaskContext task)
619 {
620 if (Creature* ichoron = GetCreature(DATA_ICHORON))
621 ichoron->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, IchoronPath, IchoronPathSize, true);
622
623 task.Schedule(14s, [this](TaskContext /*task*/)
624 {
625 if (Creature* ichoron = GetCreature(DATA_ICHORON))
626 {
627 ichoron->SetImmuneToAll(false);
628 ichoron->AI()->DoZoneInCombat(ichoron);
629 }
630 });
631 });
632 });
633 break;
634 case DATA_LAVANTHOR:
635 Scheduler.Schedule(1s, [this](TaskContext task)
636 {
637 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
638 lavanthor->CastSpell(lavanthor, SPELL_LAVANTHOR_SPECIAL_UNARMED);
639
640 task.Schedule(3s, [this](TaskContext task)
641 {
642 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
643 lavanthor->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, LavanthorPath, LavanthorPathSize, true);
644
645 task.Schedule(8s, [this](TaskContext /*task*/)
646 {
647 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
648 {
649 lavanthor->SetImmuneToAll(false);
650 lavanthor->AI()->DoZoneInCombat(lavanthor);
651 }
652 });
653 });
654 });
655 break;
656 case DATA_XEVOZZ:
657 Scheduler.Schedule(2s, [this](TaskContext task)
658 {
659 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
660 xevozz->AI()->Talk(SAY_XEVOZZ_SPAWN);
661
662 task.Schedule(3s, [this](TaskContext task)
663 {
664 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
665 xevozz->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NO_SHEATHE);
666
667 task.Schedule(4s, [this](TaskContext task)
668 {
669 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
670 xevozz->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, XevozzPath, XevozzPathSize, true);
671
672 task.Schedule(4s, [this](TaskContext /*task*/)
673 {
674 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
675 {
676 xevozz->SetImmuneToAll(false);
677 xevozz->AI()->DoZoneInCombat(xevozz);
678 }
679 });
680 });
681 });
682 });
683 break;
684 case DATA_ZURAMAT:
685 Scheduler.Schedule(2s, [this](TaskContext task)
686 {
687 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
688 {
689 zuramat->CastSpell(zuramat, SPELL_ZURAMAT_COSMETIC_CHANNEL_OMNI);
690 zuramat->AI()->Talk(SAY_ZURAMAT_SPAWN);
691 }
692
693 task.Schedule(6s, [this](TaskContext task)
694 {
695 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
696 zuramat->GetMotionMaster()->MoveSmoothPath(POINT_INTRO, ZuramatPath, ZuramatPathSize, true);
697
698 task.Schedule(4s, [this](TaskContext /*task*/)
699 {
700 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
701 {
702 zuramat->SetImmuneToAll(false);
703 zuramat->AI()->DoZoneInCombat(zuramat);
704 }
705 });
706 });
707 });
708 break;
709 default:
710 return;
711 }
712
713 HandleCells(bossId);
714 }
715
717 {
718 if (bossId < DATA_CYANIGOSA || bossId > DATA_ZURAMAT)
719 return;
720
721 Creature* boss = GetCreature(bossId);
722 if (!boss)
723 return;
724
725 switch (bossId)
726 {
727 case DATA_CYANIGOSA:
728 boss->DespawnOrUnsummon();
729 break;
730 case DATA_EREKEM:
732 {
733 if (Creature* guard = instance->GetCreature(GetGuidData(i)))
734 {
735 if (guard->isDead())
736 guard->Respawn();
737
738 if (GetBossState(bossId) == DONE)
739 UpdateKilledBoss(guard);
740
741 guard->GetMotionMaster()->MoveTargetedHome();
742 guard->SetImmuneToAll(true);
743 }
744 }
745 [[fallthrough]];
746 default:
747 if (boss->isDead())
748 {
749 // respawn and update to a placeholder npc to avoid be looted again
750 boss->Respawn();
751 UpdateKilledBoss(boss);
752 }
753
755 boss->SetImmuneToAll(true);
756 break;
757 }
758 }
759
760 void AddWave()
761 {
763
764 switch (WaveCount)
765 {
766 case 6:
767 if (FirstBossId == 0)
769 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
770 {
773 }
774 break;
775 case 12:
776 if (SecondBossId == 0)
777 do
778 {
780 } while (SecondBossId == FirstBossId);
781 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
782 {
785 }
786 break;
787 case 18:
788 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
789 {
792 cyanigosa->CastSpell(cyanigosa, SPELL_CYANIGOSA_ARCANE_POWER_STATE, true);
794 }
795 break;
796 default:
797 SpawnPortal();
798 break;
799 }
800 }
801
802 void WriteSaveDataMore(std::ostringstream& data) override
803 {
804 data << FirstBossId << ' ' << SecondBossId;
805 }
806
807 void ReadSaveDataMore(std::istringstream& data) override
808 {
809 data >> FirstBossId;
810 data >> SecondBossId;
811 }
812
813 bool CheckWipe() const
814 {
815 Map::PlayerList const& players = instance->GetPlayers();
816 for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
817 {
818 Player* player = itr->GetSource();
819 if (player->IsGameMaster())
820 continue;
821
822 if (player->IsAlive())
823 return false;
824 }
825
826 return true;
827 }
828
830 {
831 switch (boss->GetEntry())
832 {
833 case NPC_XEVOZZ:
835 break;
836 case NPC_LAVANTHOR:
838 break;
839 case NPC_ICHORON:
841 break;
842 case NPC_ZURAMAT:
844 break;
845 case NPC_EREKEM:
847 break;
848 case NPC_MORAGG:
850 break;
851 case NPC_EREKEM_GUARD:
853 break;
854 default:
855 break;
856 }
857 }
858
859 void Update(uint32 diff) override
860 {
861 // if we don't have any player in the instance
862 if (!instance->HavePlayers())
863 {
864 if (EventState == IN_PROGRESS) // if event is in progress, mark as fail
865 {
868 }
869 return;
870 }
871
872 Scheduler.Update(diff);
873
874 if (EventState == IN_PROGRESS)
875 {
876 // if door is destroyed, event is failed
879 }
880 }
881
883 {
884 // if main event is in progress and players have wiped then reset instance
885 if ((EventState == IN_PROGRESS && CheckWipe()) || EventState == FAIL)
886 {
890
891 WaveCount = 0;
892 DoorIntegrity = 100;
893 Defenseless = true;
895
897
898 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
899 sinclari->AI()->EnterEvadeMode();
900 }
901 }
902
904 {
905 Scheduler.Schedule(2s, [this](TaskContext task)
906 {
907 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
908 cyanigosa->AI()->Talk(SAY_CYANIGOSA_SPAWN);
909
910 task.Schedule(6s, [this](TaskContext task)
911 {
912 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
913 cyanigosa->GetMotionMaster()->MoveJump(CyanigosaJumpLocation, 10.0f, 27.44744f);
914
915 task.Schedule(7s, [this](TaskContext /*task*/)
916 {
917 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
918 {
919 cyanigosa->RemoveAurasDueToSpell(SPELL_CYANIGOSA_ARCANE_POWER_STATE);
920 cyanigosa->CastSpell(cyanigosa, SPELL_CYANIGOSA_TRANSFORM, true);
921 cyanigosa->SetImmuneToAll(false);
922 }
923 });
924 });
925 });
926 }
927
928 void ProcessEvent(WorldObject* /*go*/, uint32 eventId) override
929 {
930 if (eventId == EVENT_ACTIVATE_CRYSTAL)
931 {
933 Defenseless = false;
934 }
935 }
936
937 static bool IsBossWave(uint8 wave)
938 {
939 return wave && ((wave % 6) == 0);
940 }
941
942 protected:
944
945 static uint8 const ErekemGuardCount = 2;
947
950
953
958
960 };
961
963 {
965 }
966};
967
uint8_t uint8
Definition Define.h:135
uint32_t uint32
Definition Define.h:133
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition Duration.h:27
EncounterState
@ IN_PROGRESS
@ FAIL
@ DONE
@ NOT_STARTED
@ TEMPSUMMON_DEAD_DESPAWN
@ TEMPSUMMON_TIMED_DESPAWN
@ TEMPSUMMON_CORPSE_DESPAWN
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
@ EMOTE_ONESHOT_ROAR
@ EMOTE_ONESHOT_TALK_NO_SHEATHE
@ GO_FLAG_NOT_SELECTABLE
@ GO_FLAG_LOCKED
@ GO_STATE_ACTIVE
#define DataHeader
uint32 const EncounterCount
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:540
void SetImmuneToAll(bool apply) override
Definition Creature.h:126
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)
virtual void OnCreatureRemove(Creature *creature) override
virtual ObjectGuid GetGuidData(uint32 type) const override
virtual void OnGameObjectRemove(GameObject *go) override
InstanceMap * instance
void UpdateEncounterStateForKilledCreature(uint32 creatureId, Unit *source)
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 DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
void SetHeaders(std::string const &dataHeaders)
ObjectGuid GetObjectGuid(uint32 type) const
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
iterator end()
iterator begin()
bool HavePlayers() const
Definition Map.h:437
GameObject * GetGameObject(ObjectGuid const &guid)
Definition Map.cpp:4430
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition Object.cpp:1852
PlayerList const & GetPlayers() const
Definition Map.h:448
Creature * GetCreature(ObjectGuid const &guid)
Definition Map.cpp:4397
void MoveTargetedHome()
void Clear()
Definition ObjectGuid.h:150
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
bool IsGameMaster() const
Definition Player.h:998
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
TaskContext & Schedule(std::chrono::duration< _Rep, _Period > const &time, TaskScheduler::task_handler_t const &task)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Async(std::function< void()> const &callable)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
bool IsAlive() const
Definition Unit.h:1234
bool isDead() const
Definition Unit.h:1236
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:1992
std::vector< WorldStateInfo > Worldstates
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
void AddSC_instance_violet_hold()
ObjectData const creatureData[]
uint32 const PortalIntroPositionsSize
uint32 const ErekemPathSize
Position const PortalElitePositions[PortalElitePositionsSize]
uint32 const ErekemGuardRightPathSize
uint32 const ErekemGuardLeftPathSize
MinionData const minionData[]
Position const ErekemGuardLeftPath[ErekemGuardLeftPathSize]
Position const IchoronPath[IchoronPathSize]
Position const CyanigosaSpawnLocation
@ SAY_ICHORON_SPAWN
@ SAY_CYANIGOSA_SPAWN
@ SAY_ZURAMAT_SPAWN
@ SOUND_MORAGG_SPAWN
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
Position const MoraggPath[MoraggPathSize]
Position const ErekemGuardRightPath[ErekemGuardRightPathSize]
Position const LavanthorPath[LavanthorPathSize]
@ SPELL_ZURAMAT_COSMETIC_CHANNEL_OMNI
@ SPELL_MORAGG_EMOTE_ROAR
@ SPELL_CYANIGOSA_ARCANE_POWER_STATE
@ SPELL_LAVANTHOR_SPECIAL_UNARMED
@ SPELL_CYANIGOSA_TRANSFORM
bool SetBossState(uint32 type, EncounterState state) override
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates &packet) override
void ProcessEvent(WorldObject *, uint32 eventId) 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:55
@ DATA_EREKEM_LEFT_GUARD_CELL
Definition violet_hold.h:75
@ DATA_MAIN_EVENT_STATE
Definition violet_hold.h:61
@ DATA_HANDLE_CELLS
Definition violet_hold.h:86
@ DATA_ZURAMAT
Definition violet_hold.h:58
@ DATA_ZURAMAT_CELL
Definition violet_hold.h:80
@ DATA_LAVANTHOR_CELL
Definition violet_hold.h:78
@ DATA_XEVOZZ
Definition violet_hold.h:57
@ DATA_2ND_BOSS
Definition violet_hold.h:50
@ DATA_1ST_BOSS
Definition violet_hold.h:49
@ DATA_SINCLARI_TRIGGER
Definition violet_hold.h:85
@ DATA_EREKEM_GUARD_2
Definition violet_hold.h:70
@ DATA_MAIN_DOOR
Definition violet_hold.h:83
@ DATA_CYANIGOSA
Definition violet_hold.h:51
@ DATA_EREKEM_CELL
Definition violet_hold.h:74
@ DATA_XEVOZZ_CELL
Definition violet_hold.h:79
@ DATA_EREKEM
Definition violet_hold.h:54
@ DATA_LAVANTHOR
Definition violet_hold.h:56
@ DATA_PORTAL_LOCATION
Definition violet_hold.h:64
@ DATA_DOOR_INTEGRITY
Definition violet_hold.h:63
@ DATA_EREKEM_GUARD_1
Definition violet_hold.h:69
@ DATA_DEFENSELESS
Definition violet_hold.h:66
@ DATA_SINCLARI
Definition violet_hold.h:84
@ DATA_START_BOSS_ENCOUNTER
Definition violet_hold.h:65
@ DATA_EREKEM_RIGHT_GUARD_CELL
Definition violet_hold.h:76
@ DATA_MORAGG_CELL
Definition violet_hold.h:73
@ DATA_ICHORON_CELL
Definition violet_hold.h:77
@ DATA_MORAGG
Definition violet_hold.h:53
@ WORLD_STATE_VH_WAVE_COUNT
@ WORLD_STATE_VH_PRISON_STATE
@ WORLD_STATE_VH_SHOW
@ ACTION_SINCLARI_OUTRO
@ POINT_INTRO
#define VioletHoldScriptName
Definition violet_hold.h:24
@ NPC_EREKEM_GUARD
@ NPC_TELEPORTATION_PORTAL_INTRO
Definition violet_hold.h:93
@ NPC_SINCLARI_TRIGGER
@ NPC_DUMMY_EREKEM_GUARD
@ NPC_SABOTEOUR
@ NPC_DUMMY_ICHORON
@ NPC_LAVANTHOR
Definition violet_hold.h:97
@ NPC_EREKEM
@ NPC_MORAGG
@ NPC_CYANIGOSA
@ NPC_ICHORON
Definition violet_hold.h:98
@ NPC_ZURAMAT
@ NPC_SINCLARI
@ NPC_DEFENSE_SYSTEM
@ NPC_DUMMY_ZURAMAT
@ NPC_XEVOZZ
Definition violet_hold.h:96
@ NPC_DUMMY_MORAGG
@ NPC_DUMMY_XEVOZZ
@ NPC_DUMMY_LAVANTHOR
@ NPC_DUMMY_EREKEM
@ NPC_TELEPORTATION_PORTAL
Definition violet_hold.h:91
@ NPC_TELEPORTATION_PORTAL_ELITE
Definition violet_hold.h:92