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 "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
38Position const CyanigosaSpawnLocation = { 1922.109f, 804.4493f, 52.49254f, 3.176499f }; // sniff
39Position const CyanigosaJumpLocation = { 1888.32f, 804.473f, 38.3578f, 0.0f }; // sniff
40
41Position const SaboteurSpawnLocation = { 1886.251f, 803.0743f, 38.42326f, 3.211406f }; // sniff
42
45{
46 { 1877.523f, 850.1788f, 45.36822f, 4.34587f }, // 0
47 { 1890.679f, 753.4202f, 48.771f, 1.675516f }, // 1
48 { 1936.09f, 803.1875f, 54.09715f, 3.054326f }, // 2
49 { 1858.243f, 770.2379f, 40.42146f, 0.9075712f }, // 3
50 { 1907.288f, 831.1111f, 40.22015f, 3.560472f } // 4
51};
52
55{
56 { 1911.281f, 800.9722f, 39.91673f, 3.01942f }, // 5
57 { 1926.516f, 763.6616f, 52.35725f, 2.251475f }, // 6
58 { 1922.464f, 847.0699f, 48.50161f, 3.961897f } // 7
59};
60
63{
64 { 1877.51f, 850.1042f, 44.65989f, 4.782202f }, // 0 - Intro
65 { 1890.637f, 753.4705f, 48.72239f, 1.710423f }, // 1 - Intro
66 { 1936.073f, 803.1979f, 53.37491f, 3.124139f }, // 2 - Intro
67 { 1886.545f, 803.2014f, 40.40931f, 3.159046f }, // 3 - Boss 1/2
68 { 1924.096f, 804.3707f, 54.29256f, 3.228859f } // 4 - Boss 3
69};
70
72
73WaypointPath const MoraggPath = // sniff
74{
76 {
77 { 0, 1893.895f, 728.1261f, 47.75016f },
78 { 1, 1892.997f, 738.4987f, 47.66684f },
79 { 2, 1889.76f, 758.1089f, 47.66684f }
80 },
82};
83
84WaypointPath const ErekemPath = // sniff
85{
87 {
88 { 0, 1871.456f, 871.0361f, 43.41524f },
89 { 1, 1874.948f, 859.5452f, 43.33349f },
90 { 2, 1877.245f, 851.967f, 43.3335f, 4.921828f }
91 },
93};
94
96{
98 {
99 { 0, 1853.752f, 862.4528f, 43.41614f },
100 { 1, 1866.931f, 854.577f, 43.3335f },
101 { 2, 1872.973f, 850.7875f, 43.3335f }
102 },
104};
105
107{
109 {
110 { 0, 1892.418f, 872.2831f, 43.41563f },
111 { 1, 1885.639f, 859.0245f, 43.3335f },
112 { 2, 1882.432f, 852.2423f, 43.3335f }
113 },
115};
116
117WaypointPath const IchoronPath = // sniff
118{
120 {
121 { 0, 1942.041f, 749.5228f, 30.95229f },
122 { 1, 1930.571f, 762.9065f, 31.98814f },
123 { 2, 1923.657f, 770.6718f, 34.07256f },
124 { 3, 1910.631f, 784.4096f, 37.09015f },
125 { 4, 1906.595f, 788.3828f, 37.99429f }
126 },
128};
129
131{
133 {
134 { 0, 1844.557f, 748.7083f, 38.74205f },
135 { 1, 1854.618f, 761.5295f, 38.65631f },
136 { 2, 1862.17f, 773.2255f, 38.74879f }
137 },
139};
140
141WaypointPath const XevozzPath = // sniff
142{
144 {
145 { 0, 1908.417f, 845.8502f, 38.71947f },
146 { 1, 1905.557f, 841.3157f, 38.65529f },
147 { 2, 1899.453f, 832.533f, 38.70752f }
148 },
150};
151
152WaypointPath const ZuramatPath = // sniff
153{
155 {
156 { 0, 1934.151f, 860.9463f, 47.29499f },
157 { 1, 1927.085f, 852.1342f, 47.19214f },
158 { 2, 1923.226f, 847.3297f, 47.15541f }
159 },
161};
162
164{
170
171 SOUND_MORAGG_SPAWN = 10112
173
175{
182
184{
194 { 0, 0 } // END
195};
196
198{
208 { 0, 0 } // END
209};
210
212{
214 { 0, 0 } // END
215};
216
218{
219 { DATA_1ST_BOSS, {{ 2019 }} },
220 { DATA_2ND_BOSS, {{ 2018 }} },
221 { DATA_CYANIGOSA, {{ 2020 }} }
222};
223
225{
226 public:
228
230 {
232 FirstBossId(*this, "FirstBossId", 0),
233 SecondBossId(*this, "SecondBossId", 0)
234 {
240
241 DoorIntegrity = 100;
242 WaveCount = 0;
244
246
247 Defenseless = true;
248 }
249
250 void OnCreatureCreate(Creature* creature) override
251 {
253
254 switch (creature->GetEntry())
255 {
256 case NPC_EREKEM_GUARD:
257 for (uint8 i = 0; i < ErekemGuardCount; ++i)
258 if (ErekemGuardGUIDs[i].IsEmpty())
259 {
260 ErekemGuardGUIDs[i] = creature->GetGUID();
261 break;
262 }
263 break;
264 default:
265 break;
266 }
267 }
268
269 void OnCreatureRemove(Creature* creature) override
270 {
272
273 switch (creature->GetEntry())
274 {
275 case NPC_EREKEM_GUARD:
276 for (uint8 i = 0; i < ErekemGuardCount; ++i)
277 if (ErekemGuardGUIDs[i] == creature->GetGUID())
278 {
280 break;
281 }
282 break;
283 default:
284 break;
285 }
286 }
287
289 {
291
292 switch (go->GetEntry())
293 {
295 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
296 if (ActivationCrystalGUIDs[i].IsEmpty())
297 {
299 break;
300 }
301 break;
302 default:
303 break;
304 }
305 }
306
308 {
310
311 switch (go->GetEntry())
312 {
314 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
315 if (ActivationCrystalGUIDs[i] == go->GetGUID())
316 {
318 break;
319 }
320 break;
321 default:
322 break;
323 }
324 }
325
326 bool CheckRequiredBosses(uint32 bossId, Player const* player = nullptr) const override
327 {
328 if (_SkipCheckRequiredBosses(player))
329 return true;
330
331 switch (bossId)
332 {
333 case DATA_MORAGG:
334 case DATA_EREKEM:
335 case DATA_ICHORON:
336 case DATA_LAVANTHOR:
337 case DATA_XEVOZZ:
338 case DATA_ZURAMAT:
340 if (!(WaveCount == 6 && FirstBossId == bossId) && !(WaveCount == 12 && SecondBossId == bossId))
341 return false;
342 break;
343 case DATA_CYANIGOSA:
344 if (WaveCount < 18)
345 return false;
346 break;
347 default:
348 break;
349 }
350
351 return true;
352 }
353
354 bool SetBossState(uint32 type, EncounterState state) override
355 {
356 if (!InstanceScript::SetBossState(type, state))
357 return false;
358
359 switch (type)
360 {
361 case DATA_CYANIGOSA:
362 if (state == DONE)
364 break;
365 case DATA_MORAGG:
366 case DATA_EREKEM:
367 case DATA_ICHORON:
368 case DATA_LAVANTHOR:
369 case DATA_XEVOZZ:
370 case DATA_ZURAMAT:
371 // this won't work correctly because bossstate was initializd with TO_BE_DECIDED
372 if (WaveCount == 6)
374 else if (WaveCount == 12)
376
377 if (state == DONE)
379 break;
380 default:
381 break;
382 }
383
384 return true;
385 }
386
387 void SetData(uint32 type, uint32 data) override
388 {
389 switch (type)
390 {
391 case DATA_WAVE_COUNT:
392 WaveCount = data;
393 if (WaveCount)
394 {
395 Scheduler.Schedule(Seconds(IsBossWave(WaveCount - 1) ? 45 : 5), [this](TaskContext /*task*/)
396 {
397 AddWave();
398 });
399 }
400 break;
402 DoorIntegrity = data;
403 Defenseless = false;
405 break;
407 switch (WaveCount)
408 {
409 case 6:
411 break;
412 case 12:
414 break;
415 }
416 break;
418 EventState = data;
419 if (data == IN_PROGRESS) // Start event
420 {
424
425 WaveCount = 1;
426 Scheduler.Async([this]
427 {
428 AddWave();
429 });
430
431 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
433 crystal->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
434
435 Scheduler.Schedule(Seconds(3), [this](TaskContext task)
436 {
438 task.Repeat(Seconds(3));
439 });
440 }
441 else if (data == NOT_STARTED)
442 {
443 if (GameObject* mainDoor = GetGameObject(DATA_MAIN_DOOR))
444 {
445 mainDoor->SetGoState(GO_STATE_ACTIVE);
446 mainDoor->RemoveFlag(GO_FLAG_LOCKED);
447 }
448
452
453 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
455 crystal->SetFlag(GO_FLAG_NOT_SELECTABLE);
456 }
457 else if (data == DONE)
458 {
459 if (GameObject* mainDoor = GetGameObject(DATA_MAIN_DOOR))
460 {
461 mainDoor->SetGoState(GO_STATE_ACTIVE);
462 mainDoor->RemoveFlag(GO_FLAG_LOCKED);
463 }
464
466
467 for (uint8 i = 0; i < ActivationCrystalCount; ++i)
469 crystal->SetFlag(GO_FLAG_NOT_SELECTABLE);
470
471 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
472 sinclari->AI()->DoAction(ACTION_SINCLARI_OUTRO);
473 }
474 break;
476 HandleCells(data, false);
477 break;
478 }
479 }
480
481 uint32 GetData(uint32 type) const override
482 {
483 switch (type)
484 {
485 case DATA_1ST_BOSS:
486 return FirstBossId;
487 case DATA_2ND_BOSS:
488 return SecondBossId;
490 return EventState;
491 case DATA_WAVE_COUNT:
492 return WaveCount;
494 return DoorIntegrity;
495 case DATA_DEFENSELESS:
496 return Defenseless ? 1 : 0;
497 default:
498 break;
499 }
500
501 return 0;
502 }
503
504 ObjectGuid GetGuidData(uint32 type) const override
505 {
506 switch (type)
507 {
511 default:
512 break;
513 }
514
515 return InstanceScript::GetGuidData(type);
516 }
517
519 {
521 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
522 {
524 {
526 portal->AI()->SetData(DATA_PORTAL_LOCATION, LastPortalLocation);
527 }
528 else
529 {
531 portal->AI()->SetData(DATA_PORTAL_LOCATION, LastPortalLocation);
532 }
533 }
534 }
535
536 void HandleCells(uint8 bossId, bool open = true)
537 {
538 switch (bossId)
539 {
540 case DATA_MORAGG:
542 break;
543 case DATA_EREKEM:
547 break;
548 case DATA_ICHORON:
550 break;
551 case DATA_LAVANTHOR:
553 break;
554 case DATA_XEVOZZ:
556 break;
557 case DATA_ZURAMAT:
559 break;
560 default:
561 break;
562 }
563 }
564
566 {
567 switch (bossId)
568 {
569 case DATA_MORAGG:
570 Scheduler.Schedule(Seconds(2), [this](TaskContext task)
571 {
572 if (Creature* moragg = GetCreature(DATA_MORAGG))
573 {
574 moragg->PlayDirectSound(SOUND_MORAGG_SPAWN);
575 moragg->CastSpell(moragg, SPELL_MORAGG_EMOTE_ROAR);
576 }
577
578 task.Schedule(Seconds(3), [this](TaskContext task)
579 {
580 if (Creature* moragg = GetCreature(DATA_MORAGG))
581 moragg->GetMotionMaster()->MovePath(MoraggPath, false);
582
583 task.Schedule(Seconds(8), [this](TaskContext /*task*/)
584 {
585 if (Creature* moragg = GetCreature(DATA_MORAGG))
586 {
587 moragg->SetImmuneToAll(false);
588 moragg->AI()->DoZoneInCombat(moragg);
589 }
590 });
591 });
592 });
593 break;
594 case DATA_EREKEM:
595 Scheduler.Schedule(Seconds(3), [this](TaskContext task)
596 {
597 if (Creature* erekem = GetCreature(DATA_EREKEM))
598 erekem->AI()->Talk(SAY_EREKEM_SPAWN);
599
600 task.Schedule(Seconds(5), [this](TaskContext task)
601 {
602 if (Creature* erekem = GetCreature(DATA_EREKEM))
603 erekem->GetMotionMaster()->MovePath(ErekemPath, false);
604
606 guard->GetMotionMaster()->MovePath(ErekemGuardLeftPath, false);
608 guard->GetMotionMaster()->MovePath(ErekemGuardRightPath, false);
609
610 task.Schedule(Seconds(6), [this](TaskContext task)
611 {
612 if (Creature* erekem = GetCreature(DATA_EREKEM))
613 erekem->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
614
615 task.Schedule(Seconds(1), [this](TaskContext /*task*/)
616 {
618 {
619 if (Creature* guard = instance->GetCreature(GetGuidData(i)))
620 guard->SetImmuneToAll(false);
621 }
622
623 if (Creature* erekem = GetCreature(DATA_EREKEM))
624 {
625 erekem->SetImmuneToAll(false);
626 erekem->AI()->DoZoneInCombat(erekem);
627 }
628 });
629 });
630 });
631 });
632 break;
633 case DATA_ICHORON:
634 Scheduler.Schedule(Seconds(2), [this](TaskContext task)
635 {
636 if (Creature* ichoron = GetCreature(DATA_ICHORON))
637 ichoron->AI()->Talk(SAY_ICHORON_SPAWN);
638
639 task.Schedule(Seconds(3), [this](TaskContext task)
640 {
641 if (Creature* ichoron = GetCreature(DATA_ICHORON))
642 ichoron->GetMotionMaster()->MovePath(IchoronPath, false);
643
644 task.Schedule(Seconds(14), [this](TaskContext /*task*/)
645 {
646 if (Creature* ichoron = GetCreature(DATA_ICHORON))
647 {
648 ichoron->SetImmuneToAll(false);
649 ichoron->AI()->DoZoneInCombat(ichoron);
650 }
651 });
652 });
653 });
654 break;
655 case DATA_LAVANTHOR:
656 Scheduler.Schedule(Seconds(1), [this](TaskContext task)
657 {
658 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
659 lavanthor->CastSpell(lavanthor, SPELL_LAVANTHOR_SPECIAL_UNARMED);
660
661 task.Schedule(Seconds(3), [this](TaskContext task)
662 {
663 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
664 lavanthor->GetMotionMaster()->MovePath(LavanthorPath, false);
665
666 task.Schedule(Seconds(8), [this](TaskContext /*task*/)
667 {
668 if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
669 {
670 lavanthor->SetImmuneToAll(false);
671 lavanthor->AI()->DoZoneInCombat(lavanthor);
672 }
673 });
674 });
675 });
676 break;
677 case DATA_XEVOZZ:
678 Scheduler.Schedule(Seconds(2), [this](TaskContext task)
679 {
680 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
681 xevozz->AI()->Talk(SAY_XEVOZZ_SPAWN);
682
683 task.Schedule(Seconds(3), [this](TaskContext task)
684 {
685 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
686 xevozz->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NO_SHEATHE);
687
688 task.Schedule(Seconds(4), [this](TaskContext task)
689 {
690 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
691 xevozz->GetMotionMaster()->MovePath(XevozzPath, false);
692
693 task.Schedule(Seconds(4), [this](TaskContext /*task*/)
694 {
695 if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
696 {
697 xevozz->SetImmuneToAll(false);
698 xevozz->AI()->DoZoneInCombat(xevozz);
699 }
700 });
701 });
702 });
703 });
704 break;
705 case DATA_ZURAMAT:
706 Scheduler.Schedule(Seconds(2), [this](TaskContext task)
707 {
708 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
709 {
710 zuramat->CastSpell(zuramat, SPELL_ZURAMAT_COSMETIC_CHANNEL_OMNI);
711 zuramat->AI()->Talk(SAY_ZURAMAT_SPAWN);
712 }
713
714 task.Schedule(Seconds(6), [this](TaskContext task)
715 {
716 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
717 zuramat->GetMotionMaster()->MovePath(ZuramatPath, false);
718
719 task.Schedule(Seconds(4), [this](TaskContext /*task*/)
720 {
721 if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
722 {
723 zuramat->SetImmuneToAll(false);
724 zuramat->AI()->DoZoneInCombat(zuramat);
725 }
726 });
727 });
728 });
729 break;
730 default:
731 return;
732 }
733
734 HandleCells(bossId);
735 }
736
738 {
739 if (bossId < DATA_CYANIGOSA || bossId > DATA_ZURAMAT)
740 return;
741
742 Creature* boss = GetCreature(bossId);
743 if (!boss)
744 return;
745
746 switch (bossId)
747 {
748 case DATA_CYANIGOSA:
749 boss->DespawnOrUnsummon();
750 break;
751 case DATA_EREKEM:
753 {
754 if (Creature* guard = instance->GetCreature(GetGuidData(i)))
755 {
756 if (guard->isDead())
757 guard->Respawn();
758
759 if (GetBossState(bossId) == DONE)
760 UpdateKilledBoss(guard);
761
762 guard->GetMotionMaster()->MoveTargetedHome();
763 guard->SetImmuneToAll(true);
764 }
765 }
766 [[fallthrough]];
767 default:
768 if (boss->isDead())
769 {
770 // respawn and update to a placeholder npc to avoid be looted again
771 boss->Respawn();
772 UpdateKilledBoss(boss);
773 }
774
776 boss->SetImmuneToAll(true);
777 break;
778 }
779 }
780
781 void AddWave()
782 {
784
785 switch (WaveCount)
786 {
787 case 6:
788 if (FirstBossId == 0)
790 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
791 {
794 }
795 break;
796 case 12:
797 if (SecondBossId == 0)
798 do
799 {
801 } while (SecondBossId == FirstBossId);
802 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
803 {
806 }
807 break;
808 case 18:
809 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
810 {
813 cyanigosa->CastSpell(cyanigosa, SPELL_CYANIGOSA_ARCANE_POWER_STATE, true);
815 }
816 break;
817 default:
818 SpawnPortal();
819 break;
820 }
821 }
822
823 bool CheckWipe() const
824 {
825 Map::PlayerList const& players = instance->GetPlayers();
826 for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
827 {
828 Player* player = itr->GetSource();
829 if (player->IsGameMaster())
830 continue;
831
832 if (player->IsAlive())
833 return false;
834 }
835
836 return true;
837 }
838
840 {
841 switch (boss->GetEntry())
842 {
843 case NPC_XEVOZZ:
845 break;
846 case NPC_LAVANTHOR:
848 break;
849 case NPC_ICHORON:
851 break;
852 case NPC_ZURAMAT:
854 break;
855 case NPC_EREKEM:
857 break;
858 case NPC_MORAGG:
860 break;
861 case NPC_EREKEM_GUARD:
863 break;
864 default:
865 break;
866 }
867 }
868
869 void Update(uint32 diff) override
870 {
871 // if we don't have any player in the instance
872 if (!instance->HavePlayers())
873 {
874 if (EventState == IN_PROGRESS) // if event is in progress, mark as fail
875 {
878 }
879 return;
880 }
881
882 Scheduler.Update(diff);
883
884 if (EventState == IN_PROGRESS)
885 {
886 // if door is destroyed, event is failed
889 }
890 }
891
893 {
894 // if main event is in progress and players have wiped then reset instance
895 if ((EventState == IN_PROGRESS && CheckWipe()) || EventState == FAIL)
896 {
900
901 WaveCount = 0;
902 DoorIntegrity = 100;
903 Defenseless = true;
905
907
908 if (Creature* sinclari = GetCreature(DATA_SINCLARI))
909 sinclari->AI()->EnterEvadeMode();
910 }
911 }
912
914 {
915 Scheduler.Schedule(Seconds(2), [this](TaskContext task)
916 {
917 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
918 cyanigosa->AI()->Talk(SAY_CYANIGOSA_SPAWN);
919
920 task.Schedule(Seconds(6), [this](TaskContext task)
921 {
922 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
923 cyanigosa->GetMotionMaster()->MoveJump(CyanigosaJumpLocation, 10.0f, 27.44744f);
924
925 task.Schedule(Seconds(7), [this](TaskContext /*task*/)
926 {
927 if (Creature* cyanigosa = GetCreature(DATA_CYANIGOSA))
928 {
929 cyanigosa->RemoveAurasDueToSpell(SPELL_CYANIGOSA_ARCANE_POWER_STATE);
930 cyanigosa->CastSpell(cyanigosa, SPELL_CYANIGOSA_TRANSFORM, true);
931 cyanigosa->SetImmuneToAll(false);
932 }
933 });
934 });
935 });
936 }
937
938 void ProcessEvent(WorldObject* /*go*/, uint32 eventId, WorldObject* /*invoker*/) override
939 {
940 if (eventId == EVENT_ACTIVATE_CRYSTAL)
941 {
943 Defenseless = false;
944 }
945 }
946
947 static bool IsBossWave(uint8 wave)
948 {
949 return wave && ((wave % 6) == 0);
950 }
951
952 protected:
954
955 static uint8 const ErekemGuardCount = 2;
957
960
963
968
970 };
971
973 {
975 }
976};
977
979{
981}
uint8_t uint8
Definition: Define.h:144
uint32_t uint32
Definition: Define.h:142
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition: Duration.h:27
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:2307
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2420
bool UpdateEntry(uint32 entry, CreatureData const *data=nullptr, bool updateLevel=true)
Definition: Creature.cpp:588
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 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)
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:1891
bool HavePlayers() const
Definition: Map.h:390
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3507
PlayerList const & GetPlayers() const
Definition: Map.h:400
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3497
void MoveTargetedHome()
void Clear()
Definition: ObjectGuid.h:289
uint32 GetEntry() const
Definition: Object.h:197
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:195
bool IsGameMaster() const
Definition: Player.h:1247
iterator end()
Definition: RefManager.h:37
iterator begin()
Definition: RefManager.h:36
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:1682
bool IsAlive() const
Definition: Unit.h:1175
bool isDead() const
Definition: Unit.h:1177
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:2108
InstanceScript * GetInstanceScript(InstanceMap *map) const override
@ DATA_WAVE_COUNT
Position const CyanigosaJumpLocation
uint32 const PortalPositionsSize
ObjectData const gameObjectData[]
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()
WaypointPath const ZuramatPath
ObjectData const creatureData[]
uint32 const PortalIntroPositionsSize
Position const PortalElitePositions[PortalElitePositionsSize]
@ SPELL_ZURAMAT_COSMETIC_CHANNEL_OMNI
@ SPELL_MORAGG_EMOTE_ROAR
@ SPELL_CYANIGOSA_ARCANE_POWER_STATE
@ SPELL_LAVANTHOR_SPECIAL_UNARMED
@ SPELL_CYANIGOSA_TRANSFORM
WaypointPath const ErekemGuardLeftPath
MinionData const minionData[]
Position const CyanigosaSpawnLocation
Position const PortalPositions[PortalPositionsSize]
Position const PortalIntroPositions[PortalIntroPositionsSize]
WaypointPath const XevozzPath
WaypointPath const ErekemGuardRightPath
Position const DefenseSystemLocation
uint32 const PortalElitePositionsSize
WaypointPath const LavanthorPath
WaypointPath const ErekemPath
WaypointPath const MoraggPath
DungeonEncounterData const encounters[]
WaypointPath const IchoronPath
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