TrinityCore
boss_anduin_wrynn.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 "AreaTrigger.h"
19#include "AreaTriggerAI.h"
20#include "Containers.h"
21#include "Conversation.h"
22#include "CreatureAI.h"
23#include "CreatureAIImpl.h"
24#include "DB2Structure.h"
25#include "G3DPosition.hpp"
26#include "GameObject.h"
27#include "GameObjectAI.h"
28#include "GridNotifiers.h"
29#include "InstanceScript.h"
30#include "Map.h"
31#include "MotionMaster.h"
32#include "ObjectAccessor.h"
33#include "PathGenerator.h"
34#include "Player.h"
35#include "ScriptMgr.h"
36#include "ScriptedCreature.h"
37#include "SpellAuraEffects.h"
38#include "SpellAuras.h"
39#include "SpellMgr.h"
40#include "SpellScript.h"
41#include "TemporarySummon.h"
43
45{
46 // Pre-Introduction
48
49 // Generic Spells
59
60 // Dark Zeal
63
64 // Hopebreaker
70
71 // Domination Word: Pain
73
74 // Befouled Barrier
82
83 // Blasphemy
95
96 // Kingsmourne Hungers
114
115 // Rain of Despair (Big add)
121
122 // Wicked Star
131
132 // Empowered Wicked Star
137
138 // Force of Will
141
142 // Fiendish Soul
148
149 // Monstrous Soul
153
154 // Grim Reflections
162
163 // Beacon of Hope
166
167 // Fragment of Hope
171
172 // Purging Light
174
175 // Hopelessness
180
181 // Empowered Hopebreaker
184
185 // Anduin's Soul
188
189 // Anduin's Hope
191 SPELL_GLOOM = 364031,
192
193 // Anduin's Doubt
195
196 // Remnant of a Fallen King
208
209 // Remorseless Winter
214
215 // Army of the Dead
220
221 // March of the Damned
227
228 // Soul Reaper
234
235 // Finish Encounter
239
240 // Berserk
242
243 // Jaina Spells
244 SPELL_BLINK = 362844,
247
248 // Sylvanas Spells
250 SPELL_TUMBLE = 364069,
251
252 // Uther Spells
255
256 // Translocators Teleport
259};
260
262{
266};
267
269{
270 // Anduin Wrynn
287
288 // Kingsmourne Room
290
291 // Remnant of a Fallen King
295
296 // Fiendish Soul
299
300 // Monstrous Soul
303
304 // Grim Reflections
307
308 // Sylvanas Windrunner
311
312 // Uther the Lightbringer
315
316 // Jaina Proudmoore
319};
320
322{
337
338 // Monstrous Soul
340
341 // Outroduction
343};
344
346{
362};
363
365{
371};
372
374{
377
379{
384};
385
387{
394};
395
397{
399};
400
402{
403 { -3826.9548f, -2626.2761f, 78.9296f, 4.644121f }, // Jaina
404 { -3831.6807f, -2626.2761f, 78.9296f, 5.460620f }, // Uther
405 { -3818.7300f, -2626.2800f, 78.9296f, 4.558697f }, // Sylvanas
406};
407
408//constexpr Position FirimOutroductionPos = { -3830.0156f, -2676.7969f, 91.56402f };
409constexpr Position QuartermasterRahmPos = { -3824.9565f, -2673.0190f, 91.44697f, 4.7163963f };
410constexpr Position LeftKnightPosition = { -3815.4097f, -2677.1824f, 91.44697f, 4.742376f };
411constexpr Position RightKnightPosition = { -3834.6807f, -2677.42360f, 91.44697f, 4.6956997f };
412
413constexpr Position DominationGraspCenter = { -3825.0601f, -2715.4600f, 91.3567f, 1.6260f };
414
416{
417 { -3828.472f, -2688.191f, 91.2652f, 1.9153f }, // Sylvanas
418 { -3819.519f, -2687.170f, 91.2652f, 2.1812f }, // Uther
419 { -3824.960f, -2692.550f, 91.2652f, 1.5733f }, // Jaina
420};
421
422constexpr Position AnduinsDespairSpawnPosition = { -3828.355957f, -2704.1875f, 91.350716f, 4.982021f };
423
424constexpr Position AnduinsSoulSpawnPosition = { -3825.060059f, -2715.459961f, 91.356697f, 1.626040f };
425
427{
428 { -3852.638916f, -2687.373291f, 91.348526f, 5.560700f }, // Right of Uther
429 { -3852.845459f, -2742.732666f, 91.348534f, 0.961583f }, // Next Right
430 { -3797.704834f, -2686.685791f, 91.348526f, 3.804689f }, // Left of Sylvanas
431 { -3799.805664f, -2740.925293f, 91.348541f, 2.247305f }, // Next Left
432};
433
435{
436 { -3825.149414f, -2711.508789f, 91.354919f, 1.463445f }, // In front of Anduin
437 { -3828.751709f, -2715.171875f, 91.354919f, 3.221487f }, // Left of Anduin
438 { -3821.041748f, -2715.296875f, 91.354889f, 0.046978f }, // Right of Anduin
439 { -3825.180664f, -2719.208252f, 91.354820f, 4.741285f }, // Behind Anduin
440};
441
442constexpr Position RemnantOfAFallenKingSpawnPosition = { -3825.2466f, -2700.0486f, 91.3650f, 1.3762f };
443
445{
446 { -3825.389f, -2739.4202f, 91.431305f, 4.8445f}, // back side of Anduin
447 { -3849.8438f, -2715.0574f, 91.40953f, 2.9961f}, // left side of Anduin
448 { -3825.4966f, -2692.6199f, 91.487495f, 1.4654f}, // in front of Anduin
449 { -3800.6980f, -2715.4340f, 91.390780f, 6.2769f}, // right side of Anduin
450};
451
453{
454 { -3839.8489f, -2679.7708f, 91.53031f, 5.1081f }, // First right
455 { -3860.8940f, -2701.0051f, 91.53032f, 5.9010f }, // Second Right
456 { -3860.5696f, -2729.7344f, 91.53032f, 0.3886f }, // Third Right
457 { -3839.6390f, -2750.8890f, 91.53032f, 1.1935f }, // Fourth Right
458 { -3811.0625f, -2679.6528f, 91.53031f, 4.3362f }, // First left
459 { -3789.8125f, -2700.5088f, 91.53032f, 3.5383f }, // Second Left
460 { -3789.2812f, -2729.3160f, 91.53032f, 2.7669f }, // Third Left
461 { -3810.4290f, -2751.0903f, 91.53032f, 1.9584f } // Fourth Left
462};
463
464constexpr Position BeaconOfHopeSpawnPosition = { -3825.0417f, -2715.3923f, 91.3568f, 0.0f };
465
466constexpr Position ChestLootSpawnPosition = { -3840.9915f, -2741.7847f, 91.26521f, 1.334929f };
467
469{
470public:
472 : _summonerGuid(summoner->GetGUID()), _owner(owner) { }
473
474 bool Execute(uint64 /*time*/, uint32 /*diff*/) override
475 {
477 {
478 if (Unit* target = _summoner->AI()->SelectTarget(SelectTargetMethod::Random, 0))
479 {
481 _owner->AI()->AttackStart(target);
482 }
483 }
484 return true;
485 }
486
487private:
490};
491
492// 181954 - Anduin Wrynn
494{
497
499 {
501 {
503 me->SetImmuneToAll(false);
504 me->SetSpeed(MOVE_RUN, 11.0f);
506 }
507 else
508 {
511 me->SetImmuneToAll(true);
512 }
513 }
514
516 {
518 {
520 sylvanas->AttackStop();
521 sylvanas->SetSheath(SHEATH_STATE_RANGED);
522 sylvanas->SetEmoteState(EMOTE_STATE_READY_BOW);
523 }
524
526 {
528 uther->AttackStop();
529 uther->SetSheath(SHEATH_STATE_MELEE);
530 uther->SetEmoteState(EMOTE_STATE_READY2H);
531 }
532
534 {
536 jaina->AttackStop();
537 jaina->SetSheath(SHEATH_STATE_RANGED);
538 jaina->SetEmoteState(EMOTE_STATE_READY2H);
539 }
540 }
541
543 {
545 if (!remnant)
546 return;
547
548 auto forceAttack = [this, remnant](uint32 data)
549 {
550 Creature* creature = instance->GetCreature(data);
551 if (!creature)
552 return;
553
554 creature->AI()->AttackStart(remnant);
556 };
557
560 forceAttack(DATA_JAINA_PROUDMOORE_ANDUIN);
561 }
562
564 {
566 rahm->NearTeleportTo(QuartermasterRahmPos);
567
568 std::list<Creature*> knights;
569 me->GetCreatureListWithOptionsInGrid(knights, 150.0f, { .CreatureId = NPC_KNIGHT_OF_EBON_BLADE_ANDUIN });
570
571 for (Creature* knight : knights)
572 {
573 if (knight->HasStringId("left_knight"))
574 knight->NearTeleportTo(LeftKnightPosition);
575 else
576 knight->NearTeleportTo(RightKnightPosition);
577 }
578 }
579
580 void ClearDebuffs() const
581 {
594 }
595
596 void JustAppeared() override
597 {
607 }
608
609 void EnterEvadeMode(EvadeReason /*why*/) override
610 {
611 ClearDebuffs();
613 if (_encounterEnded == true)
614 return;
615
620 }
621
622 void Reset() override
623 {
624 _Reset();
627
628 _slayTextOnCooldown = false;
630 _encounterEnded = false;
631 }
632
633 void KilledUnit(Unit* victim) override
634 {
635 if (_slayTextOnCooldown == false && !victim->IsPlayer())
636 {
637 Talk(SAY_SLAY);
638 _slayTextOnCooldown = true;
639 scheduler.Schedule(3s, [this](TaskContext /*task*/)
640 {
641 _slayTextOnCooldown = false;
642 });
643 }
644 }
645
646 void JustSummoned(Creature* summon) override
647 {
648 summons.Summon(summon);
649
650 switch (summon->GetEntry())
651 {
653 {
655 summon->CastSpell(summon, SPELL_BEFOULED_ERUPTION, true);
657 summon->CastSpell(summon, SPELL_BEFOULED_BARRIER_BLACK_RING, true);
658 break;
659 }
660
662 {
664 summon->SetUninteractible(true);
665 summon->CastSpell(summon, SPELL_REMNANT_SPAWN);
666 break;
667 }
668
670 {
671 float marchSpeed = 0.0f;
672 switch (me->GetMap()->GetDifficultyID())
673 {
677 marchSpeed = 0.40f;
678 break;
680 marchSpeed = 0.60f;
681 break;
682 default:
683 marchSpeed = 0.40f;
684 break;
685 }
686
687 summon->SetSpeedRate(MOVE_RUN, marchSpeed);
690 scheduler.Schedule(1s, [summon](TaskContext /*task*/)
691 {
692 Position exitPlatform = summon->GetFirstCollisionPosition(100.0f, summon->GetAbsoluteAngle(summon));
693 summon->GetMotionMaster()->MovePoint(POINT_MARCH_OF_THE_DAMNED, exitPlatform, false, summon->GetOrientation());
694 });
695 break;
696 }
697
699 {
702 break;
703 }
704
705 default:
706 break;
707 }
708 }
709
710 void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
711 {
712 if (summon->GetEntry() == NPC_GRIM_REFLECTION)
713 summon->DespawnOrUnsummon(3s);
714 }
715
716 void JustEngagedWith(Unit* who) override
717 {
723 }
724
725 void DoAction(int32 action) override
726 {
727 switch (action)
728 {
730 {
731 auto teleportNamed = [this](uint32 data, Position const& position)
732 {
733 Creature* creature = instance->GetCreature(data);
734 if (!creature)
735 return;
736
737 creature->NearTeleportTo(position);
738 creature->CastSpell(creature, SPELL_BROKER_SPAWN, true);
739 };
740
744 break;
745 }
747 {
748 auto castBrokerSpawn = [this](uint32 data)
749 {
750 Creature* creature = instance->GetCreature(data);
751 if (!creature)
752 return;
753
754 creature->CastSpell(creature, SPELL_BROKER_SPAWN, true);
755 };
756
757 castBrokerSpawn(DATA_UTHER_THE_LIGHTBRINGER_ANDUIN);
758 castBrokerSpawn(DATA_SYLVANAS_WINDRUNNER_ANDUIN);
759 castBrokerSpawn(DATA_JAINA_PROUDMOORE_ANDUIN);
760 break;
761 }
763 {
765 scheduler.Schedule(1ms, [this](TaskContext /*task*/)
766 {
768 if (!uther)
769 return;
770
772 if (!sylvanas)
773 return;
774
776 if (!jaina)
777 return;
778
780 if (!convo)
781 return;
782
784 convo->AddActor(NPC_SYLVANAS_WINDRUNNER_ANDUIN, 2, sylvanas->GetGUID());
786 convo->Start();
787 });
788
789 scheduler.Schedule(35s, [this](TaskContext /*task*/)
790 {
793 });
794 break;
795 }
797 {
799 bolvar->GetMotionMaster()->MovePath(PATH_OUTRODUCTION_BOLVAR, false);
800
802 thrall->GetMotionMaster()->MovePath(PATH_OUTRODUCTION_THRALL, false);
803
804 scheduler.Schedule(10s, [this](TaskContext /*task*/)
805 {
807 });
808 break;
809 }
811 {
813 if (!uther)
814 break;
815
817 if (!sylvanas)
818 break;
819
821 if (!jaina)
822 break;
823
825 if (!firim)
826 break;
827
829
831 if (!convo)
832 break;
833
835 convo->AddActor(NPC_SYLVANAS_WINDRUNNER_ANDUIN, 2, sylvanas->GetGUID());
837 convo->AddActor(NPC_FIRIM_ANDUIN, 4, firim->GetGUID());
838 convo->Start();
839 break;
840 }
842 {
845 {
847 {
848 convo->AddActor(NPC_UTHER_THE_LIGHTBRINGER_ANDUIN, 1, uther->GetGUID());
849 convo->Start();
850 }
851 }
852 break;
853 }
855 {
858 {
860 {
861 convo->AddActor(NPC_SYLVANAS_WINDRUNNER_ANDUIN, 1, sylvanas->GetGUID());
862 convo->Start();
863 }
864 }
865 break;
866 }
868 {
869 if (_intermissionsDone == 0)
870 {
872 scheduler.Schedule(3s, [this](TaskContext /*task*/)
873 {
875 });
876 }
877 else if (_intermissionsDone == 1)
878 {
880 scheduler.Schedule(6s, [this](TaskContext /*task*/)
881 {
883 });
884 }
885 break;
886 }
888 {
889 EndEncounter();
890 break;
891 }
892 default:
893 break;
894 }
895 }
896
897 void UpdateAI(uint32 diff) override
898 {
899 scheduler.Update(diff);
900
901 if (!UpdateVictim())
902 return;
903
904 Unit* victim = me->GetVictim();
905 if (victim && !victim->IsPlayer())
906 {
908 return;
909 }
910
911 events.Update(diff);
912
914 return;
915
916 while (uint32 eventId = events.ExecuteEvent())
917 {
918 switch (eventId)
919 {
921 {
924 break;
925 }
927 {
930 if (IsMythic())
931 events.Repeat(65500ms);
932 else
933 events.Repeat(58400ms);
934 break;
935 }
937 {
939 break;
940 }
942 {
945 break;
946 }
947 case EVENT_BLASPHEMY:
948 {
952 break;
953 }
955 {
958 if (IsMythic())
959 events.Repeat(65500ms);
960 else
961 events.Repeat(58500ms);
962 break;
963 }
965 {
969 events.Repeat(58500ms);
970 break;
971 }
973 {
976 if (IsMythic())
977 events.Repeat(65500ms);
978 else
979 events.Repeat(58500ms);
980 break;
981 }
983 {
987 break;
988 }
990 {
993 break;
994 }
996 {
998 break;
999 }
1001 {
1003 break;
1004 }
1006 {
1008 break;
1009 }
1010 case EVENT_BERSERK:
1011 {
1013 break;
1014 }
1015 default:
1016 break;
1017 }
1018
1020 return;
1021 }
1022 }
1023
1024 void StartIntermission(uint8 intermissionNum)
1025 {
1026 auto SpawnRemnant = [this](TaskContext /*task*/)
1027 {
1030 };
1031
1032 Seconds timeOffset = intermissionNum * 1s;
1033
1034 scheduler.Schedule(1ms, [this](TaskContext /*task*/)
1035 {
1039 });
1040
1041 scheduler.Schedule(1204ms + timeOffset, [this, intermissionNum](TaskContext /*task*/)
1042 {
1044 });
1045
1046 scheduler.Schedule(2204ms + timeOffset, [this](TaskContext /*task*/)
1047 {
1048 me->SetFacingTo(1.626040f);
1049 });
1050
1051 scheduler.Schedule(4s + timeOffset, [this](TaskContext /*task*/)
1052 {
1056
1058 {
1061 }
1062 });
1063
1064 scheduler.Schedule(5s + timeOffset, SpawnRemnant);
1065
1066 scheduler.Schedule(6s + timeOffset, SpawnRemnant);
1067
1068 scheduler.Schedule(7s + timeOffset, SpawnRemnant);
1069
1070 scheduler.Schedule(8s + timeOffset, [this, intermissionNum](TaskContext /*task*/)
1071 {
1072 if (intermissionNum == 1 || IsMythic())
1074
1076 {
1078 arthas->SetImmuneToAll(false);
1080 }
1081 });
1082 }
1083
1084 void PhaseEvents(uint8 phase)
1085 {
1086 events.Reset();
1087
1088 switch (phase)
1089 {
1090 case PHASE_ONE:
1091 {
1093 events.ScheduleEventSeries(EVENT_HOPEBREAKER, { 5s, 31900ms, 28s, 29900ms, 29900ms });
1094 events.ScheduleEventSeries(EVENT_BEFOULED_BARRIER, { 17s, 51900ms, 48s });
1095 events.ScheduleEventSeries(EVENT_BLASPHEMY, { 30s, 49900ms, 54900ms });
1096 events.ScheduleEventSeries(EVENT_WICKED_STAR, { 55s, 35s, 30s });
1097 events.ScheduleEventSeries(EVENT_DOMINATION_WORD_PAIN, { 7s, 13s, 13s, 10s, 15s, 13100ms, 12900ms, 13s, 13900ms, 12200ms, 14800ms });
1100
1101 if (IsLFR())
1103 else
1105 break;
1106 }
1107
1108 case PHASE_TWO:
1109 {
1111 me->ModifyPower(me->GetPowerType(), 0);
1116
1117 if (!IsMythic())
1118 {
1119 events.ScheduleEventSeries(EVENT_DOMINATION_WORD_PAIN, { 11500ms, 13s, 13s, 17700ms, 8100ms, 13s, 13s, 14400ms, 11200ms, 12200ms });
1120 events.ScheduleEventSeries(EVENT_HOPEBREAKER, { 13600ms, 22s, 33300ms, 29s, 29s });
1121 events.ScheduleEventSeries(EVENT_WICKED_STAR, { 18500ms, 39s, 26s, 30500ms, 19s });
1122 }
1123 else
1124 {
1125 events.ScheduleEventSeries(EVENT_DOMINATION_WORD_PAIN, { 10700ms, 13s, 13s, 17700ms, 8100ms, 13s, 13s, 14400ms, 11200ms, 12200ms });
1126 events.ScheduleEventSeries(EVENT_HOPEBREAKER, { 13600ms, 25s, 33s, 29s, 29100ms });
1127 events.ScheduleEventSeries(EVENT_WICKED_STAR, { 18500ms, 39s, 26s, 30900ms, 19100ms });
1128 }
1129
1130 if (IsLFR())
1132 else
1134 break;
1135 }
1136
1137 case PHASE_THREE:
1138 {
1140 me->ModifyPower(me->GetPowerType(), 0);
1146
1147 if (!IsMythic())
1149 else
1151 break;
1152 }
1153 default:
1154 break;
1155 }
1156 }
1157
1158 void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
1159 {
1160 if (_intermissionsDone < 2 && me->HealthBelowPctDamaged(10, damage))
1161 {
1164 scheduler.Schedule(6s, [this](TaskContext /*task*/)
1165 {
1167 });
1168
1172
1173 std::list<Creature*> fiendishSouls;
1174 GetCreatureListWithEntryInGrid(fiendishSouls, me, NPC_FIENDISH_SOUL, 50.0f);
1175
1176 for (Creature* fiends : fiendishSouls)
1177 {
1178 fiends->CastSpell(fiends, SPELL_SOUL_DESPAWN);
1179 fiends->DespawnOrUnsummon(500ms);
1180 }
1181
1182 std::list<Creature*> marches;
1184
1185 for (Creature* march : marches)
1186 march->DespawnOrUnsummon();
1187
1189 remnant->GetAI()->DoAction(ACTION_DESPAWN_REMNANT);
1190 }
1191 }
1192
1194 {
1195 ClearDebuffs();
1196 events.Reset();
1198 _encounterEnded = true;
1202
1204 beacon->DespawnOrUnsummon();
1205
1211
1213 {
1214 chest->SetGoState(GO_STATE_ACTIVE);
1215 chest->SetSpellVisualId(SPELL_VISUAL_CHEST_LOOT, ObjectGuid::Empty);
1216 }
1217
1218 scheduler.Schedule(5s, [this](TaskContext /*task*/)
1219 {
1221 });
1222 }
1223
1224private:
1228};
1229
1230// 184830 - Beacon of Hope
1232{
1234
1235 void JustUnregisteredAreaTrigger(AreaTrigger* areaTrigger) override
1236 {
1237 switch (areaTrigger->GetSpellId())
1238 {
1240 {
1241 if (!areaTrigger->GetInsideUnits().empty())
1242 break;
1243
1244 InstanceScript* instance = me->GetInstanceScript();
1245 if (!instance)
1246 break;
1247
1248 if (Creature* beacon = instance->GetCreature(DATA_BEACON_OF_HOPE))
1249 beacon->CastSpell(beacon, SPELL_FRAGMENT_OF_HOPE_DAMAGE, true);
1250 break;
1251 }
1252 default:
1253 break;
1254 }
1255 }
1256};
1257
1258// 183452 - Empty Vessel
1260{
1262
1263 void JustAppeared() override
1264 {
1266 }
1267
1268 void IsSummonedBy(WorldObject* summoner) override
1269 {
1270 if (!summoner->IsPlayer())
1271 return;
1272
1273 summoner->CastSpell(me, SPELL_MIRROR_IMAGE);
1275 }
1276};
1277
1278// 185607 - Lost Soul
1280{
1282
1283 void JustAppeared() override
1284 {
1287 }
1288
1289 void IsSummonedBy(WorldObject* summoner) override
1290 {
1291 if (!summoner->IsPlayer())
1292 return;
1293
1295 }
1296
1297 void JustDied(Unit* /*killer*/) override
1298 {
1299 TempSummon* summon = me->ToTempSummon();
1300 if (!summon)
1301 return;
1302
1303 if (Unit* summoner = summon->GetSummonerUnit())
1304 {
1306 summoner->NearTeleportTo(me->GetPosition());
1307 }
1308 me->DespawnOrUnsummon(2s);
1309 }
1310
1311 void Reset() override
1312 {
1313 _events.Reset();
1314 }
1315
1316 void UpdateAI(uint32 diff) override
1317 {
1318 UpdateVictim();
1319
1320 _events.Update(diff);
1321
1323 return;
1324
1325 while (uint32 eventId = _events.ExecuteEvent())
1326 {
1327 switch (eventId)
1328 {
1329 case EVENT_BANISH_SOUL:
1330 {
1332 _events.Repeat(1ms);
1333 break;
1334 }
1335 default:
1336 break;
1337 }
1338 }
1339 }
1340
1341private:
1343};
1344
1345// 184519 - Anduin's Soul
1347{
1350
1352 {
1353 if (_hopeRestored == 4 && _doubtGone == 4 && _despairGone == 1)
1354 {
1356 _hopeRestored = 0;
1357 _doubtGone = 0;
1358 _despairGone = 0;
1359 }
1360 }
1361
1362 void JustAppeared() override
1363 {
1364 me->SetDisableGravity(true, true);
1365 me->SetHoverHeight(1.0);
1367 }
1368
1369 void Reset() override
1370 {
1373 }
1374
1375 void JustSummoned(Creature* who) override
1376 {
1377 _summons.Summon(who);
1378 }
1379
1380 void JustDied(Unit* /*killer*/) override
1381 {
1383 }
1384
1385 void EnterEvadeMode(EvadeReason /*why*/) override
1386 {
1389 }
1390
1391 void DoAction(int32 action) override
1392 {
1393 InstanceScript* instance = me->GetInstanceScript();
1394 if (!instance)
1395 return;
1396
1397 Creature* anduin = instance->GetCreature(DATA_ANDUIN_SOUL);
1398 if (!anduin)
1399 return;
1400
1401 switch (action)
1402 {
1404 {
1406 for (uint8 i = 0; i < 4; i++)
1407 {
1410 }
1411 break;
1412 }
1414 _despairGone++;
1416 break;
1417
1418 case ACTION_DOUBT_GONE:
1419 _doubtGone++;
1421 break;
1422
1424 _hopeRestored++;
1426 break;
1427
1428 default:
1429 break;
1430 }
1431 }
1432
1433public:
1438};
1439
1440// 184520 - Anduin's Despair
1442{
1444 _instance(creature->GetInstanceScript()) { }
1445
1446 void JustAppeared() override
1447 {
1450 }
1451
1452 void JustDied(Unit* /*killer*/) override
1453 {
1455
1457 soul->GetAI()->DoAction(ACTION_DESPAIR_GONE);
1458 }
1459
1460private:
1462};
1463
1464// 184494 - Anduin's Doubt
1466{
1468
1469 void JustAppeared() override
1470 {
1471 me->SetWalk(true);
1475 }
1476
1477 void JustDied(Unit* /*killer*/) override
1478 {
1481
1483 soul->GetAI()->DoAction(ACTION_DOUBT_GONE);
1484 }
1485
1486 void UpdateAI(uint32 /*diff*/) override
1487 {
1488 UpdateVictim();
1489 }
1490};
1491
1492// 184493 - Anduin's Hope
1494{
1496 _instance(creature->GetInstanceScript()) { }
1497
1498 void Reset() override
1499 {
1500 me->SetRegenerateHealth(false);
1501 me->SetHealth(1);
1503 }
1504
1505 void JustAppeared() override
1506 {
1508 me->SetWalk(true);
1510 if (IsHeroic() || IsMythic())
1512
1513 _scheduler.Schedule(2s, [this](TaskContext /*task*/)
1514 {
1515 Position exitPlatform = me->GetFirstCollisionPosition(100.0f, 0);
1516 me->GetMotionMaster()->MovePoint(POINT_ESCAPE_PLATFORM, exitPlatform, false, me->GetOrientation());
1517 });
1518 me->SetHealth(1);
1519
1520 _scheduler.Schedule(40s, [this](TaskContext /*task*/)
1521 {
1523 });
1524 }
1525
1526 void UpdateAI(uint32 diff) override
1527 {
1528 UpdateVictim();
1529
1530 _scheduler.Update(diff);
1531 }
1532
1533 void HealReceived(Unit* /*healer*/, uint32& heal) override
1534 {
1535 if (me->HealthAbovePctHealed(100, heal))
1536 {
1540
1542 soul->GetAI()->DoAction(ACTION_HOPE_RESTORED);
1543 }
1544 }
1545
1546 void MovementInform(uint32 type, uint32 pointId) override
1547 {
1548 if (type != POINT_MOTION_TYPE)
1549 return;
1550
1551 switch (pointId)
1552 {
1554 {
1556 break;
1557 }
1558 default:
1559 break;
1560 }
1561 }
1562
1563private:
1566};
1567
1568// 183669 - Fiendish Soul
1570{
1572
1573 void JustEngagedWith(Unit* /*who*/) override
1574 {
1577 }
1578
1579 void JustDied(Unit* /*killer*/) override
1580 {
1581 if (IsHeroic() || IsMythic())
1583
1585 }
1586
1587 void EnterEvadeMode(EvadeReason /*why*/) override
1588 {
1590 }
1591
1592 void UpdateAI(uint32 diff) override
1593 {
1594 if (!UpdateVictim())
1595 return;
1596
1597 _events.Update(diff);
1598
1600 return;
1601
1602 while (uint32 eventId = _events.ExecuteEvent())
1603 {
1604 switch (eventId)
1605 {
1606 case EVENT_GHOUL_LEAP:
1607 {
1608 std::list<Player*> targetList;
1609 GetPlayerListInGrid(targetList, me, 50.0f);
1610 if (!targetList.empty())
1612 _events.Repeat(10s);
1613 break;
1614 }
1616 {
1618 _events.Repeat(5s, 10s);
1619 break;
1620 }
1621 default:
1622 break;
1623 }
1624 }
1625 }
1626
1627private:
1629};
1630
1631// 183671 - Monstrous Soul
1633{
1635
1636 void JustEngagedWith(Unit* /*who*/) override
1637 {
1640 }
1641
1642 void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
1643 {
1644 if (me->HealthBelowPctDamaged(35, damage))
1646 }
1647
1648 void Reset() override
1649 {
1650 _events.Reset();
1651 }
1652
1653 void DoAction(int32 action) override
1654 {
1655 switch (action)
1656 {
1658 {
1661 break;
1662 }
1663 default:
1664 break;
1665 }
1666 }
1667
1668 void JustDied(Unit* /*killer*/) override
1669 {
1671 }
1672
1673 void EnterEvadeMode(EvadeReason /*why*/) override
1674 {
1677 }
1678
1679 void UpdateAI(uint32 diff) override
1680 {
1681 if (!UpdateVictim())
1682 return;
1683
1684 _events.Update(diff);
1685
1687 return;
1688
1689 while (uint32 eventId = _events.ExecuteEvent())
1690 {
1691 switch (eventId)
1692 {
1694 {
1697 break;
1698 }
1699 default:
1700 break;
1701 }
1702 }
1703 }
1704
1705private:
1707};
1708
1709// 183463 - Remnant of a Fallen King
1711{
1712 boss_remnant_of_a_fallen_king(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _summons(creature) { }
1713
1714 void JustAppeared() override
1715 {
1718 me->ModifyPower(me->GetPowerType(), 0);
1719 me->SetPower(me->GetPowerType(), 0);
1720 for (MapReference const& players : me->GetMap()->GetPlayers())
1721 {
1722 if (Player* player = players.GetSource())
1723 me->CastSpell(player, SPELL_WEATHER_COSMETIC, true);
1724 }
1727 }
1728
1729 void EnterEvadeMode(EvadeReason /*why*/) override
1730 {
1733
1735 anduin->AI()->EnterEvadeMode(EvadeReason::NoHostiles);
1736
1741 }
1742
1744 {
1746 sylvanas->GetAI()->AttackStartCaster(me, 25.0f);
1747
1749 uther->GetAI()->AttackStart(me);
1750
1752 jaina->GetAI()->AttackStartCaster(me, 25.0f);
1753 }
1754
1755 void JustSummoned(Creature* summon) override
1756 {
1757 _summons.Summon(summon);
1758
1759 switch (summon->GetEntry())
1760 {
1761 case NPC_FIENDISH_SOUL:
1762 case NPC_MONSTROUS_SOUL:
1764 summon->m_Events.AddEvent(new ActivateGhouls(me, summon), summon->m_Events.CalculateTime(5s));
1765 break;
1766 default:
1767 break;
1768 }
1769 }
1770
1771 void DoAction(int32 action) override
1772 {
1773 switch (action)
1774 {
1776 {
1779
1780 _scheduler.Schedule(1500ms, [this](TaskContext /*task*/)
1781 {
1783 me->SetUninteractible(false);
1784 });
1785
1786 _scheduler.Schedule(2s, [this](TaskContext /*task*/)
1787 {
1794 });
1795 break;
1796 }
1798 {
1800 _scheduler.Schedule(500ms, [this](TaskContext /*task*/)
1801 {
1803 });
1804 break;
1805 }
1806 default:
1807 break;
1808 }
1809 }
1810
1811 void UpdateAI(uint32 diff) override
1812 {
1813 _scheduler.Update(diff);
1814
1815 if (!UpdateVictim())
1816 return;
1817
1818 _events.Update(diff);
1819
1821 return;
1822
1823 while (uint32 eventId = _events.ExecuteEvent())
1824 {
1825 switch (eventId)
1826 {
1828 {
1830 me->AttackStop();
1833 break;
1834 }
1836 {
1839 if (!IsLFR())
1840 _events.Repeat(36900ms);
1841 break;
1842 }
1843 case EVENT_SOUL_REAPER:
1844 {
1846 _events.Repeat(12s);
1847 break;
1848 }
1849 default:
1850 break;
1851 }
1852
1854 return;
1855 }
1856 }
1857
1858private:
1863};
1864
1865// 183033 - Grim Reflection
1867{
1869
1870 void Reset() override
1871 {
1872 _events.Reset();
1873 }
1874
1875 void JustAppeared() override
1876 {
1877 SetCombatMovement(false);
1882
1883 if (IsLFR() || IsNormal())
1885 }
1886
1887 void JustDied(Unit* /*killer*/) override
1888 {
1889 if (IsMythic())
1891 }
1892
1893 void UpdateAI(uint32 diff) override
1894 {
1895 if (!UpdateVictim())
1896 return;
1897
1898 _events.Update(diff);
1899
1901 return;
1902
1903 while (uint32 eventId = _events.ExecuteEvent())
1904 {
1905 switch (eventId)
1906 {
1908 {
1910 _events.Repeat(2s);
1911 break;
1912 }
1914 {
1916 _events.Repeat(1s);
1917 break;
1918 }
1919 default:
1920 break;
1921 }
1922
1924 return;
1925 }
1926 }
1927
1928private:
1930};
1931
1932// 183666 - Sylvanas Windrunner
1934{
1936
1937 void JustAppeared() override
1938 {
1940 me->SetCanMelee(false); // DoSpellAttackIfReady
1941 }
1942
1943 void Reset() override
1944 {
1945 _events.Reset();
1946 }
1947
1948 void JustEngagedWith(Unit* /*who*/) override
1949 {
1951 }
1952
1953 bool CanAIAttack(Unit const* target) const override
1954 {
1956 }
1957
1958 void UpdateAI(uint32 diff) override
1959 {
1960 if (!UpdateVictim())
1961 return;
1962
1963 _events.Update(diff);
1964
1966 return;
1967
1968 while (uint32 eventId = _events.ExecuteEvent())
1969 {
1970 switch (eventId)
1971 {
1972 case EVENT_TUMBLE:
1973 {
1975 _events.Repeat(10s);
1976 break;
1977 }
1978 default:
1979 break;
1980 }
1981 }
1982
1984 }
1985
1986private:
1988};
1989
1990// 183664 - Jaina Proudmoore
1992{
1993 npc_anduin_wrynn_jaina(Creature* creature) : ScriptedAI(creature) { }
1994
1995 void JustAppeared() override
1996 {
1998 me->SetCanMelee(false); // DoSpellAttackIfReady
1999 }
2000
2001 void Reset() override
2002 {
2003 _events.Reset();
2004 }
2005
2006 void JustEngagedWith(Unit* /*who*/) override
2007 {
2009 }
2010
2011 bool CanAIAttack(Unit const* target) const override
2012 {
2014 }
2015
2016 void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override
2017 {
2018 if (pathId != PATH_INTRODUCTION_JAINA)
2019 return;
2020
2022 anduin->GetAI()->DoAction(ACTION_START_INTRODUCTION);
2023 }
2024
2025 void UpdateAI(uint32 diff) override
2026 {
2027 if (!UpdateVictim())
2028 return;
2029
2030 _events.Update(diff);
2031
2033 return;
2034
2035 while (uint32 eventId = _events.ExecuteEvent())
2036 {
2037 switch (eventId)
2038 {
2040 {
2042 break;
2043 }
2044 case EVENT_BLINK:
2045 {
2047 _events.Repeat(60s);
2048 break;
2049 }
2050 default:
2051 break;
2052 }
2053 }
2054
2056 }
2057
2058private:
2060};
2061
2062// 183665 - Uther the Lightbringer
2064{
2065 npc_anduin_wrynn_uther(Creature* creature) : ScriptedAI(creature) { }
2066
2067 void JustAppeared() override
2068 {
2070 }
2071
2072 void Reset() override
2073 {
2074 _events.Reset();
2075 }
2076
2077 void JustEngagedWith(Unit* who) override
2078 {
2081 }
2082
2083 bool CanAIAttack(Unit const* target) const override
2084 {
2086 }
2087
2088 void UpdateAI(uint32 diff) override
2089 {
2090 if (!UpdateVictim())
2091 return;
2092
2093 _events.Update(diff);
2094
2096 return;
2097
2098 while (uint32 eventId = _events.ExecuteEvent())
2099 {
2100 switch (eventId)
2101 {
2103 {
2105 break;
2106 }
2108 {
2110 _events.Repeat(10s);
2111 break;
2112 }
2113 default:
2114 break;
2115 }
2116 }
2117 }
2118
2119private:
2121};
2122
2123// 367524 - Spawn Pre-Introduction
2125{
2126 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
2127 {
2128 Unit* caster = GetCaster();
2129 if (!caster)
2130 return;
2131
2132 switch (caster->GetEntry())
2133 {
2136 break;
2139 break;
2142 break;
2143 default:
2144 break;
2145 }
2146 }
2147
2148 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
2149 {
2150 Unit* caster = GetCaster();
2151 if (!caster)
2152 return;
2153
2154 uint32 pathId = 0;
2155 switch (caster->GetEntry())
2156 {
2158 pathId = PATH_INTRODUCTION_JAINA;
2159 break;
2161 pathId = PATH_INTRODUCTION_UTHER;
2162 break;
2165 break;
2166 default:
2167 break;
2168 }
2169 caster->GetMotionMaster()->MovePath(pathId, false);
2170 }
2171
2172 void Register() override
2173 {
2176 }
2177};
2178
2179// 369317 - Anduin Progression Aura (Can't be reduced < 1 hp)
2181{
2182 bool Validate(SpellInfo const* /*spellInfo*/) override
2183 {
2185 }
2186
2187 void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
2188 {
2189 amount = -1;
2190 canBeRecalculated = true;
2191 }
2192
2193 void Trigger(AuraEffect* /*aurEff*/, DamageInfo const& dmgInfo, uint32& absorbAmount)
2194 {
2196 return;
2197
2198 if (dmgInfo.GetDamage() <= GetTarget()->GetHealth())
2199 return;
2200
2201 if (dmgInfo.GetDamage() >= GetTarget()->GetHealth())
2202 {
2203 absorbAmount = dmgInfo.GetDamage();
2204 if (_triggered)
2205 return;
2206
2207 GetTarget()->SetHealth(1);
2210 _triggered = true;
2211 }
2212 }
2213
2214 void Register() override
2215 {
2218 }
2219
2220private:
2221 bool _triggered = false;
2222};
2223
2224// 366848 - Anduin Willpower Periodic (Only LFR)
2226{
2227 static constexpr std::array<int32, 22> AnduinRegenCycle =
2228 { 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1 }; // 0.681 willpower per second on Retail
2229
2230 void HandlePeriodic(AuraEffect const* /*aurEff*/)
2231 {
2232 Unit* target = GetTarget();
2234
2235 if (_powerRegenCycle >= 22)
2236 _powerRegenCycle = 0;
2237
2238 target->ModifyPower(target->GetPowerType(), _powerGained);
2239 }
2240
2241 void Register() override
2242 {
2244 }
2245
2248};
2249
2250// 364247 - Dark Zeal
2252{
2253 bool Validate(SpellInfo const* /*spellInfo*/) override
2254 {
2256 }
2257
2258 void OnProc(AuraEffect* /*aurEff*/, ProcEventInfo const& eventInfo)
2259 {
2260 Unit* actionTarget = eventInfo.GetActionTarget();
2261 if (!actionTarget)
2262 return;
2263
2264 Unit* target = GetTarget();
2265 target->CastSpell(target, SPELL_DARK_ZEAL_BUFF, true);
2266
2267 if (actionTarget->GetGUID() == _currentTank)
2268 return;
2269
2271 _currentTank = actionTarget->GetGUID();
2272 }
2273
2274 void Register() override
2275 {
2277 }
2278
2279private:
2281};
2282
2283// 361815 - Hopebreaker
2284// 365806 - Empowered Hopebreaker
2286{
2287 bool Validate(SpellInfo const* /*spellInfo*/) override
2288 {
2290 }
2291
2292 void HandleHit(SpellEffIndex /*effIndex*/) const
2293 {
2296 }
2297
2298 void Register() override
2299 {
2301 }
2302};
2303
2304// 361817 - Hopebreaker Periodic
2306{
2307 bool Validate(SpellInfo const* /*spellInfo*/) override
2308 {
2310 }
2311
2312 void OnPeriodic(AuraEffect const* /*aurEff*/) const
2313 {
2314 if (!GetCaster())
2315 return;
2316
2318 }
2319
2320 void Register() override
2321 {
2323 }
2324};
2325
2326// 361818 - Hopebreaker Damage
2328{
2329 bool Validate(SpellInfo const* /*spellInfo*/) override
2330 {
2332 }
2333
2334 void HandleDamage(SpellEffIndex /*effIndex*/)
2335 {
2336 Unit* target = GetHitUnit();
2337
2338 Aura* hopebreaker = target->GetAura(SPELL_HOPEBREAKER_DEBUFF);
2339 if (!hopebreaker)
2340 return;
2341
2342 uint8 hopebreakerStacks = hopebreaker->GetStackAmount();
2343 SetHitDamage(GetHitDamage() * hopebreakerStacks);
2344 }
2345
2346 void Register() override
2347 {
2349 }
2350};
2351
2352// 363133 - March of the Damned, CreatePropertiesId - 24093
2354{
2356
2357 void OnUnitEnter(Unit* unit) override
2358 {
2359 if (!unit->IsPlayer())
2360 return;
2361
2362 Unit* caster = at->GetCaster();
2363 if (!caster)
2364 return;
2365
2366 caster->CastSpell(unit, SPELL_MARCH_OF_THE_DAMNED_DAMAGE, true);
2367 }
2368};
2369
2370float constexpr BEFOULED_BARRIER_MAX_RADIUS = 12.0f;
2371float constexpr BEFOULED_BARRIER_MIN_RADIUS = 4.0f;
2372
2373// 365173 - Befouled Barrier - CreatePropertiesId: 24332
2375{
2377
2378 void OnInitialize() override
2379 {
2380 if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_BEFOULED_BARRIER_DEBUFF, at->GetMap()->GetDifficultyID()))
2381 _absorbRequired = spellInfo->GetEffect(EFFECT_0).CalcValue(at->GetCaster());
2382
2383 at->SetTimeToTargetScale(30000);
2384
2385 // The aura is handling it automatically
2386 at->SetDuration(-1);
2387 }
2388
2389 void OnCreate(Spell const* /*creatingSpell*/) override
2390 {
2391 _scheduler.Schedule(500ms, [this](TaskContext task)
2392 {
2393 float startRadius = 1.0f;
2394
2397
2399 {
2400 UpdateSizeBasedOnAbsorb();
2401 task.Repeat();
2402 });
2403 });
2404 }
2405
2406 void UpdateSize(float radius, float targetRadius) const
2407 {
2408 std::array<DBCPosition2D, 2> points =
2409 { {
2410 { 0.0f, radius },
2411 { 1.0f, targetRadius }
2412 } };
2413
2414 at->SetOverrideScaleCurve(points);
2415 }
2416
2418 {
2419 Unit* target = at->GetTarget();
2420 if (!target)
2421 return;
2422
2423 float radiusMod = 1.0f - (_absorbDone / (float)_absorbRequired);
2424 float targetRadius = BEFOULED_BARRIER_MAX_RADIUS * radiusMod;
2425 float currentRadius = at->GetMaxSearchRadius();
2426
2427 if (G3D::fuzzyEq(currentRadius, targetRadius))
2428 return;
2429
2430 // Players need to be able to actually enter the AT to heal it no sniff has a value lower than 4.0f
2431 if (targetRadius <= BEFOULED_BARRIER_MIN_RADIUS)
2432 return;
2433
2434 UpdateSize(currentRadius, targetRadius);
2435 }
2436
2437 void OnUpdate(uint32 diff) override
2438 {
2439 _scheduler.Update(diff);
2440 }
2441
2442 void OnUnitEnter(Unit* unit) override
2443 {
2444 Unit* caster = at->GetCaster();
2445 if (!caster)
2446 return;
2447
2448 caster->CastSpell(unit, SPELL_BEFOULED_BARRIER_DEBUFF, true);
2449 }
2450
2451 void OnUnitExit(Unit* unit) override
2452 {
2454 }
2455
2456 void Absorb(uint32 absorbAmount)
2457 {
2458 _absorbDone += absorbAmount;
2459
2461 return;
2462
2463 Unit* target = at->GetTarget();
2464 if (!target)
2465 return;
2466
2467 // remove barrier, we're done healing
2468 if (Creature* creature = target->ToCreature())
2469 {
2470 creature->CastSpell(creature, SPELL_BEFOULED_BARRIER_CLEAR, true);
2471 creature->DespawnOrUnsummon(1s);
2472 }
2473 }
2474
2476 {
2478 }
2479
2480private:
2484};
2485
2486float constexpr BEACON_OF_HOPE_MAX_RADIUS = 12.0f;
2487float constexpr BEACON_OF_HOPE_MIN_RADIUS = 4.0f;
2488
2489// 362702 - Beacon of Hope - CreatePropertiesId: 25025 / 24247
2491{
2493 _instance(at->GetInstanceScript()), _entries(0), _chargesRemaining(40) { }
2494
2495 void OnInitialize() override
2496 {
2497 _entries = 0;
2498 _chargesRemaining = 40;
2499 }
2500
2501 void OnCreate(Spell const* /*creatingSpell*/) override
2502 {
2503 _scheduler.Schedule(500ms, [this](TaskContext task)
2504 {
2505 float startRadius = 1.0f;
2506 float targetRadius = BEACON_OF_HOPE_MAX_RADIUS;
2507
2508 UpdateSize(startRadius, targetRadius);
2510
2512 {
2513 UpdateSizeBasedOnCharges();
2514 task.Repeat();
2515 });
2516 });
2517 }
2518
2519 void UpdateSize(float radius, float targetRadius) const
2520 {
2521 std::array<DBCPosition2D, 2> points =
2522 { {
2523 { 0.0f, radius },
2524 { 1.0f, targetRadius }
2525 } };
2526
2527 at->SetOverrideScaleCurve(points);
2528 }
2529
2531 {
2532 float radiusMod = 0.205129f * _entries;
2533 float targetRadius = BEACON_OF_HOPE_MAX_RADIUS - radiusMod;
2534
2535 if (targetRadius <= BEACON_OF_HOPE_MIN_RADIUS || _chargesRemaining <= 0)
2536 at->Remove();
2537
2538 float currentRadius = at->GetMaxSearchRadius();
2539 if (G3D::fuzzyEq(currentRadius, targetRadius))
2540 return;
2541
2542 UpdateSize(currentRadius, targetRadius);
2543 }
2544
2545 void OnUpdate(uint32 diff) override
2546 {
2547 _scheduler.Update(diff);
2548 }
2549
2550 void OnUnitEnter(Unit* unit) override
2551 {
2552 if (!unit->IsPlayer())
2553 return;
2554
2555 if (!at->GetCaster())
2556 return;
2557
2559 if (!beacon)
2560 return;
2561
2562 beacon->CastSpell(beacon, SPELL_PURGING_LIGHT, true);
2564
2565 if (at->GetMap()->IsMythic())
2566 {
2567 _entries++;
2569 beacon->CastSpell(unit, SPELL_FRAGMENT_OF_HOPE_AREATRIGGER, true);
2570 }
2571 }
2572
2573private:
2578};
2579
2580// 365816 - Fragment of Hope
2582{
2583 void SetDest(SpellDestination& destination) const
2584 {
2585 Unit* caster = GetCaster();
2586 Position dest = caster->GetPosition();
2587
2589 beacon->MovePositionToFirstCollision(dest, 30.0f, beacon->GetAbsoluteAngle(GetExplTargetWorldObject()) - beacon->GetOrientation());
2590
2591 destination.Relocate(dest);
2592 }
2593
2594 void Register() override
2595 {
2597 }
2598};
2599
2600// 365293 - Befouled Barrier
2602{
2603 bool Validate(SpellInfo const* spellInfo) override
2604 {
2606 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } });
2607 }
2608
2609 void OnHealAbsorb(AuraEffect* /*aurEff*/, HealInfo const& healInfo, uint32& absorbAmount) const
2610 {
2611 absorbAmount = CalculatePct(healInfo.GetHeal(), GetEffectInfo(EFFECT_2).CalcValue());
2612
2613 Unit* caster = GetCaster();
2614 if (!caster)
2615 return;
2616
2618 if (!barrier)
2619 return;
2620
2621 at_anduin_wrynn_befouled_barrier* barrierScript = dynamic_cast<at_anduin_wrynn_befouled_barrier*>(barrier->AI());
2622 if (!barrierScript)
2623 return;
2624
2625 barrierScript->Absorb(absorbAmount);
2626 }
2627
2628 void Register() override
2629 {
2631 }
2632};
2633
2634// 365173 - Befouled Barrier Expire
2636{
2637 bool Validate(SpellInfo const* /*spellInfo*/) override
2638 {
2640 }
2641
2642 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
2643 {
2644 Unit* target = GetTarget();
2645 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
2646 {
2648 if (!barrier)
2649 return;
2650
2651 at_anduin_wrynn_befouled_barrier* barrierScript = dynamic_cast<at_anduin_wrynn_befouled_barrier*>(barrier->AI());
2652 if (!barrierScript)
2653 return;
2654
2656 }
2657
2658 if (Creature* creatureTarget = target->ToCreature())
2659 creatureTarget->DespawnOrUnsummon();
2660 }
2661
2662 void Register() override
2663 {
2665 }
2666};
2667
2668// 361989 - Blasphemy
2670{
2671 bool Validate(SpellInfo const* /*spellInfo*/) override
2672 {
2674 }
2675
2676 void OnPrecast() override
2677 {
2679 }
2680
2681 void FilterTargets(std::list<WorldObject*>& targets)
2682 {
2683 int64 hopelessnessAffected = targets.size() / 2;
2684 int64 maxAffected = hopelessnessAffected * 2;
2685 Trinity::Containers::RandomResize(targets, maxAffected);
2686
2687 for (WorldObject* target : targets)
2688 {
2689 if (hopelessnessAffected > 0)
2690 {
2692 hopelessnessAffected--;
2693 }
2694 else
2696 }
2697 }
2698
2699 void HandleDebuff(SpellEffIndex /*effIndex*/)
2700 {
2702 if (!spellId)
2703 return;
2704
2705 GetCaster()->CastSpell(GetHitUnit(), *spellId, true);
2706 }
2707
2708 void Register() override
2709 {
2712 }
2713
2714private:
2715 std::unordered_map<ObjectGuid /*player*/, uint32 /*spell*/> _spellAssignments;
2716};
2717
2718// 361992 - Overconfidence CreatePropertiesId: 24616
2719// 361993 - Hopelessness CreatePropertiesId: 24616
2721{
2722 at_anduin_wrynn_blasphemy(AreaTrigger* areatrigger) : AreaTriggerAI(areatrigger) { }
2723
2724 void OnUnitEnter(Unit* unit) override
2725 {
2726 if (!unit->IsPlayer() || unit->HasAura(SPELL_BLASPHEMY_PRE_HIT))
2727 return;
2728
2729 if (!unit->IsAlive())
2730 at->Remove();
2731
2732 if (unit->HasAura(at->GetSpellId()))
2733 {
2734 uint32 explodeSpellId = SPELL_BLASPHEMY_EXPLODE;
2735 if (at->GetMap()->IsLFR() || at->GetMap()->IsNormal())
2736 explodeSpellId = SPELL_BLASPHEMY_EXPLODE_LFR_NORMAL;
2737
2738 unit->CastSpell(unit, explodeSpellId, true);
2740 if (Unit* target = at->GetTarget())
2741 {
2742 target->CastSpell(target, explodeSpellId, true);
2743 target->RemoveAurasDueToSpell(at->GetSpellId());
2744 }
2745 }
2747 {
2750 unit->CastSpell(unit, SPELL_BLASPHEMY_SUCCESS, true);
2751 if (Unit* target = at->GetTarget())
2752 {
2753 target->RemoveAurasDueToSpell(SPELL_BLASPHEMY_HOPELESSNESS);
2754 target->RemoveAurasDueToSpell(SPELL_BLASPHEMY_HOPELESSNESS_AREATRIGGER);
2755 target->CastSpell(target, SPELL_BLASPHEMY_SUCCESS, true);
2756 }
2757 }
2759 {
2762 unit->CastSpell(unit, SPELL_BLASPHEMY_SUCCESS, true);
2763 if (Unit* target = at->GetTarget())
2764 {
2765 target->RemoveAurasDueToSpell(SPELL_BLASPHEMY_OVERCONFIDENCE);
2766 target->RemoveAurasDueToSpell(SPELL_BLASPHEMY_OVERCONFIDENCE_AREATRIGGER);
2767 target->CastSpell(target, SPELL_BLASPHEMY_SUCCESS, true);
2768 }
2769 }
2770 else
2771 {
2772 // On Mythic players walking in with no debuff also trigger explosion
2773 if (!at->GetMap()->IsMythic())
2774 return;
2775
2777 {
2778 if (Unit* target = at->GetTarget())
2779 target->CastSpell(target, SPELL_BLASPHEMY_EXPLODE, true);
2780 }
2781 }
2782 }
2783};
2784
2785// 361992 - Overconfidence
2786// 361993 - Hopelessness
2788{
2789 bool Validate(SpellInfo const* /*spell*/) override
2790 {
2791 return ValidateSpellInfo(
2792 {
2795 });
2796 }
2797
2798 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
2799 {
2800 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
2801 {
2802 Unit* target = GetTarget();
2803 uint32 explodeSpellId = SPELL_BLASPHEMY_EXPLODE;
2804 if (target->GetMap()->IsLFR() || target->GetMap()->IsNormal())
2805 explodeSpellId = SPELL_BLASPHEMY_EXPLODE_LFR_NORMAL;
2806
2807 target->CastSpell(target, explodeSpellId, true);
2808 }
2809 }
2810
2811 void Register() override
2812 {
2814 }
2815};
2816
2817// 365021 - Wicked Star
2819{
2820 void FilterTargets(std::list<WorldObject*>& targets)
2821 {
2822 uint32 rangedDpsCount = 0;
2823 for (WorldObject* target : targets)
2824 {
2825 Player* targetPlayer = target->ToPlayer();
2826 if (!targetPlayer)
2827 continue;
2828
2829 ChrSpecializationEntry const* spec = targetPlayer->GetPrimarySpecializationEntry();
2830 if (!spec)
2831 continue;
2832
2833 if (!targetPlayer->IsAlive())
2834 continue;
2835
2836 if ((spec->GetRole() == ChrSpecializationRole::Dps && spec->GetFlags().HasFlag(ChrSpecializationFlag::Caster)) ||
2838 rangedDpsCount++;
2839 }
2840
2841 targets.remove_if([rangedDpsCount](WorldObject* target) -> bool
2842 {
2843 Player* player = target->ToPlayer();
2844 if (!player || player->HasAura(SPELL_WICKED_STAR_TARGETED))
2845 return true;
2846
2848 return true;
2849
2850 if (rangedDpsCount >= 3)
2851 {
2853 return true;
2854
2856 return true;
2857 }
2858 return false;
2859 });
2860 }
2861
2862 void Register() override
2863 {
2865 }
2866};
2867
2868// 365021 - Wicked Star
2870{
2871 bool Validate(SpellInfo const* /*spellInfo*/) override
2872 {
2874 }
2875
2877 {
2879 }
2880
2882 {
2884 }
2885
2886 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
2887 {
2888 Unit* caster = GetCaster();
2889 Unit* target = GetTarget();
2890 if (!caster)
2891 return;
2892
2893 caster->CastSpell(target, SPELL_WICKED_STAR_TARGETED, true);
2894
2895 if (Creature* creature = caster->ToCreature())
2896 if (CreatureAI* anduinAI = creature->AI())
2897 anduinAI->Talk(GetAnnounceGroupID(), target);
2898 }
2899
2900 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
2901 {
2902 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
2903 return;
2904
2905 Unit* caster = GetCaster();
2906 if (!caster)
2907 return;
2908
2909 float angle = caster->GetAbsoluteAngle(GetTarget());
2910 Position spellDest(caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), angle);
2911
2912 if (InstanceScript* instance = GetTarget()->GetInstanceScript())
2913 if (Creature* anduin = instance->GetCreature(DATA_ANDUIN_WRYNN))
2914 anduin->CastSpell(spellDest, GetAreaTriggerSpellID(), true);
2915 }
2916
2917 void Register() override
2918 {
2921 }
2922};
2923
2924// 365017 - Wicked Star CreatePropertiesId: 24741
2926{
2928
2929 static constexpr float GetWickedStarSpeed(Difficulty difficulty)
2930 {
2931 // in yards per second
2932 switch (difficulty)
2933 {
2936 return 18.0f;
2937 default: // LFR + Normal
2938 return 15.0f;
2939 }
2940 }
2941
2942 void OnInitialize() override
2943 {
2944 if (Unit* caster = at->GetCaster())
2945 {
2946 at->SetOrientation(caster->GetOrientation());
2947
2948 Position destPos = caster->GetPosition();
2949 at->MovePositionToFirstCollision(destPos, 100.0f, 0.0f);
2950
2951 std::vector<G3D::Vector3> splinePoints;
2952 splinePoints.push_back(PositionToVector3(at->GetPosition()));
2953 splinePoints.push_back(PositionToVector3(at->GetPosition()));
2954 splinePoints.push_back(PositionToVector3(destPos));
2955 splinePoints.push_back(PositionToVector3(at->GetPosition()));
2956 splinePoints.push_back(PositionToVector3(at->GetPosition()));
2957
2958 float timeToTarget = at->GetDistance(destPos.GetPositionX(), destPos.GetPositionY(), destPos.GetPositionZ()) * 2 / GetWickedStarSpeed(at->GetMap()->GetDifficultyID()) * 1000;
2959 at->InitSplines(std::move(splinePoints), timeToTarget);
2960 }
2961 }
2962
2963 void OnUnitEnter(Unit* unit) override
2964 {
2967 return;
2968
2969 Unit* caster = at->GetCaster();
2970 if (!caster)
2971 return;
2972
2973 if (caster->IsValidAttackTarget(unit))
2975 else if (caster->IsValidAssistTarget(unit))
2977 }
2978
2979 void OnDestinationReached() override
2980 {
2981 at->Remove();
2982 }
2983};
2984
2985// 367632 - Empowered Wicked Star
2987{
2988 uint8 GetAnnounceGroupID() const override
2989 {
2991 }
2992
2994 {
2996 }
2997};
2998
2999// 367621 - Empowered Wicked Star CreatePropertiesId: 24599
3001{
3003
3004 static float constexpr EMPOWERED_WICKED_STAR_SPEED = 14.0f; // in yards per second
3005
3006 void HandleMovement(float angle) const
3007 {
3008 Unit* caster = at->GetCaster();
3009 if (!caster)
3010 return;
3011
3012 // hack: when reflection is implemented use at position instead of center; due to mmaps we are causing infinite loop if using at position after dest reach
3014 at->MovePositionToFirstCollision(destPos, 100.0f, angle);
3015
3016 std::vector<G3D::Vector3> splinePoints;
3017 splinePoints.push_back(PositionToVector3(at));
3018 splinePoints.push_back(PositionToVector3(at));
3019 splinePoints.push_back(PositionToVector3(destPos));
3020 splinePoints.push_back(PositionToVector3(destPos));
3021
3022 float timeToTarget = at->GetDistance(destPos.GetPositionX(), destPos.GetPositionY(), destPos.GetPositionZ()) / EMPOWERED_WICKED_STAR_SPEED * 1000;
3023 at->InitSplines(std::move(splinePoints), timeToTarget);
3024 }
3025
3026 void OnInitialize() override
3027 {
3028 HandleMovement(0);
3029 }
3030
3031 void OnDestinationReached() override
3032 {
3033 // hack: angle should use physical laws for reflection
3034 HandleMovement(frand(0, 2.0f * float(M_PI)));
3035 }
3036};
3037
3038// 362405 - Kingsmourne Hungers
3040{
3041 bool Validate(SpellInfo const* /*spellInfo*/) override
3042 {
3043 return ValidateSpellInfo(
3044 {
3049 });
3050 }
3051
3052 void HandleDummyEffect(SpellEffIndex /*effIndex*/) const
3053 {
3054 Unit* caster = GetCaster();
3055 Unit* hitUnit = GetHitUnit();
3056 caster->CastSpell(hitUnit, SPELL_KINGSMOURNE_HUNGERS_DAMAGE, true);
3057 if (caster->GetMap()->IsMythic())
3058 hitUnit->CastSpell(hitUnit, SPELL_SEVERED_SOUL, true);
3059 caster->CastSpell(hitUnit, SPELL_LOST_SOUL_DIMENSION);
3060 hitUnit->CastSpell(hitUnit, SPELL_LOST_SOUL, true);
3061 }
3062
3063 void OnCast() const
3064 {
3066 if (!instance)
3067 return;
3068
3069 if (Creature* anduinSoul = instance->GetCreature(DATA_ANDUIN_SOUL))
3070 anduinSoul->GetAI()->DoAction(ACTION_SUMMON_KINGSMOURNE_SOULS);
3071 }
3072
3073 void Register() override
3074 {
3077 }
3078};
3079
3080// 362055 - Lost Soul
3082{
3083 bool Validate(SpellInfo const* /*spellInfo*/) override
3084 {
3085 return ValidateSpellInfo(
3086 {
3089 });
3090 }
3091
3092 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
3093 {
3094 Unit* target = GetTarget();
3095 _lostSoulPosition = target->GetPosition();
3096 target->CastSpell(target, SPELL_LOST_SOUL_GRACE, true);
3097 }
3098
3099 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
3100 {
3101 Unit* target = GetTarget();
3102 switch (GetTargetApplication()->GetRemoveMode())
3103 {
3106 target->CastSpell(target, SPELL_SCARRED_SOUL, true);
3107 break;
3109 {
3110 if (target->GetMap()->IsMythic())
3111 {
3112 target->KillSelf();
3114 }
3115 break;
3116 }
3118 {
3119 target->CastSpell(target, SPELL_SCARRED_SOUL, true);
3120 if (target->GetMap()->IsMythic())
3122 break;
3123 }
3124 default:
3125 break;
3126 }
3127 }
3128
3129 void Register() override
3130 {
3133 }
3134
3136};
3137
3138// 362392 - Rain of Despair
3140{
3141 void HandleDespair(SpellEffIndex effIndex) const
3142 {
3143 GetCaster()->CastSpell(GetHitUnit(), GetEffectInfo(effIndex).TriggerSpell, true);
3144 }
3145
3146 void Register() override
3147 {
3149 }
3150};
3151
3152// 362766 - Soul Despawn
3154{
3155 void OnCast() const
3156 {
3157 if (Creature* creature = GetCaster()->ToCreature())
3158 if (creature->GetEntry() == NPC_ANDUIN_HOPE || creature->GetEntry() == NPC_ANDUIN_DOUBT)
3159 creature->DespawnOrUnsummon(3s);
3160 }
3161
3162 void Register() override
3163 {
3165 }
3166};
3167
3168// 368913 - Force of Will
3170{
3171 void RecalculateHook(AuraEffect const* /*aurEffect*/, int32& amount, bool& canBeRecalculated) const
3172 {
3173 Unit* caster = GetCaster();
3174 if (!caster)
3175 return;
3176
3177 // at 100 will power = 200% Damage Done increase
3178 int32 powerValue = caster->GetPower(caster->GetPowerType());
3179 amount = 2 * powerValue;
3180 canBeRecalculated = false;
3181 }
3182
3183 void RecalculateHookDamageTaken(AuraEffect const* /*aurEffect*/, int32& amount, bool& canBeRecalculated) const
3184 {
3185 Unit* caster = GetCaster();
3186 if (!caster)
3187 return;
3188
3189 // Damage Taken reduction can only be capped to 90%
3190 int32 powerValue = caster->GetPower(caster->GetPowerType());
3191 amount = -std::min(powerValue, 90);
3192 canBeRecalculated = false;
3193 }
3194
3195 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
3196 {
3197 Unit* caster = GetCaster();
3198 if (!caster)
3199 return;
3200
3201 caster->SetPower(caster->GetPowerType(), 0);
3202 }
3203
3204 void Register() override
3205 {
3210 }
3211};
3212
3213// 363233 - March of the Damned
3215{
3216 void OnPeriodic(AuraEffect const* aurEff)
3217 {
3218 Unit* caster = GetCaster();
3219 if (!caster)
3220 return;
3221
3222 Seconds raidDifficulty = 0s;
3223
3224 switch (GetCaster()->GetMap()->GetDifficultyID())
3225 {
3226 case DIFFICULTY_LFR_NEW:
3229 raidDifficulty = 28s;
3230 break;
3232 raidDifficulty = 21s;
3233 break;
3234 default:
3235 raidDifficulty = 28s;
3236 break;
3237 }
3238
3239 // Don't summon the wall on aura granted
3240 if (aurEff->GetTickNumber() == 1)
3241 return;
3242
3243 if (_availableSpawnPositions.empty())
3244 return;
3245
3247 auto it = std::find(_availableSpawnPositions.begin(), _availableSpawnPositions.end(), chosenPosition);
3248 _availableSpawnPositions.erase(it);
3249
3250 GetCaster()->SummonCreature(NPC_MARCH_OF_THE_DAMNED, chosenPosition, TEMPSUMMON_TIMED_DESPAWN, raidDifficulty);
3251 }
3252
3253 void Register() override
3254 {
3256 }
3257
3259};
3260
3261// 362500 - Shade Spawn Ceremony
3263{
3264 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
3265 {
3266 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
3268 }
3269
3270 void Register() override
3271 {
3273 }
3274};
3275
3276// 365652 - Lost Soul
3278{
3279 void FilterTargets(std::list<WorldObject*>& unitList) const
3280 {
3281 unitList.remove_if([this](WorldObject const* target)
3282 {
3283 if (target->GetEntry() == NPC_ANDUIN_DOUBT && target->IsWithinDistInMap(GetCaster(), 0.2f))
3284 return false;
3285 return true;
3286 });
3287 }
3288
3289 void HandleDummy(SpellEffIndex /*effIndex*/) const
3290 {
3291 if (Creature* creature = GetHitUnit()->ToCreature())
3292 creature->DespawnOrUnsummon();
3293 }
3294
3295 void Register() override
3296 {
3299 }
3300};
3301
3302// 367769 - Severed Soul
3304{
3305 bool Validate(SpellInfo const* /*spellInfo*/) override
3306 {
3308 }
3309
3310 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
3311 {
3312 if (Unit* caster = GetCaster())
3313 _soulPosition = caster->GetPosition();
3314 }
3315
3316 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
3317 {
3318 Unit* caster = GetCaster();
3319 if (!caster)
3320 return;
3321
3322 caster->CastSpell(caster, SPELL_CANCEL_LOST_SOUL, true);
3323
3324 if (TempSummon* summon = GetTarget()->ToTempSummon())
3325 if (summon->GetSummonerUnit() == caster)
3327 }
3328
3329 void Register() override
3330 {
3333 }
3334
3336};
3337
3338// 362402 - Lost Soul Mirror Image
3340{
3341 void FilterTargets(std::list<WorldObject*>& targets) const
3342 {
3343 Unit* caster = GetCaster();
3344 if (!caster)
3345 return;
3346
3347 ObjectGuid casterGuid = caster->GetGUID();
3348
3349 targets.remove_if([casterGuid](WorldObject const* target) -> bool
3350 {
3351 Unit const* unit = target->ToUnit();
3352 if (!unit)
3353 return true;
3354
3355 TempSummon const* summon = unit->ToTempSummon();
3356 if (!summon)
3357 return true;
3358
3359 if (summon->GetSummonerGUID() != casterGuid)
3360 return true;
3361
3362 return false;
3363 });
3364 }
3365
3366 void Register() override
3367 {
3372 }
3373};
3374
3375// 363029 - Soul Explosion
3377{
3378 bool Validate(SpellInfo const* /*spellInfo*/) override
3379 {
3381 }
3382
3383 void FilterTargets(std::list<WorldObject*>& targets) const
3384 {
3385 if (targets.empty())
3386 return;
3387
3388 targets.remove_if(Trinity::ObjectTypeIdCheck(TYPEID_PLAYER, false));
3389
3390 std::vector<WorldObject*> rangedTargets;
3391 for (WorldObject* target : targets)
3392 {
3393 if (target->GetDistance(GetCaster()) >= 5.0f)
3394 {
3395 rangedTargets.push_back(target);
3396 break;
3397 }
3398 }
3399
3400 if (!rangedTargets.empty())
3401 {
3402 targets.clear();
3403 targets.push_back(Trinity::Containers::SelectRandomContainerElement(rangedTargets));
3404 }
3405 }
3406
3407 void HandleMissile(SpellEffIndex /*effIndex*/) const
3408 {
3410 }
3411
3412 void Register() override
3413 {
3416 }
3417};
3418
3419// 363022 - Return to Kingsmourne
3421{
3422 bool Validate(SpellInfo const* /*spellInfo*/) override
3423 {
3425 }
3426
3427 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
3428 {
3429 Unit* caster = GetCaster();
3430 if (!caster)
3431 return;
3432
3434 }
3435
3436 void Register() override
3437 {
3439 }
3440};
3441
3442// 363021 - Return to Kingsmourne
3444{
3445 bool Validate(SpellInfo const* /*spellInfo*/) override
3446 {
3447 return ValidateSpellInfo(
3448 {
3451 });
3452 }
3453
3454 void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
3455 {
3456 Unit* caster = GetCaster();
3457 if (!caster)
3458 return;
3459
3460 InstanceScript* instance = caster->GetInstanceScript();
3461 if (!instance)
3462 return;
3463
3464 if (Creature* arthas = instance->GetCreature(DATA_REMNANT_OF_A_FALLEN_KING))
3465 arthas->AI()->EnterEvadeMode(EvadeReason::Other);
3466
3467 if (Creature* anduin = instance->GetCreature(DATA_ANDUIN_WRYNN))
3468 {
3469 anduin->RemoveAurasDueToSpell(SPELL_DOMINATION_GRASP_ROOT_AREATRIGGER);
3472 if (anduin->IsAIEnabled())
3473 {
3474 anduin->AI()->DoAction(ACTION_EXIT_INTERMISSION);
3475 anduin->AI()->DoCastSelf(SPELL_CANCEL_FORCE_OF_WILL);
3476 }
3477 }
3478 }
3479
3480 void Register() override
3481 {
3483 }
3484};
3485
3486// 365120 - Grim Reflections
3488{
3489 bool Validate(SpellInfo const* /*spellInfo*/) override
3490 {
3492 }
3493
3494 void HandleCast() const
3495 {
3496 uint8 reflectionsNumber = GetCaster()->GetMap()->IsMythic() ? 4 : 3;
3497 std::vector<Position> grimReflectionPositions(std::begin(GrimReflectionsSpawnPositions), std::end(GrimReflectionsSpawnPositions));
3498 Trinity::Containers::RandomResize(grimReflectionPositions, reflectionsNumber);
3499
3500 for (uint8 i = 0; i < reflectionsNumber; i++)
3501 GetCaster()->CastSpell(grimReflectionPositions[i], SPELL_GRIM_REFLECTIONS_SUMMON, true);
3502 }
3503
3504 void Register() override
3505 {
3507 }
3508};
3509
3510// 365872 - Beacon of Hope
3512{
3513 void OnCast() const
3514 {
3516 }
3517
3518 void Register() override
3519 {
3521 }
3522};
3523
3524// 365958 - Hopelessness
3526{
3527 bool Validate(SpellInfo const* /*spellInfo*/) override
3528 {
3529 return ValidateSpellInfo(
3530 {
3533 });
3534 }
3535
3536 void OnPrecast() override
3537 {
3539 }
3540
3541 void HandleDebuff(SpellEffIndex /*effIndex*/) const
3542 {
3544 }
3545
3546 void Register() override
3547 {
3549 }
3550};
3551
3552// 365966 - Hopelessness CreatePropertiesId 24443
3554{
3556
3557 void OnUnitEnter(Unit* unit) override
3558 {
3559 if (!unit->IsPlayer() || unit->HasAura(SPELL_BLASPHEMY_PRE_HIT))
3560 return;
3561
3562 if (!unit->IsAlive())
3563 {
3564 at->Remove();
3565 return;
3566 }
3567
3568 if (unit->HasAura(at->GetSpellId()))
3569 {
3570 unit->CastSpell(unit, SPELL_BLASPHEMY_EXPLODE, true);
3571 if (Unit* target = at->GetTarget())
3572 target->CastSpell(target, SPELL_BLASPHEMY_EXPLODE, true);
3573 }
3574 }
3575
3576 void OnUnitExit(Unit* unit) override
3577 {
3578 if (!unit->IsAlive() && unit->HasAura(at->GetSpellId()))
3580 }
3581};
3582
3583// 365966 - Hopelessness
3585{
3586 bool Validate(SpellInfo const* /*spell*/) override
3587 {
3589 }
3590
3591 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
3592 {
3593 switch (GetTargetApplication()->GetRemoveMode())
3594 {
3599 break;
3600 default:
3601 break;
3602 }
3603 }
3604
3605 void Register() override
3606 {
3608 }
3609};
3610
3611// 365291 - Remnant Timer
3613{
3614 static constexpr std::array<int32, 3> RemnantRegenCycle = { 1, 1, 2 };
3615
3616 void HandlePeriodic(AuraEffect const* /*aurEff*/)
3617 {
3618 Unit* target = GetTarget();
3619 int32 powerGained = RemnantRegenCycle[_powerRegenCycle++];
3620
3621 if (_powerRegenCycle > 2)
3622 _powerRegenCycle = 1;
3623
3624 target->ModifyPower(target->GetPowerType(), powerGained);
3625 }
3626
3627 void Register() override
3628 {
3630 }
3631
3633};
3634
3635// 362862 - Army of the Dead
3637{
3638 bool Validate(SpellInfo const* /*spell*/) override
3639 {
3641 }
3642
3643 void HandleAfterCast() const
3644 {
3645 if (GetCaster()->GetMap()->IsLFR())
3646 return;
3647
3648 Position monstrousSoulSpawnPosition = GetCaster()->GetNearPosition(frand(30.0f, 50.0f), frand(0.0f, 3.5f));
3649 GetCaster()->CastSpell(monstrousSoulSpawnPosition, SPELL_ECHOES_OF_ANDORHAL_MONSTROUS_SOUL, true);
3650 }
3651
3652 void Register() override
3653 {
3655 }
3656};
3657
3658// 362543 - Remorseless Winter
3660{
3661 void OnPeriodic(AuraEffect const* /*aurEff*/) const
3662 {
3663 Unit* caster = GetCaster();
3664 if (!caster)
3665 return;
3666
3668 }
3669
3670 void Register() override
3671 {
3673 }
3674};
3675
3676// 362545 - Remorseless Winter
3678{
3679 void HandleDamage(SpellEffIndex /*effIndex*/)
3680 {
3681 Unit* caster = GetCaster();
3682 if (!caster)
3683 return;
3684
3686 if (!remorselessWinter)
3687 return;
3688
3689 SetHitDamage(int32(GetHitDamage() * remorselessWinter->GetStackAmount()));
3690 }
3691
3692 void Register() override
3693 {
3695 }
3696};
3697
3698// 362771 - Soul Reaper
3700{
3701 bool Validate(SpellInfo const* /*spell*/) override
3702 {
3703 return ValidateSpellInfo
3704 ({
3709 });
3710 }
3711
3712 void HandleDummyEffect(SpellEffIndex /*effIndex*/) const
3713 {
3714 Unit* caster = GetCaster();
3715 Unit* hitUnit = GetHitUnit();
3716 caster->CastSpell(hitUnit, SPELL_SOUL_REAPER_PHYSICAL_DAMAGE, true);
3717 caster->CastSpell(hitUnit, SPELL_SOUL_REAPER_SHADOWFROST_DAMAGE, true);
3718 caster->CastSpell(hitUnit, SPELL_SOUL_REAPER_DEBUFF, true);
3719 caster->CastSpell(caster, SPELL_SOUL_REAPER_ATTACK_SPEED, true);
3721 }
3722
3723 void Register() override
3724 {
3726 }
3727};
3728
3729// Anduin Wrynn Introduction Custom AT
3731{
3733
3734 void OnUnitEnter(Unit* unit) override
3735 {
3736 Player* player = unit->ToPlayer();
3737 if (!player || player->IsGameMaster())
3738 return;
3739
3740 InstanceScript* instance = at->GetInstanceScript();
3741 if (!instance)
3742 return;
3743
3744 if (Creature* anduin = instance->GetCreature(DATA_ANDUIN_WRYNN))
3745 anduin->GetAI()->DoAction(ACTION_START_PRE_INTRODUCTION);
3746
3747 at->Remove();
3748 }
3749};
3750
3751// 956 - Anduin End Movie
3753{
3754public:
3755 movie_anduin_final() : PlayerScript("movie_anduin_final") { }
3756
3758 {
3759 _skippedPlayers.insert(playerId);
3760 }
3761
3762 void OnMovieComplete(Player* player, uint32 /*movieId*/) override
3763 {
3764 InstanceScript* instance = player->GetInstanceScript();
3765 if (!instance)
3766 return;
3767
3768 Creature* anduin = instance->GetCreature(DATA_ANDUIN_WRYNN);
3769 if (!anduin)
3770 return;
3771
3772 MarkPlayerAsSkipped(static_cast<uint32>(player->GetGUID().GetCounter()));
3774
3775 // Outroduction must start once every player skips or completes the movie
3776 if (_skippedPlayers.size() == player->GetMap()->GetPlayersCountExceptGMs())
3778 }
3779
3780private:
3781 std::unordered_set<uint32> _skippedPlayers;
3782};
3783
3785{
3801
3838
3847
3848 new movie_anduin_final();
3849}
#define M_PI
Definition: Common.h:115
Difficulty
Definition: DBCEnums.h:873
@ DIFFICULTY_MYTHIC_RAID
Definition: DBCEnums.h:888
@ DIFFICULTY_NORMAL_RAID
Definition: DBCEnums.h:886
@ DIFFICULTY_HEROIC_RAID
Definition: DBCEnums.h:887
@ DIFFICULTY_LFR_NEW
Definition: DBCEnums.h:889
uint8_t uint8
Definition: Define.h:144
int64_t int64
Definition: Define.h:137
int32_t int32
Definition: Define.h:138
uint64_t uint64
Definition: Define.h:141
uint32_t uint32
Definition: Define.h:142
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition: Duration.h:32
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition: Duration.h:29
@ IN_PROGRESS
@ DONE
@ ENCOUNTER_FRAME_DISENGAGE
@ ENCOUNTER_FRAME_ENGAGE
@ POINT_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: ObjectDefines.h:70
@ TEMPSUMMON_TIMED_DESPAWN
Definition: ObjectDefines.h:65
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
float frand(float min, float max)
Definition: Random.cpp:55
if(posix_memalign(&__mallocedMemory, __align, __size)) return NULL
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition: ScriptMgr.h:1371
#define RegisterAreaTriggerAI(ai_name)
Definition: ScriptMgr.h:1416
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
#define RegisterSpellAndAuraScriptPairWithArgs(script_1, script_2, script_name,...)
Definition: ScriptMgr.h:1370
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
void GetPlayerListInGrid(Container &container, WorldObject *source, float maxSearchRange, bool alive=true)
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_3
Definition: SharedDefines.h:33
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_0
Definition: SharedDefines.h:30
@ EFFECT_2
Definition: SharedDefines.h:32
@ TARGET_UNIT_SRC_AREA_ENTRY
@ TARGET_DEST_DEST
@ TARGET_UNIT_SRC_AREA_ENEMY
@ EMOTE_STATE_READY_BOW
@ EMOTE_STATE_READY2H
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ BASE_ATTACK
@ POWER_ENERGY
@ FACTION_FRIENDLY
@ GO_STATE_ACTIVE
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_DEFAULT
@ AURA_REMOVE_BY_DEATH
@ AURA_REMOVE_BY_EXPIRE
@ AURA_REMOVE_BY_ENEMY_SPELL
@ SPELL_AURA_TRIGGER_SPELL_ON_EXPIRE
@ SPELL_AURA_LINKED_SUMMON
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_MOD_ROOT
@ SPELL_AURA_PHASE
@ SPELL_AURA_SCHOOL_ABSORB
@ SPELL_AURA_MOD_SCALE
@ SPELL_AURA_MOD_SUMMON_DAMAGE
@ SPELL_AURA_AREA_TRIGGER
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_SCREEN_EFFECT
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELL_AURA_MOD_STUN
TriggerCastFlags
Definition: SpellDefines.h:245
@ TRIGGERED_IGNORE_CAST_IN_PROGRESS
Will not check if a current cast is in progress.
Definition: SpellDefines.h:252
@ TRIGGERED_IGNORE_GCD
Will ignore GCD.
Definition: SpellDefines.h:247
@ SPELLVALUE_BASE_POINT1
Definition: SpellDefines.h:197
#define sSpellMgr
Definition: SpellMgr.h:849
#define AuraEffectProcFn(F, I, N)
Definition: SpellScript.h:2160
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define AuraEffectAbsorbHealFn(F, I)
Definition: SpellScript.h:2102
#define AuraEffectCalcAmountFn(F, I, N)
Definition: SpellScript.h:2058
#define SpellObjectAreaTargetSelectFn(F, I, N)
Definition: SpellScript.h:864
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
#define SpellCastFn(F)
Definition: SpellScript.h:825
#define SpellDestinationTargetSelectFn(F, I, N)
Definition: SpellScript.h:874
#define AuraEffectAbsorbFn(F, I)
Definition: SpellScript.h:2090
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:2040
EvadeReason
Definition: UnitAICommon.h:30
@ MOVE_RUN
Definition: UnitDefines.h:118
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ REACT_AGGRESSIVE
Definition: UnitDefines.h:508
DamageEffectType
Definition: UnitDefines.h:131
@ SHEATH_STATE_MELEE
Definition: UnitDefines.h:83
@ SHEATH_STATE_RANGED
Definition: UnitDefines.h:84
@ UNIT_FLAG_NOT_ATTACKABLE_1
Definition: UnitDefines.h:151
@ UNIT_STATE_CASTING
Definition: Unit.h:270
T CalculatePct(T base, U pct)
Definition: Util.h:72
constexpr Position AnduinsDespairSpawnPosition
constexpr Position RightKnightPosition
constexpr Position QuartermasterRahmPos
float constexpr BEACON_OF_HOPE_MAX_RADIUS
constexpr Position AnduinsHopeSpawnPosition[4]
constexpr Position LeftKnightPosition
constexpr Position AnduinsSoulSpawnPosition
constexpr Position PreIntroductionAssistersPositions[3]
constexpr Position GrimReflectionsSpawnPositions[4]
AnduinWrynnSpellVisuals
@ SPELL_VISUAL_CHEST_LOOT
Position const MarchOfTheDamnedSpawnPositions[8]
AnduinWrynnTexts
@ SAY_ANNOUNCE_BLASPHEMY
@ SAY_EMPOWERED_HOPEBREAKER
@ SAY_BEFOULED_BARRIER
@ SAY_KINGSMOURNE_HUNGERS
@ SAY_DISENGAGE
@ SAY_AGGRO
@ SAY_ANNOUNCE_WICKED_STAR
@ SAY_BLASPHEMY
@ SAY_SLAY
@ SAY_GRIM_REFLECTIONS
@ SAY_ANNOUNCE_KINGSMOURNE_HUNGERS
@ SAY_WICKED_STAR
@ SAY_HOPEBREAKER
@ SAY_NECROTIC_DETONATION
@ SAY_ANNOUNCE_EMPOWERED_WICKED_STAR
void AddSC_boss_anduin_wrynn()
AnduinWrynnSpawnGroups
@ SPAWN_GROUP_INITIAL
AnduinWrynnPaths
@ PATH_INTRODUCTION_SYLVANAS
@ PATH_INTRODUCTION_UTHER
@ PATH_OUTRODUCTION_FIRIM
@ PATH_INTRODUCTION_JAINA
@ PATH_OUTRODUCTION_THRALL
@ PATH_OUTRODUCTION_BOLVAR
constexpr Position RemnantOfAFallenKingSpawnPosition
AnduinWrynnPhases
@ PHASE_ONE
@ PHASE_THREE
@ PHASE_TWO
float constexpr BEFOULED_BARRIER_MIN_RADIUS
constexpr Position ChestLootSpawnPosition
constexpr Position IntermissionAssistersTeleportPosition[3]
float constexpr BEFOULED_BARRIER_MAX_RADIUS
AnduinWrynnSpells
@ SPELL_BLINK
@ SPELL_SOUL_EXPLOSION_TRIGGER_MISSILE
@ SPELL_ANDUIN_WILLPOWER_PERIODIC
@ SPELL_HOPEBREAKER_DAMAGE
@ SPELL_PURGING_LIGHT
@ SPELL_BLASPHEMY
@ SPELL_DARK_PRESENCE
@ SPELL_BEFOULED_BARRIER_EXPLODE
@ SPELL_LOST_SOUL_CLEAR
@ SPELL_REMORSELESS_WINTER_PERIODIC
@ SPELL_EMPOWERED_WICKED_STAR_POINTER
@ SPELL_KINGSMOURNE_HUNGERS_DAMAGE
@ SPELL_FROSTBOLT
@ SPELL_RETURN_TO_KINGSMOURNE
@ SPELL_ECHOES_OF_ANDORHAL_FIENDISH_GHOULS
@ SPELL_LOST_SOUL_MIRROR_IMAGE
@ SPELL_WICKED_STAR_PROTECTION
@ SPELL_HOPEBREAKER_CLEAR
@ SPELL_DARK_ZEAL_BUFF
@ SPELL_BLASPHEMY_OVERCONFIDENCE
@ SPELL_BLASPHEMY_PRE_HIT
@ SPELL_POWER_ENERGIZE_WILLPOWER_LARGE
@ SPELL_SOUL_DESPAWN
@ SPELL_EMPOWERED_HOPEBREAKER_EXPLOSION
@ SPELL_DOMINATION_GRASP_ROOT_AREATRIGGER
@ SPELL_BLASPHEMY_IMMUNE
@ SPELL_BEFOULED_ERUPTION
@ SPELL_SHADESTEP
@ SPELL_MIRROR_IMAGE
@ SPELL_BEFOULED_BARRIER_DEBUFF
@ SPELL_BLASPHEMY_HOPELESSNESS
@ SPELL_UNRAVELING_FRENZY_PERIODIC
@ SPELL_MARCH_OF_THE_DAMNED
@ SPELL_PSYCHIC_TERROR
@ SPELL_DESPAWN_WALLS
@ SPELL_FRAGMENT_OF_HOPE_DAMAGE
@ SPELL_WICKED_STAR_POINTER
@ SPELL_UNRAVELING_FRENZY
@ SPELL_SHOOT_BOW
@ SPELL_BLASPHEMY_EXPLODE_LFR_NORMAL
@ SPELL_FRAGMENT_OF_HOPE_AREATRIGGER
@ SPELL_AWARD_ANDUIN_KILL
@ SPELL_ARMY_OF_THE_DEAD
@ SPELL_DOMINATION_WORD_PAIN
@ SPELL_WICKED_STAR_EMPOWERMENT
@ SPELL_ANDUIN_PROGRESSION_AURA
@ SPELL_SEVERED_SOUL
@ SPELL_WICKED_STAR_DAMAGE_SILENCE
@ SPELL_BEACON_OF_HOPE
@ SPELL_GHOST_VISUAL_COSMETIC
@ SPELL_TELEPORT_DOMINATIONS_GRASP
@ SPELL_BEACON_OF_HOPE_AREATRIGGER
@ SPELL_SPAWN_REMNANT
@ SPELL_BEFOULED_BARRIER
@ SPELL_BROKER_SPAWN
@ SPELL_ECHOES_OF_ANDORHAL_MONSTROUS_SOUL
@ SPELL_KINGSMOURNE_HUNGERS
@ SPELL_ANDUIN_SLOW
@ SPELL_TUMBLE
@ SPELL_SOUL_REAPER_DEBUFF
@ SPELL_LOST_SOUL_CONSUME
@ SPELL_DOMINATION_GRASP
@ SPELL_EMPOWERED_WICKED_STAR
@ SPELL_FRAGMENT_OF_HOPE_CLEAR_DEBUFF
@ SPELL_BLASPHEMY_EXPLODE
@ SPELL_WICKED_STAR_IDK
@ SPELL_GRIM_REFLECTIONS
@ SPELL_ANDUIN_LOST_SOUL_TRACKER
@ SPELL_MARCH_OF_THE_DAMNED_DAMAGE
@ SPELL_SHADE_VISUAL
@ SPELL_ANDUIN_PLUNGE_KINGSMOURNE
@ SPELL_ANDUIN_SOUL_DESPAIR
@ SPELL_LOST_SOUL_MYTHIC
@ SPELL_GENERIC_BLINK
@ SPELL_RAIN_OF_DESPAIR
@ SPELL_BLASPHEMY_OVERCONFIDENCE_AREATRIGGER
@ SPELL_RETURN_TO_KINGSMOURNE_VISUALS
@ SPELL_FEIGN_DEATH
@ SPELL_SOUL_REAPER
@ SPELL_LOST_SOUL
@ SPELL_REMNANT_SPAWN
@ SPELL_EMPOWERED_HOPEBREAKER
@ SPELL_GRIM_REFLECTIONS_DEST_SUMMON
@ SPELL_POWER_ENERGIZE_WILLPOWER_SMALL
@ SPELL_POWER_DISPLAY_WILLPOWER
@ SPELL_HOPELESSNESS_HOPELESSNESS_AREATRIGGER
@ SPELL_NECROTIC_CLAWS_LEAP
@ SPELL_LOST_SOUL_DIMENSION
@ SPELL_ECHOES_OF_ANDORHAL
@ SPELL_GLOOM
@ SPELL_REMORSELESS_WINTER_DEBUFF_DAMAGE
@ SPELL_BANISH_SOUL
@ SPELL_BEFOULED_BARRIER_SPHERE_AREATRIGGER
@ SPELL_KINGSMOURNE_HUNGERS_DAMAGE_IDK
@ SPELL_SOUL_EXPLOSION_TARGET
@ SPELL_CANCEL_LOST_SOUL
@ SPELL_LOST_SOUL_GRACE
@ SPELL_REMORSELESS_WINTER_CLEAR
@ SPELL_SOUL_REAPER_PHYSICAL_DAMAGE
@ SPELL_WICKED_STAR_AREATRIGGER
@ SPELL_FINAL_MOVIE
@ SPELL_BEFOULED_BARRIER_CLEAR
@ SPELL_UTHER_CHARGE
@ SPELL_WICKED_STAR
@ SPELL_MARCH_OF_THE_DAMNED_AREATRIGGER
@ SPELL_REMORSELESS_WINTER
@ SPELL_CALAMITY_STATE_VISUAL
@ SPELL_ANDUIN_SOUL_GHOST
@ SPELL_WICKED_STAR_TARGETED
@ SPELL_GRIM_REFLECTIONS_SUMMON
@ SPELL_SOUL_REAPER_SHADOWFROST_DAMAGE
@ SPELL_SOUL_REAPER_ATTACK_SPEED
@ SPELL_HOPELESSNESS_EXPLODE
@ SPELL_HOPEBREAKER_DEBUFF
@ SPELL_EMPOWERED_WICKED_STAR_DAMAGE_SILENCE
@ SPELL_BLADE_OF_JUSTICE
@ SPELL_CANCEL_FORCE_OF_WILL
@ SPELL_NECROTIC_DETONATION
@ SPELL_FORCE_OF_WILL
@ SPELL_HOPEBREAKER
@ SPELL_LOST_SOUL_PERIODIC
@ SPELL_REMNANT_TIMER
@ SPELL_GRIM_FATE
@ SPELL_CANCEL_BLASPHEMY
@ SPELL_SCARRED_SOUL
@ SPELL_EMPOWERED_WICKED_STAR_AREATRIGGER
@ SPELL_ANDUIN_KNEEL_POSE
@ SPELL_BERSERK
@ SPELL_RAIN_OF_DESPAIR_MELEE
@ SPELL_MARCH_OF_THE_DAMNED_PERIODIC
@ SPELL_RAIN_OF_DESPAIR_RANGED
@ SPELL_BLASPHEMY_SUCCESS
@ SPELL_RAIN_OF_DESPAIR_EXPLOSION
@ SPELL_SOUL_EXPLOSION_DAMAGE
@ SPELL_WEATHER_COSMETIC
@ SPELL_HOPELESSNESS_MISSILE
@ SPELL_WICKED_STAR_IDK_3
@ SPELL_NECROTIC_CLAWS_DEBUFF
@ SPELL_BLASPHEMY_HOPELESSNESS_AREATRIGGER
@ SPELL_SHADE_DESPAWN_CEREMONY
@ SPELL_MIRROR_IMAGE_IGNORE_PHASE_SHIFT
@ SPELL_HOPEBREAKER_DEBUFF_DAMAGE
@ SPELL_BEFOULED_BARRIER_BLACK_RING
@ SPELL_TELEPORT_COSMIC_HUB
@ SPELL_DARK_ZEAL_AURA
@ SPELL_HOPELESSNESS
constexpr Position AnduinsDoubtSpawnPositions[4]
float constexpr BEACON_OF_HOPE_MIN_RADIUS
AnduinWrynnEvents
@ EVENT_BLINK
@ EVENT_BLADE_OF_JUSTICE
@ EVENT_UPDATE_BEFOULED_BARRIER
@ EVENT_CANCEL_SYLVANAS_EVENTS
@ EVENT_BLASPHEMY
@ EVENT_BEFOULED_BARRIER
@ EVENT_GRIM_REFLECTIONS
@ EVENT_DOMINATION_WORD_PAIN
@ EVENT_NECROTIC_CLAWS
@ EVENT_EMPOWERED_WICKED_STAR
@ EVENT_ARMY_OF_THE_DEAD
@ EVENT_HOPEBREAKER
@ EVENT_INTERMISSION_ONE
@ EVENT_UNRAVELING_FRENZY
@ EVENT_ANDUIN_SOUL
@ EVENT_HOPELESSNESS
@ EVENT_INTERMISSION_TWO
@ EVENT_BANISH_SOUL
@ EVENT_BERSERK
@ EVENT_TUMBLE
@ EVENT_KINGSMOURNE_HUNGERS
@ EVENT_EMPOWERED_HOPEBREAKER
@ EVENT_RETURN_TO_KINGSMOURNE
@ EVENT_WICKED_STAR
@ EVENT_NECROTIC_DETONATION
@ EVENT_GRIM_REFLECTION_IMMUNITY
@ EVENT_BEACON_OF_HOPE
@ EVENT_SOUL_REAPER
@ EVENT_GHOUL_LEAP
@ EVENT_CANCEL_UTHER_EVENTS
@ EVENT_CANCEL_JAINA_EVENTS
@ EVENT_PSYCHIC_TERROR
AnduinWrynnActions
@ ACTION_END_ENCOUNTER
@ ACTION_NECROTIC_DETONATION
@ ACTION_START_INTRODUCTION
@ ACTION_HOPE_RESTORED
@ ACTION_DESPAWN_REMNANT
@ ACTION_EXIT_INTERMISSION
@ ACTION_SUMMON_KINGSMOURNE_SOULS
@ ACTION_ARTHAS_INTERMISSION_SYLVANAS
@ ACTION_ACTIVATE_REMNANT
@ ACTION_MOVE_NPCS_ON_PLATFORM
@ ACTION_DESPAIR_GONE
@ ACTION_START_PRE_INTRODUCTION
@ ACTION_DOUBT_GONE
@ ACTION_ARTHAS_INTERMISSION_UTHER
@ ACTION_START_OUTRODUCTION
@ ACTION_START_MOVEMENT
constexpr Position DominationGraspCenter
AnduinWrynnConversations
@ CONVERSATION_ANDUIN_OUTRODUCTION
@ CONVERSATION_ANDUIN_PHASE_THREE
@ CONVERSATION_INTRO
@ CONVERSATION_ARTHAS_UTHER
@ CONVERSATION_ARTHAS_SYLVANAS
constexpr Position BeaconOfHopeSpawnPosition
AnduinWrynnPoints
@ POINT_ANDUIN_SOUL
@ POINT_MARCH_OF_THE_DAMNED
@ POINT_ESCAPE_PLATFORM
@ POINT_START_INTRODUCTION
ObjectGuid _summonerGuid
ActivateGhouls(Creature *summoner, Creature *owner)
bool Execute(uint64, uint32) override
AreaTrigger *const at
Definition: AreaTriggerAI.h:33
GuidUnorderedSet const & GetInsideUnits() const
Definition: AreaTrigger.h:135
AreaTriggerAI * AI()
Definition: AreaTrigger.h:74
float GetMaxSearchRadius() const
uint32 GetSpellId() const
Definition: AreaTrigger.h:99
void InitSplines(std::vector< G3D::Vector3 > splinePoints, uint32 timeToTarget)
uint32 GetTimeToTargetScale() const
Definition: AreaTrigger.h:121
Unit * GetTarget() const
void SetTimeToTargetScale(uint32 timeToTargetScale)
Definition: AreaTrigger.h:122
void SetOverrideScaleCurve(float overrideScale)
void SetDuration(int32 newDuration)
Unit * GetCaster() const
uint32 GetTickNumber() const
HookList< EffectAbsorbHealHandler > OnEffectAbsorbHeal
Definition: SpellScript.h:2101
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:2039
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Definition: SpellScript.h:2057
Unit * GetCaster() const
SpellEffectInfo const & GetEffectInfo(SpellEffIndex effIndex) const
HookList< EffectAbsorbHandler > OnEffectAbsorb
Definition: SpellScript.h:2089
Aura * GetAura() const
Unit * GetTarget() const
HookList< EffectApplyHandler > OnEffectRemove
Definition: SpellScript.h:2035
HookList< EffectProcHandler > OnEffectProc
Definition: SpellScript.h:2155
HookList< AuraProcHandler > OnProc
Definition: SpellScript.h:2145
HookList< EffectApplyHandler > OnEffectApply
Definition: SpellScript.h:2024
uint8 GetStackAmount() const
Definition: SpellAuras.h:189
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
TaskScheduler scheduler
SummonList summons
EventMap events
void AddActor(int32 actorId, uint32 actorIdx, ObjectGuid const &actorGuid)
static Conversation * CreateConversation(uint32 conversationEntry, Unit *creator, Position const &pos, ObjectGuid privateObjectOwner, SpellInfo const *spellInfo=nullptr, bool autoStart=true)
void DoZoneInCombat()
Definition: CreatureAI.h:161
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:299
bool UpdateVictim()
Definition: CreatureAI.cpp:245
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
Definition: CreatureAI.cpp:328
Creature *const me
Definition: CreatureAI.h:61
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
Definition: Creature.cpp:2822
void SetReactState(ReactStates st)
Definition: Creature.h:160
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
void SetRegenerateHealth(bool value)
Definition: Creature.h:358
void SetImmuneToAll(bool apply) override
Definition: Creature.h:167
CreatureAI * AI() const
Definition: Creature.h:214
uint32 GetDamage() const
Definition: Unit.h:446
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void Repeat(Milliseconds time)
Definition: EventMap.cpp:63
void ScheduleEventSeries(uint32 eventId, uint8 group, uint8 phase, std::initializer_list< Milliseconds > const &timeSeries)
Definition: EventMap.cpp:202
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:217
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:131
void SetPhase(uint8 phase)
Definition: EventMap.cpp:28
void Reset()
Definition: EventMap.cpp:21
void AddEvent(BasicEvent *event, Milliseconds e_time, bool set_addtime=true)
Milliseconds CalculateTime(Milliseconds t_offset) const
Definition: Unit.h:456
uint32 GetHeal() const
Definition: Unit.h:476
virtual bool SetBossState(uint32 id, EncounterState state)
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
void DoCastSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
Creature * GetCreature(uint32 type)
void DoUpdateWorldState(int32 worldStateId, int32 value)
void SendEncounterUnit(EncounterFrameType type, Unit const *unit, Optional< int32 > param1={}, Optional< int32 > param2={})
bool IsNormal() const
Definition: Map.cpp:3266
bool IsLFR() const
Definition: Map.cpp:3253
Difficulty GetDifficultyID() const
Definition: Map.h:324
uint32 GetPlayersCountExceptGMs() const
Definition: Map.cpp:2681
PlayerList const & GetPlayers() const
Definition: Map.h:367
bool IsMythic() const
Definition: Map.cpp:3303
void MovePath(uint32 pathId, bool repeatable, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, bool generatePath=true)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
LowType GetCounter() const
Definition: ObjectGuid.h:293
static ObjectGuid const Empty
Definition: ObjectGuid.h:274
static Creature * ToCreature(Object *o)
Definition: Object.h:219
bool IsPlayer() const
Definition: Object.h:212
static Unit * ToUnit(Object *o)
Definition: Object.h:225
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
static Player * ToPlayer(Object *o)
Definition: Object.h:213
bool IsGameMaster() const
Definition: Player.h:1178
ChrSpecializationEntry const * GetPrimarySpecializationEntry() const
Definition: Player.cpp:29827
Unit * GetActionTarget() const
Definition: Unit.h:494
uint32 const Id
Definition: SpellInfo.h:325
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Definition: SpellScript.h:173
HookList< CastHandler > AfterCast
Definition: SpellScript.h:824
int32 GetHitDamage() const
Unit * GetCaster() const
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
Definition: SpellScript.h:873
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
HookList< CastHandler > OnCast
Definition: SpellScript.h:822
WorldObject * GetExplTargetWorldObject() const
HookList< EffectHandler > OnEffectLaunchTarget
Definition: SpellScript.h:838
void SetHitDamage(int32 damage)
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition: SpellScript.h:863
Definition: Spell.h:255
void Summon(Creature const *summon)
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 & ClearValidator()
Clears the validator which is asked if tasks are allowed to be executed.
TaskScheduler & Update(success_t const &callback=nullptr)
ObjectGuid GetSummonerGUID() const
Unit * GetSummonerUnit() const
bool DoSpellAttackIfReady(uint32 spellId)
Definition: UnitAI.cpp:61
virtual void DoAction(int32)
Definition: UnitAI.h:72
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:159
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:161
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
int32 ModifyPower(Powers power, int32 val, bool withPowerUpdate=true)
Definition: Unit.cpp:8280
void SetHealth(uint64 val)
Definition: Unit.cpp:9346
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3685
void SetHoverHeight(float hoverHeight)
Definition: Unit.h:1133
bool HealthAbovePctHealed(int32 pct, uint32 heal) const
Definition: Unit.h:783
void SetFaction(uint32 faction) override
Definition: Unit.h:859
void SetSpeed(UnitMoveType mtype, float newValue)
Definition: Unit.cpp:8520
void SetPower(Powers power, int32 val, bool withPowerUpdate=true)
Definition: Unit.cpp:9419
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:3089
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
Powers GetPowerType() const
Definition: Unit.h:799
bool IsAlive() const
Definition: Unit.h:1164
TempSummon * ToTempSummon()
Definition: Unit.h:1756
UnitAI * GetAI() const
Definition: Unit.h:660
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition: Unit.cpp:12725
void SetUninteractible(bool apply)
Definition: Unit.cpp:8147
void SetEmoteState(Emote emote)
Definition: Unit.h:852
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4560
bool SetWalk(bool enable)
Definition: Unit.cpp:12707
void NearTeleportTo(Position const &pos, bool casting=false)
Definition: Unit.cpp:12327
Unit * GetVictim() const
Definition: Unit.h:715
int32 GetPower(Powers power) const
Definition: Unit.cpp:9401
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition: Unit.cpp:8525
void SetFacingTo(float const ori, bool force=true)
Definition: Unit.cpp:12653
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
Definition: Unit.h:781
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:833
void KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
Definition: Unit.h:921
void resetAttackTimer(WeaponAttackType type=BASE_ATTACK)
Definition: Unit.cpp:630
bool AttackStop()
Definition: Unit.cpp:5781
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:834
AreaTrigger * GetAreaTrigger(uint32 spellId) const
Definition: Unit.cpp:5329
Map * GetMap() const
Definition: Object.h:624
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1042
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
bool IsValidAttackTarget(WorldObject const *target, SpellInfo const *bySpell=nullptr) const
Definition: Object.cpp:2991
void MovePositionToFirstCollision(Position &pos, float dist, float angle)
Definition: Object.cpp:3482
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
Position GetNearPosition(float dist, float angle)
Definition: Object.cpp:3409
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition: Object.cpp:2065
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition: Object.cpp:1147
bool IsValidAssistTarget(WorldObject const *target, SpellInfo const *bySpell=nullptr) const
Definition: Object.cpp:3144
EventProcessor m_Events
Definition: Object.h:777
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1078
Position GetFirstCollisionPosition(float dist, float angle)
Definition: Object.cpp:3416
void GetCreatureListWithOptionsInGrid(Container &creatureContainer, float maxSearchRange, FindCreatureOptions const &options) const
Definition: Object.cpp:3320
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition: Object.cpp:2131
virtual void DoAction(uint32 actionId, WorldObject *source=nullptr, WorldObject *target=nullptr)
Definition: ZoneScript.h:96
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:91
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:92
std::unordered_set< uint32 > _skippedPlayers
void OnMovieComplete(Player *player, uint32) override
void MarkPlayerAsSkipped(uint32 playerId)
void HandleDespair(SpellEffIndex effIndex) const
void FilterTargets(std::list< WorldObject * > &unitList) const
void HandleDummy(SpellEffIndex) const
bool Validate(SpellInfo const *spellInfo) override
void OnHealAbsorb(AuraEffect *, HealInfo const &healInfo, uint32 &absorbAmount) const
void OnRemove(AuraEffect const *, AuraEffectHandleModes) const
bool Validate(SpellInfo const *) override
std::unordered_map< ObjectGuid, uint32 > _spellAssignments
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void OnProc(AuraEffect *, ProcEventInfo const &eventInfo)
static constexpr std::array< int32, 22 > AnduinRegenCycle
void RecalculateHook(AuraEffect const *, int32 &amount, bool &canBeRecalculated) const
void OnApply(AuraEffect const *, AuraEffectHandleModes) const
void RecalculateHookDamageTaken(AuraEffect const *, int32 &amount, bool &canBeRecalculated) const
void SetDest(SpellDestination &destination) const
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void OnPeriodic(AuraEffect const *) const
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleHit(SpellEffIndex) const
void OnRemove(AuraEffect const *, AuraEffectHandleModes) const
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes) const
void HandleDebuff(SpellEffIndex) const
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets) const
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes) const
void OnPeriodic(AuraEffect const *aurEff)
std::vector< Position > _availableSpawnPositions
void OnRemove(AuraEffect const *, AuraEffectHandleModes) const
void OnApply(AuraEffect const *, AuraEffectHandleModes) const
bool Validate(SpellInfo const *) override
void Trigger(AuraEffect *, DamageInfo const &dmgInfo, uint32 &absorbAmount)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &canBeRecalculated)
void OnRemove(AuraEffect const *, AuraEffectHandleModes) const
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes) const
void OnApply(AuraEffect const *, AuraEffectHandleModes) const
void FilterTargets(std::list< WorldObject * > &targets)
void FilterTargets(std::list< WorldObject * > &targets) const
bool Validate(SpellInfo const *) override
void HandleMissile(SpellEffIndex) const
static constexpr std::array< int32, 3 > RemnantRegenCycle
void OnApply(AuraEffect const *, AuraEffectHandleModes) const
void AfterRemove(AuraEffect const *, AuraEffectHandleModes) const
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes) const
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition: Containers.h:109
auto MapGetValuePtr(M &map, typename M::key_type const &key)
Definition: MapUtils.h:29
void RandomResize(C &container, std::size_t requestedSize)
Definition: Containers.h:67
@ WORLD_STATE_ANDUIN_ENCOUNTER_STARTED
@ WORLD_STATE_ANDUIN_ENCOUNTER_COMPLETED
@ WORLD_STATE_ANDUIN_INTERMISSION
#define RegisterSepulcherOfTheFirstOnesCreatureAI(ai_name)
@ BOSS_REMNANT_OF_A_FALLEN_KING
@ NPC_LADY_JAINA_PROUDMOORE_ANDUIN
@ NPC_KNIGHT_OF_EBON_BLADE_ANDUIN
@ NPC_SYLVANAS_WINDRUNNER_ANDUIN
@ NPC_MARCH_OF_THE_DAMNED
@ NPC_UTHER_THE_LIGHTBRINGER_ANDUIN
@ DATA_QUARTERMASTER_RAHM_ANDUIN
@ DATA_BOLVAR_FORDRAGON_ANDUIN
@ DATA_SYLVANAS_WINDRUNNER_ANDUIN
@ DATA_UTHER_THE_LIGHTBRINGER_ANDUIN
@ DATA_ANDUIN_WRYNN_INTRODUCTION
@ DATA_JAINA_PROUDMOORE_ANDUIN
@ DATA_REMNANT_OF_A_FALLEN_KING
@ GAMEOBJECT_ANDUIN_CHEST_LOOT
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
Definition: SpellDefines.h:474
EnumFlag< ChrSpecializationFlag > GetFlags() const
Definition: DB2Structure.h:872
ChrSpecializationRole GetRole() const
Definition: DB2Structure.h:873
constexpr void SetOrientation(float orientation)
Definition: Position.h:71
constexpr float GetPositionX() const
Definition: Position.h:76
constexpr float GetPositionY() const
Definition: Position.h:77
float GetAbsoluteAngle(float x, float y) const
Definition: Position.h:125
constexpr void GetPosition(float &x, float &y) const
Definition: Position.h:81
constexpr float GetOrientation() const
Definition: Position.h:79
constexpr float GetPositionZ() const
Definition: Position.h:78
static QuaternionData fromEulerAnglesZYX(float Z, float Y, float X)
Definition: GameObject.cpp:118
bool IsHeroic() const
bool IsNormal() const
bool IsMythic() const
void SetCombatMovement(bool allowMovement)
bool IsLFR() const
void Relocate(Position const &pos)
Definition: Spell.cpp:111
void OnCreate(Spell const *) override
void OnUpdate(uint32 diff) override
at_anduin_wrynn_beacon_of_hope(AreaTrigger *areatrigger)
void UpdateSize(float radius, float targetRadius) const
void OnUnitEnter(Unit *unit) override
void OnUnitExit(Unit *unit) override
void OnUpdate(uint32 diff) override
void OnUnitEnter(Unit *unit) override
void OnCreate(Spell const *) override
at_anduin_wrynn_befouled_barrier(AreaTrigger *areatrigger)
void UpdateSize(float radius, float targetRadius) const
void Absorb(uint32 absorbAmount)
at_anduin_wrynn_blasphemy(AreaTrigger *areatrigger)
void OnUnitEnter(Unit *unit) override
static float constexpr EMPOWERED_WICKED_STAR_SPEED
at_anduin_wrynn_empowered_wicked_star(AreaTrigger *areatrigger)
void OnUnitExit(Unit *unit) override
at_anduin_wrynn_hopelessness(AreaTrigger *areatrigger)
void OnUnitEnter(Unit *unit) override
at_anduin_wrynn_march_of_the_damned(AreaTrigger *areatrigger)
at_anduin_wrynn_pre_introduction(AreaTrigger *areatrigger)
void OnUnitEnter(Unit *unit) override
static constexpr float GetWickedStarSpeed(Difficulty difficulty)
void OnUnitEnter(Unit *unit) override
at_anduin_wrynn_wicked_star(AreaTrigger *areatrigger)
void JustAppeared() override
void ForceAssistersToAttackRemnant() const
void JustSummoned(Creature *summon) override
void DoAction(int32 action) override
void KilledUnit(Unit *victim) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void PhaseEvents(uint8 phase)
boss_anduin_wrynn(Creature *creature)
void PrepareAssistersForIntermission() const
void Reset() override
void UpdateAI(uint32 diff) override
void MoveKnightsOnPlatform() const
void JustEngagedWith(Unit *who) override
void StartIntermission(uint8 intermissionNum)
void SummonedCreatureDies(Creature *summon, Unit *) override
void EnterEvadeMode(EvadeReason) override
void EnterEvadeMode(EvadeReason) override
boss_remnant_of_a_fallen_king(Creature *creature)
void UpdateAI(uint32 diff) override
void DoAction(int32 action) override
void JustSummoned(Creature *summon) override
npc_anduin_wrynn_anduin_despair(Creature *creature)
npc_anduin_wrynn_anduin_doubt(Creature *creature)
void MovementInform(uint32 type, uint32 pointId) override
void HealReceived(Unit *, uint32 &heal) override
void UpdateAI(uint32 diff) override
npc_anduin_wrynn_anduin_hope(Creature *creature)
void JustSummoned(Creature *who) override
void DoAction(int32 action) override
npc_anduin_wrynn_anduin_soul(Creature *creature)
void EnterEvadeMode(EvadeReason) override
void JustUnregisteredAreaTrigger(AreaTrigger *areaTrigger) override
npc_anduin_wrynn_beacon_of_hope(Creature *creature)
void IsSummonedBy(WorldObject *summoner) override
npc_anduin_wrynn_empty_vessel(Creature *creature)
void UpdateAI(uint32 diff) override
npc_anduin_wrynn_fiendish_soul(Creature *creature)
void JustEngagedWith(Unit *) override
void EnterEvadeMode(EvadeReason) override
void UpdateAI(uint32 diff) override
npc_anduin_wrynn_grim_reflection(Creature *creature)
void UpdateAI(uint32 diff) override
bool CanAIAttack(Unit const *target) const override
void WaypointPathEnded(uint32, uint32 pathId) override
void JustEngagedWith(Unit *) override
npc_anduin_wrynn_jaina(Creature *creature)
void IsSummonedBy(WorldObject *summoner) override
npc_anduin_wrynn_lost_soul(Creature *creature)
void UpdateAI(uint32 diff) override
void JustDied(Unit *) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void EnterEvadeMode(EvadeReason) override
npc_anduin_wrynn_monstrous_soul(Creature *creature)
void UpdateAI(uint32 diff) override
void DoAction(int32 action) override
npc_anduin_wrynn_sylvanas(Creature *creature)
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
bool CanAIAttack(Unit const *target) const override
void UpdateAI(uint32 diff) override
bool CanAIAttack(Unit const *target) const override
npc_anduin_wrynn_uther(Creature *creature)
void JustEngagedWith(Unit *who) override