TrinityCore
Loading...
Searching...
No Matches
boss_malygos.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/* Script Data Start
19SDName: Boss Malygos
20Script Data End */
21
22#include "ScriptMgr.h"
23#include "CombatAI.h"
24#include "Containers.h"
25#include "eye_of_eternity.h"
26#include "GameObject.h"
27#include "GridNotifiers.h"
28#include "InstanceScript.h"
29#include "Map.h"
30#include "MotionMaster.h"
31#include "ObjectAccessor.h"
32#include "Player.h"
33#include "ScriptedCreature.h"
34#include "SpellInfo.h"
35#include "SpellScript.h"
36#include "TemporarySummon.h"
37#include "Vehicle.h"
38
40{
41 // =========== INTRO BEFORE WE START ENCOUNTER ===============
46
47 // =========== PHASE ONE ===============
52
53 // =========== PHASE TWO ===============
63
64 // =========== PHASE THREE =============
68
69 // ========== MISC MECHANICS ===========
71 EVENT_MOVE_TO_VORTEX_POINT = 22, // This should be fixed someday in core, we can't call new movement from MovementInform
72 EVENT_START_FIRST_RANDOM_PORTAL = 23, // There is something that is still loading when we first enter instance and it breaks
73 // first visual cast of intro portal beam mechanic, so we need short delay from the event.
74 EVENT_DELAY_MOVE_TO_DESTROY_P = 24, // If Malygos is too close to destroy platform point and transition from II to III is hit,
75 // this event will be sheduled to start after 5 seconds so there is enough time for "dimension change".
76
77 // ============ NEXUS LORDS ============
81
82 // ======== SCIONS OF ETERNITY =========
84
85 // ======== WYRMREST SKYTALON ==========
87};
88
96
98{
99 // Intro
101 SPELL_PORTAL_BEAM = 56046, // Malygos cast on portal to activate it during PHASE_NOT_STARTED
102
103 // Phase I
105 SPELL_MALYGOS_BERSERK = 47008, // it's the berserk spell that will hit only Malygos after 10 min of 60670
112 SPELL_VORTEX_1 = 56237, // seems that frezze object animation
113 SPELL_VORTEX_2 = 55873, // visual effect
114 SPELL_VORTEX_3 = 56105, // this spell must handle all the script - cast by the boss and to himself
115 SPELL_VORTEX_6 = 73040, // teleport - (cast to all raid), caster vortex bunnies, targets players.
116
117 // Phase II
118 SPELL_TELEPORT_VISUAL_ONLY = 41232, // Light blue animation cast by arcane NPCs when spawned on Hover Disks
125 SPELL_ARCANE_OVERLOAD_1 = 56432, // cast by npc Arcane Overload ID: 30282
126 // SPELL_ARCANE_OVERLOAD_2 = 56435, // Triggered by 56432 - resizing target
127 // SPELL_ARCANE_OVERLOAD_3 = 56438, // Triggered by 56432 - damage reduction
129 // SPELL_SURGE_OF_POWER_TRIGGERED = 56548,
130 SPELL_ARCANE_SHOCK = 57058, // used by Nexus Lords
131 SPELL_HASTE = 57060, // used by Nexus Lords
132 SPELL_ARCANE_BARRAGE = 56397, // used by Scions of Eternity
133 SPELL_ARCANE_BARRAGE_DAMAGE = 63934, // the actual damage - cast by affected player by script spell
134
135 // Transition /II-III/
137 SPELL_SUMMON_RED_DRAGON_BUDDY_F_CAST = 58846, // After implicitly hit player targets they will force cast 56070 on self
141
142 // Phase III
149 SPELL_SURGE_OF_POWER_WARNING_SELECTOR_25 = 60939, // used in 25 player mode for selecting targets for warnings and then sends to actual spell
151
152 // Phase I and III
154
155 // Outro
158
172
174{
175 SEAT_0 = 0
177
179{
180 // Malygos
187
188 // Caster hover disk despawn action
190
191 // Nexus Lord's action used to shedule casting spell that determine disk's target to chase
194
196{
197 // Malygos
203 // SAY_START_P_TWO = 5, // Unused by Blizzard for some reason on any version
209 // SAY_START_P_THREE = 11, // Unused by Blizzard for some reason on any version
218
219 // Alexstrasza
224
225 // Power Sparks
228
229#define MAX_SUMMONS_PHASE_TWO_10MAN 6
230#define MAX_SUMMONS_PHASE_TWO_25MAN 12
231
232#define MAX_RANGE_HOVER_DISK_SPAWNPOINTS 8
234{
235 { 782.9821f, 1296.652f, 282.1114f, 0.0f },
236 { 764.3126f, 1328.871f, 282.3091f, 0.0f },
237 { 725.8506f, 1306.749f, 282.2698f, 0.0f },
238 { 744.5175f, 1274.396f, 282.3402f, 0.0f },
239 { 764.3936f, 1274.371f, 282.6011f, 0.0f },
240 { 779.3761f, 1316.166f, 282.1653f, 0.0f },
241 { 744.4915f, 1328.901f, 282.2112f, 0.0f },
242 { 729.2364f, 1287.328f, 282.4173f, 0.0f }
243};
244
245#define MAX_MELEE_HOVER_DISK_SPAWNPOINTS 4
247{
248 { 754.4617f, 1283.859f, 285.0522f, 0.0f },
249 { 771.7864f, 1301.853f, 285.0522f, 0.0f },
250 { 753.9635f, 1319.003f, 285.0522f, 0.0f },
251 { 736.4914f, 1301.683f, 285.0522f, 0.0f }
252};
253
254#define MAX_MELEE_HOVER_DISK_WAYPOINTS 16
256{
257 // First melee hover disk wps
258 { 766.2931f, 1312.904f, 277.0551f, 0.0f },
259 { 754.3397f, 1319.759f, 274.0536f, 0.0f },
260 { 742.1018f, 1312.714f, 270.1367f, 0.0f },
261 { 735.6851f, 1301.422f, 266.7208f, 0.0f },
262 // Second melee hover disk wps
263 { 742.6257f, 1313.471f, 275.9713f, 0.0f },
264 { 736.8845f, 1301.921f, 274.0264f, 0.0f },
265 { 742.6632f, 1289.951f, 269.8603f, 0.0f },
266 { 754.3682f, 1283.942f, 266.6098f, 0.0f },
267 // Third melee hover disk wps
268 { 742.2078f, 1290.518f, 276.2484f, 0.0f },
269 { 754.5398f, 1284.311f, 273.5815f, 0.0f },
270 { 766.5588f, 1290.345f, 269.6655f, 0.0f },
271 { 773.4768f, 1301.474f, 266.5821f, 0.0f },
272 // Forth melee hover disk wps
273 { 766.1189f, 1290.197f, 276.9436f, 0.0f },
274 { 771.9507f, 1301.602f, 273.9712f, 0.0f },
275 { 766.1253f, 1313.451f, 270.4991f, 0.0f },
276 { 754.5378f, 1319.399f, 266.6653f, 0.0f }
277};
278
279#define MAX_MALYGOS_POS 10
281{
282 { 754.544f, 1301.71f, 320.01f, 0.0f }, // Point destroy platform
283 { 754.393f, 1301.27f, 292.91f, 0.0f }, // Point Vortex
284 { 754.362f, 1301.61f, 266.17f, 0.0f }, // Point land after Vortex
285 { 754.695f, 1301.66f, 316.65f, 0.0f }, // Point Surge of Power phase II
286 { 755.681f, 1298.41f, 220.06f, 0.0f } // Point idle phase III
287};
288
289Position const AlexstraszaSpawnPos = { 854.551f, 1225.31f, 300.901f, 0.0f }; // Alexstrasza's spawn position
290Position const HeartOfMagicSpawnPos = { 755.351f, 1298.31f, 223.909f, 0.0f }; // Heart of Magic spawn position
291
292#define TEN_MINUTES (10*MINUTE*IN_MILLISECONDS)
293
298
300{
303
305{
306 // Lights
312
313 // Data (setters/getters)
314 DATA_SUMMON_DEATHS = 0, // phase 2
316
317 // Target guids
318 DATA_LAST_OVERLOAD_GUID = 13, // used to store last Arcane Overload guid
320 // DATA_SECOND_SURGE_TARGET_GUID = 15,
321 // DATA_THIRD_SURGE_TARGET_GUID = 16,
323
325};
326
327// Used to check if summons guids come from vehicles
329{
330 public:
331 bool operator()(ObjectGuid guid) { return guid.IsVehicle(); }
332};
333
334struct boss_malygos : public BossAI
335{
337 {
338 Initialize();
340 _flySpeed = me->GetSpeed(MOVE_FLIGHT); // Get initial fly speed, otherwise on each wipe fly speed would add up if we get it
342 }
343
345 {
346 _summonDeaths = 0;
350 for (ObjectGuid& guid : _surgeTargetGUID)
351 guid.Clear();
352
353 _killSpamFilter = false;
354 _executingVortex = false;
356 _flyingOutOfPlatform = false;
360 }
361
362 void Reset() override
363 {
364 // EnterEvadeMode and Reset() links are cut for the sake of properly functioning despawner.
365 if (!_despawned)
366 _Reset();
367
368 Initialize();
369
370 me->SetDisableGravity(true);
371 me->SetImmuneToAll(true);
372 me->SetUninteractible(false);
373 // TO DO: find what in core is making boss slower than in retail (when correct speed data) or find missing movement flag update or forced spline change
375 if (_despawned)
377
381 }
382
383 uint32 GetData(uint32 data) const override
384 {
385 switch (data)
386 {
388 return _summonDeaths;
389 case DATA_PHASE:
390 return _phase;
391 }
392
393 return 0;
394 }
395
396 void SetData(uint32 data, uint32 value) override
397 {
398 if (data == DATA_SUMMON_DEATHS && _phase == PHASE_TWO && !_despawned)
399 {
400 _summonDeaths = value;
401
403 {
405 {
408 }
409 }
410 else if (GetDifficulty() == DIFFICULTY_25_N)
411 {
413 {
416 }
417 }
418 }
419 }
420
430
431 void SetGUID(ObjectGuid const& guid, int32 id) override
432 {
433 switch (id)
434 {
436 _arcaneOverloadGUID = guid;
437 break;
442 break;
445 break;
446 }
447 }
448
449 void DoAction(int32 action) override
450 {
451 switch (action)
452 {
456 {
457 Position pos;
458 pos.m_positionZ = alexstraszaBunny->GetPositionZ();
459 alexstraszaBunny->GetNearPoint2D(nullptr, pos.m_positionX, pos.m_positionY, 30.0f, alexstraszaBunny->GetAbsoluteAngle(me));
461 me->SetImmuneToAll(false);
464 }
465 break;
467 DoCast(me, SPELL_VORTEX_1, true);
468 DoCast(me, SPELL_VORTEX_2, true);
469 // the vortex execution continues in the dummy effect of this spell (see it's script)
470 DoCast(me, SPELL_VORTEX_3, true);
471 break;
473 {
474 Position _zToLift = me->GetPosition();
475 if (_phase == PHASE_ONE)
476 {
477 _zToLift.m_positionZ += 20.0f;
479 }
480 else if (_phase == PHASE_TWO)
481 {
482 _zToLift.m_positionZ = 300.1f;
484 }
485 break;
486 }
491 // Vehicles shouldn't be despawned with 0 delay if the call comes from virtual function that overrides PassengerBoarded.
492 // Aside from that he doesn't despawn both vehicles and arcane overloads right away, but with some delay.
497 me->StopMoving();
498 if (me->GetPositionZ() > 300.0f)
500 else
502
504 break;
506 // Teleport to spawn position, we can't use normal relocate
508 // Respawn Iris
510 _despawned = false;
511 break;
513 me->GetMotionMaster()->MoveCirclePath(MalygosPositions[3].GetPositionX(), MalygosPositions[3].GetPositionY(), 283.2763f, 120.0f, true, 16);
514 break;
515 }
516 }
517
518 void SetPhase(uint8 phase, bool setEvents = false)
519 {
520 events.Reset();
521 events.SetPhase(phase);
522 _phase = phase;
523 me->SetCanMelee(phase != PHASE_THREE);
524 if (setEvents)
526 }
527
554
555 void JustEngagedWith(Unit* /*who*/) override
556 {
557 // We can't call full function here since it includes DoZoneInCombat(),
558 // if someone does it will be returned with a warning.
559 me->setActive(true);
561 {
563 return;
564 }
565
567
569 DoCast(SPELL_BERSERK); // periodic aura, first tick in 10 minutes
571 }
572
573 void EnterEvadeMode(EvadeReason /*why*/) override
574 {
576
578
579 if (!summons.empty())
580 {
581 if (_phase == PHASE_TWO)
582 {
585 summons.DespawnIf(pred);
587 }
588 else if (_phase == PHASE_THREE)
590 }
591
592 me->DespawnOrUnsummon(0s, 30s);
593 }
594
595 void KilledUnit(Unit* victim) override
596 {
597 if (victim->GetTypeId() != TYPEID_PLAYER)
598 return;
599
600 if (!_killSpamFilter)
601 {
602 switch (_phase)
603 {
604 case PHASE_ONE:
607 _killSpamFilter = true;
608 break;
609 case PHASE_TWO:
612 _killSpamFilter = true;
613 break;
614 case PHASE_THREE:
617 _killSpamFilter = true;
618 break;
619 }
620 }
621 }
622
623 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
624 {
625 if (spellInfo->Id == SPELL_POWER_SPARK_MALYGOS)
626 {
627 if (Creature* creature = caster->ToCreature())
628 creature->DespawnOrUnsummon();
629
631 }
632 else if (spellInfo->Id == SPELL_MALYGOS_BERSERK)
634 }
635
636 void MoveInLineOfSight(Unit* who) override
637
638 {
639 if (!me->IsInCombat() || _phase != PHASE_ONE)
640 return;
641
642 if (who->GetEntry() == NPC_POWER_SPARK)
643 if (who->GetDistance(me) <= 2.5f)
645 }
646
647 void MovementInform(uint32 type, uint32 id) override
648 {
649 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
650 return;
651
652 switch (id)
653 {
655 if (Creature* portal = me->FindNearestCreature(NPC_PORTAL_TRIGGER, 31.0f, true))
656 {
659 DoCast(portal, SPELL_PORTAL_BEAM);
660 }
661 break;
662 case POINT_LAND_P_ONE:
663 me->SetDisableGravity(false);
664 break;
668 break;
670 me->SetDisableGravity(false);
671 _executingVortex = false;
673 break;
675 me->SetDisableGravity(true);
677 break;
680 {
682 me->SetUninteractible(true);
684 me->SetFacingToObject(alexstraszaBunny);
686 }
687 _flyingOutOfPlatform = false;
690 break;
692 me->SetDisableGravity(true);
694 me->SetFacingToObject(alexstraszaBunny);
697 break;
700 {
704 }
705 break;
710 break;
714 break;
715 }
716 }
717
718 void DamageTaken(Unit* /*cause*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
719 {
720 if (damage > me->GetHealth() && _phase != PHASE_THREE)
721 damage = me->GetHealth() - 1;
722 }
723
724 void UpdateAI(uint32 diff) override
725 {
727 return;
728
729 events.Update(diff);
730
731 // we can't cast if we are casting already unless in PHASE_NOT_STARTED channeling PORTAL_BEAM
733 return;
734
735 // at 50% hp Malygos switchs to phase 2 and removes hovering until reset or end of encounter
736 if (_phase == PHASE_ONE && me->GetHealthPct() <= 50.0f)
737 {
738 SetPhase(PHASE_TWO, true);
740 me->AttackStop();
742 }
743
744 while (uint32 eventId = events.ExecuteEvent())
745 {
746 switch (eventId)
747 {
751 break;
754 break;
757 {
758 me->SetFacingToObject(iris);
759 iris->Delete(); // this is not the best way.
760 }
762 SetPhase(PHASE_ONE, true);
763 break;
764 case EVENT_SAY_INTRO:
767 break;
768 case EVENT_VORTEX:
769 _executingVortex = true;
772 break;
775 me->AttackStop();
777 break;
781 break;
784 {
786 break;
787 }
788
791 break;
793 if (_phase == PHASE_ONE)
794 {
796 {
798 break;
799 }
800
803 }
804 else if (_phase == PHASE_THREE)
805 {
808 }
809 break;
812 {
814 {
815 Position randomPosOnRadius;
816 // Hardcodded retail value, reason is Z getters can fail... (TO DO: Change to getter when height calculation works on 100%!)
817 randomPosOnRadius.m_positionZ = 283.0521f;
818 alexstraszaBunny->GetNearPoint2D(nullptr, randomPosOnRadius.m_positionX, randomPosOnRadius.m_positionY, 120.0f, alexstraszaBunny->GetAbsoluteAngle(me));
821 }
822 }
823
825 {
826 for (uint8 rangeDisks = 0; rangeDisks < (GetDifficulty() == DIFFICULTY_10_N ? 4 : 5); rangeDisks++)
827 {
829
830 if (casterDiskSummon->IsAIEnabled())
831 casterDiskSummon->AI()->DoAction(rangeDisks);
832 }
833
834 for (uint8 meleeDisks = 0; meleeDisks < 2; meleeDisks++)
835 {
838 }
839
840 _arcaneReinforcements = false;
841
844 }
845 break;
847 for (uint8 rangeDisks = 5; rangeDisks < 8; rangeDisks++)
848 {
850
851 if (casterDiskSummon->IsAIEnabled())
852 casterDiskSummon->AI()->DoAction(rangeDisks);
853 }
854
855 for (uint8 meleeDisks = 2; meleeDisks < 4; meleeDisks++)
856 {
859 }
860 break;
864 break;
867 {
872 }
873 break;
876 {
877 me->StopMoving();
879 }
880
882 {
884 if (Creature* lastArcaneOverloadBunny = ObjectAccessor::GetCreature(*me, _arcaneOverloadGUID))
885 DoCast(lastArcaneOverloadBunny, SPELL_ARCANE_BOMB_TRIGGER, true);
886 }
888 break;
891 {
895 }
896 else
897 {
900 }
901 break;
904 break;
907 break;
911 break;
916 me->SetUninteractible(false);
919 SetPhase(PHASE_THREE, true);
920 break;
923 {
924 if (Unit* tempSurgeTarget = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, true, SPELL_RIDE_RED_DRAGON_BUDDY))
925 {
926 if (Vehicle* drakeVehicle = tempSurgeTarget->GetVehicleKit())
927 {
928 if (Unit* passenger = drakeVehicle->GetPassenger(0))
929 {
930 if (passenger->GetTypeId() == TYPEID_PLAYER)
931 {
933 DoCast(tempSurgeTarget, SPELL_SURGE_OF_POWER_PHASE_3_10, true);
934 }
935 }
936 }
937 }
938 }
939 else if (GetDifficulty() == DIFFICULTY_25_N)
940 {
941 for (ObjectGuid& guid : _surgeTargetGUID)
942 guid.Clear();
943
945 }
946
948 break;
950 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 60.0f, false, true, SPELL_RIDE_RED_DRAGON_BUDDY))
951 DoCast(target, SPELL_STATIC_FIELD_MISSLE, true);
952
954 break;
956 _killSpamFilter = false;
957 break;
958 default:
959 break;
960 }
961
963 return;
964 }
965 }
966
967 void JustDied(Unit* /*killer*/) override
968 {
969 _JustDied();
972 alexstraszaGiftBoxBunny->SummonGameObject(RAID_MODE(GO_HEART_OF_MAGIC_10, GO_HEART_OF_MAGIC_25), HeartOfMagicSpawnPos, QuaternionData(), 0s);
973
976 }
977
978private:
979 uint8 _phase; // Counter for phases used with a getter.
980 uint8 _summonDeaths; // Keeps count of arcane trash.
981 uint8 _preparingPulsesChecker; // In retail they use 2 preparing pulses with 7 sec CD, after they pass 2 seconds.
982 ObjectGuid _arcaneOverloadGUID; // Last Arcane Overload summoned to know to which should visual be cast to (the purple ball, not bubble).
983 ObjectGuid _lastHitByArcaneBarrageGUID; // Last hit player by Arcane Barrage, will be removed if targets > 1.
984 ObjectGuid _surgeTargetGUID[3]; // All these three are used to keep current tagets to which warning should be sent.
985
986 bool _killSpamFilter; // Prevent text spamming on killed player by helping implement a CD.
987 bool _despawned; // Checks if boss pass through evade on reset.
988 bool _executingVortex; // Prevents some events being sheduled during Vortex takeoff/land.
989 bool _arcaneReinforcements; // Checks if 10 or 25 man arcane trash will be spawned.
990 bool _flyingOutOfPlatform; // Used to prevent Malygos casting Arcane Overload shields while leaving platform.
991 bool _firstCyclicMovementStarted; // At first movement start he throws one shield asap, so this check is needed for it only.
992 bool _performingSurgeOfPower; // Used to prevent starting Cyclic Movement called in Arcane Bomb event.
993 bool _performingDestroyPlatform; // Used to prevent starting some movements right when Destroy Platfrom event starts.
994
995 float _flySpeed; // Used to store base fly speed to prevent stacking on each evade.
996};
997
999{
1000 npc_portal_eoe(Creature* creature) : ScriptedAI(creature)
1001 {
1002 _instance = creature->GetInstanceScript();
1003 }
1004
1005 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
1006 {
1007 if (spellInfo->Id == SPELL_PORTAL_OPENED)
1008 {
1010 {
1011 if (malygos->AI()->GetData(DATA_PHASE) == PHASE_ONE)
1013 }
1014 }
1015 }
1016
1017 void UpdateAI(uint32 /*diff*/) override
1018 {
1019 // When duration of opened riff visual ends, closed one should be cast
1022
1024 {
1025 if (malygos->AI()->GetData(DATA_PHASE) != PHASE_ONE && me->HasAura(SPELL_PORTAL_OPENED))
1026 {
1029 }
1030 }
1031 }
1032
1033private:
1035};
1036
1038{
1039 npc_power_spark(Creature* creature) : ScriptedAI(creature)
1040 {
1041 _instance = creature->GetInstanceScript();
1043 MoveToMalygos();
1044 }
1045
1047 {
1049
1051 me->GetMotionMaster()->MoveFollow(malygos, 0.0f, 0.0f);
1052 }
1053
1054 void UpdateAI(uint32 /*diff*/) override
1055 {
1056 if (!_instance)
1057 return;
1058
1060 {
1061 if (malygos->AI()->GetData(DATA_PHASE) != PHASE_ONE || _instance->GetBossState(DATA_MALYGOS_EVENT) == FAIL)
1062 {
1064 return;
1065 }
1066
1067 if (malygos->HasAura(SPELL_VORTEX_1))
1068 {
1070 return;
1071 }
1072
1074 me->GetMotionMaster()->MoveFollow(malygos, 0.0f, 0.0f);
1075 }
1076 }
1077
1078 void JustDied(Unit* /*killer*/) override
1079 {
1080 me->CastSpell(me, SPELL_POWER_SPARK_DEATH, true); // not supposed to hide the fact it's there by not selectable
1081 }
1082
1083private:
1085};
1086
1088{
1090 {
1091 Initialize();
1092 _instance = creature->GetInstanceScript();
1094 // TO DO: These were a bit faster than what they should be. Not sure what is the reason.
1095 me->SetSpeedRate(MOVE_FLIGHT, 1.25f);
1096 }
1097
1099 {
1100 _wpCount = 0;
1101 }
1102
1103 void Reset() override
1104 {
1106
1107 Initialize();
1108 }
1109
1110 void PassengerBoarded(Unit* unit, int8 /*seat*/, bool apply) override
1111 {
1112 if (apply)
1113 {
1114 if (unit->GetTypeId() == TYPEID_UNIT)
1115 {
1117 DoZoneInCombat(unit->ToCreature());
1118 }
1119 else if (unit->GetTypeId() == TYPEID_PLAYER)
1120 me->SetDisableGravity(true);
1121 }
1122 else
1123 {
1124 if (unit->GetTypeId() != TYPEID_PLAYER)
1125 {
1126
1128 me->SetUninteractible(false);
1129 me->SetDisableGravity(false);
1130 me->SetCanFly(false);
1131 }
1132 else if (unit->GetTypeId() == TYPEID_PLAYER)
1133 {
1134 me->SetDisableGravity(false);
1135 me->SetCanFly(false);
1136 }
1137
1139 me->RemoveAllAuras();
1140 }
1141 }
1142
1143 void UpdateAI(uint32 diff) override
1144 {
1145 _events.Update(diff);
1146
1147 while (uint32 eventId = _events.ExecuteEvent())
1149 }
1150
1151 void DoAction(int32 /*action*/) override
1152 {
1153 if (Vehicle* vehicleTemp = me->GetVehicleKit())
1154 {
1155 if (vehicleTemp->GetPassenger(0) && vehicleTemp->GetPassenger(0)->GetTypeId() == TYPEID_PLAYER)
1156 {
1157 vehicleTemp->RemoveAllPassengers();
1158 me->SetUninteractible(true);
1159 }
1160 }
1161
1162 me->DespawnOrUnsummon(3s);
1163 }
1164
1165 void MovementInform(uint32 type, uint32 id) override
1166 {
1167 if (type != POINT_MOTION_TYPE)
1168 return;
1169
1170 if (_wpCount < 3)
1171 {
1172 _events.ScheduleEvent(id + 1, 1ms);
1173 ++_wpCount;
1174 }
1175 else if (Vehicle* hoverDisk = me->GetVehicleKit())
1176 if (Unit* passenger = hoverDisk->GetPassenger(0))
1177 if (Creature* lordPassenger = passenger->ToCreature())
1178 lordPassenger->AI()->DoAction(ACTION_SET_DISK_VICTIM_CHASE);
1179 }
1180
1181private:
1182 uint8 _wpCount; // how many points are triggered
1185};
1186
1188{
1190 {
1191 _instance = creature->GetInstanceScript();
1193 // TO DO: Something is wrong with calculations for flying creatures that are on WP/Cyclic path.
1194 // They should get the same difference as to when at ground from run creature switch to walk.
1195 me->SetSpeedRate(MOVE_FLIGHT, 0.45f);
1196 }
1197
1198 void Reset() override
1199 {
1201 }
1202
1203 void EnterEvadeMode(EvadeReason /*why*/) override
1204 {
1205 }
1206
1207 void PassengerBoarded(Unit* unit, int8 /*seat*/, bool apply) override
1208 {
1209 if (apply)
1210 {
1211 if (unit->GetTypeId() == TYPEID_UNIT)
1213 }
1214 else
1215 {
1216 me->StopMoving();
1217 me->SetDisableGravity(false);
1218 me->SetCanFly(false);
1219 me->RemoveAllAuras();
1220 }
1221 }
1222
1223 void DoAction(int32 action) override
1224 {
1225 if (action < ACTION_DELAYED_DESPAWN)
1226 {
1227 me->GetMotionMaster()->MoveCirclePath(MalygosPositions[3].GetPositionX(), MalygosPositions[3].GetPositionY(), 282.3402f, 35.0f, true, 16);
1228 }
1229 else
1230 {
1231 me->DespawnOrUnsummon(3s);
1232 }
1233 }
1234
1235private:
1237};
1238
1240{
1241 npc_nexus_lord(Creature* creature) : ScriptedAI(creature)
1242 {
1243 _instance = creature->GetInstanceScript();
1244 }
1245
1246 void Reset() override
1247 {
1248 _events.Reset();
1249 }
1250
1251 void EnterEvadeMode(EvadeReason /*why*/) override
1252 {
1253 }
1254
1255 void DoAction(int32 /*action*/) override
1256 {
1260 }
1261
1262 void UpdateAI(uint32 diff) override
1263 {
1264 if (!UpdateVictim())
1265 return;
1266
1267 _events.Update(diff);
1268
1269 while (uint32 eventId = _events.ExecuteEvent())
1270 {
1271 switch (eventId)
1272 {
1273 case EVENT_ARCANE_SHOCK:
1274 if (Unit* victim = SelectTarget(SelectTargetMethod::Random, 0, 5.0f, true))
1275 DoCast(victim, SPELL_ARCANE_SHOCK);
1277 break;
1278 case EVENT_HASTE_BUFF:
1281 break;
1282 case EVENT_NUKE_DUMMY:
1286 break;
1287 }
1288 }
1289 }
1290
1291 void JustDied(Unit* /*killer*/) override
1292 {
1294 malygos->AI()->SetData(DATA_SUMMON_DEATHS, malygos->AI()->GetData(DATA_SUMMON_DEATHS) + 1);
1295 }
1296
1297private:
1300};
1301
1303{
1305 {
1306 _instance = creature->GetInstanceScript();
1307 }
1308
1309 void Reset() override
1310 {
1311 _events.Reset();
1312 }
1313
1314 void IsSummonedBy(WorldObject* /*summoner*/) override
1315 {
1317 }
1318
1319 void JustEngagedWith(Unit* /*who*/) override
1320 {
1321 }
1322
1323 void AttackStart(Unit* /*target*/) override
1324 {
1325 }
1326
1327 void EnterEvadeMode(EvadeReason /*why*/) override
1328 {
1329 }
1330
1331 void UpdateAI(uint32 diff) override
1332 {
1333 _events.Update(diff);
1334
1335 while (uint32 eventId = _events.ExecuteEvent())
1336 {
1337 switch (eventId)
1338 {
1342 break;
1343 }
1344 }
1345 }
1346
1347 void JustDied(Unit* /*killer*/) override
1348 {
1350 malygos->AI()->SetData(DATA_SUMMON_DEATHS, malygos->AI()->GetData(DATA_SUMMON_DEATHS) + 1);
1351 }
1352
1353private:
1356};
1357
1359{
1361 {
1362 _instance = creature->GetInstanceScript();
1364 }
1365
1366 void IsSummonedBy(WorldObject* summoner) override
1367 {
1368 if (Creature* creature = summoner->ToCreature())
1369 creature->AI()->SetGUID(me->GetGUID(), DATA_LAST_OVERLOAD_GUID);
1370 }
1371
1372 void UpdateAI(uint32 /*diff*/) override
1373 {
1374 }
1375
1376 void DoAction(int32 /*action*/) override
1377 {
1379 {
1380 if (malygos->AI()->GetData(DATA_PHASE) == PHASE_TWO)
1381 me->DespawnOrUnsummon(6s);
1382 // If evade is hit during phase II shields should disappear with no delay
1383 else if (malygos->AI()->GetData(DATA_PHASE) == 0)
1385 }
1386 }
1387
1388 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
1389 {
1390 if (spellInfo->Id == SPELL_ARCANE_BOMB_TRIGGER)
1391 {
1394 }
1395 }
1396
1397private:
1399};
1400
1401// SmartAI does not work correctly for vehicles
1403{
1405 {
1406 }
1407
1408 void IsSummonedBy(WorldObject* summoner) override
1409 {
1410 _summoner.Clear();
1411 if (Player* player = summoner->ToPlayer())
1412 {
1413 _summoner = player->GetGUID();
1415 }
1416 }
1417
1418 void UpdateAI(uint32 diff) override
1419 {
1420 VehicleAI::UpdateAI(diff);
1421 _events.Update(diff);
1422
1423 while (uint32 eventId = _events.ExecuteEvent())
1424 {
1425 switch (eventId)
1426 {
1430 break;
1431 }
1432 }
1433 }
1434
1435 void PassengerBoarded(Unit* /*unit*/, int8 /*seat*/, bool apply) override
1436 {
1437 if (!apply)
1438 {
1439 me->DespawnOrUnsummon(2050ms);
1440 me->SetOrientation(2.5f);
1441 me->SetSpeedRate(MOVE_FLIGHT, 1.0f);
1442 Position pos = me->GetPosition();
1443 pos.m_positionX += 10.0f;
1444 pos.m_positionY += 10.0f;
1445 pos.m_positionZ += 12.0f;
1446 me->GetMotionMaster()->MovePoint(1, pos);
1447 }
1448 }
1449
1450private:
1453};
1454
1455// We shouldn't use SAI for stuff that aren't within boss main mechanic
1456// and SAI type of despawn can cause problems here.
1458{
1459 npc_static_field(Creature* creature) : ScriptedAI(creature)
1460 {
1461 }
1462
1463 void IsSummonedBy(WorldObject* /*summoner*/) override
1464 {
1465 // For some great reason the spell doesn't time it...
1466 me->DespawnOrUnsummon(30s);
1467 }
1468};
1469
1470// 56046 - Portal Beam
1472{
1473 bool Load() override
1474 {
1475 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1476 }
1477
1478 bool Validate(SpellInfo const* /*spell*/) override
1479 {
1481 }
1482
1483 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1484 {
1485 if (Creature* target = GetTarget()->ToCreature())
1486 target->CastSpell(target, SPELL_PORTAL_OPENED);
1487 }
1488
1489 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1490 {
1491 if (Creature* target = GetTarget()->ToCreature())
1492 target->RemoveAura(SPELL_PORTAL_OPENED);
1493 }
1494
1500};
1501
1502// 56047 - Random Portal
1504{
1505 bool Load() override
1506 {
1507 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1508 }
1509
1510 void HandleDummy(SpellEffIndex /*effIndex*/)
1511 {
1512 Creature* malygos = GetCaster()->ToCreature();
1513 if (Creature* target = GetHitCreature())
1514 {
1515 Position pos;
1516 pos.m_positionZ = target->GetPositionZ();
1517 target->GetNearPoint2D(nullptr, pos.m_positionX, pos.m_positionY, frand(29.1f, 30.0f), target->GetAbsoluteAngle(malygos));
1519 }
1520 }
1521
1526};
1527
1529{
1530 public:
1531 IsCreatureVehicleCheck(bool isVehicle) : _isVehicle(isVehicle) { }
1532
1534 {
1535 if (Unit* unit = obj->ToUnit())
1536 if (unit->GetTypeId() == TYPEID_UNIT && unit->GetVehicleKit())
1537 return _isVehicle;
1538
1539 return !_isVehicle;
1540 }
1541
1542 private:
1544};
1545
1546// 57459, 61693, 61694 - Arcane Storm
1548{
1549 bool Load() override
1550 {
1551 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1552 }
1553
1554 bool Validate(SpellInfo const* /*spell*/) override
1555 {
1557 }
1558
1559 void FilterTargets(std::list<WorldObject*>& targets)
1560 {
1561 if (targets.empty())
1562 return;
1563
1564 Creature* malygos = GetCaster()->ToCreature();
1566 {
1567 // Resize list only to objects that are vehicles.
1568 IsCreatureVehicleCheck check(true);
1569 Trinity::Containers::RandomResize(targets, check, (malygos->GetMap()->GetDifficultyID() == DIFFICULTY_10_N ? 4 : 10));
1570 }
1571 else
1572 Trinity::Containers::RandomResize(targets, (malygos->GetMap()->GetDifficultyID() == DIFFICULTY_10_N ? 4 : 10));
1573 }
1574
1575 void HandleVisual(SpellEffIndex /*effIndex*/)
1576 {
1577 // Both missiles should start approx at same time (with SPELL_ARCANE_STORM_EXTRA_VISUAL having advantage - it should lead)
1578 if (!GetHitUnit())
1579 return;
1580
1582 }
1583
1589};
1590
1591// 56105 - Vortex
1593{
1594 bool Load() override
1595 {
1596 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1597 }
1598
1599 void HandleScript(SpellEffIndex /*effIndex*/)
1600 {
1601 Creature* caster = GetCaster()->ToCreature();
1602 // Each player will enter to the trigger vehicle (entry 30090) which is already spawned (each one can hold up to 5 players, it has 5 seats,
1603 // the players enter the vehicles casting SPELL_VORTEX_4 or SPELL_VORTEX_5.
1604 if (InstanceScript* instance = caster->GetInstanceScript())
1605 instance->SetData(DATA_VORTEX_HANDLING, 0);
1606
1607 // the rest of the vortex execution continues when SPELL_VORTEX_2 is removed.
1608 }
1609
1614};
1615
1616// 55873 - Vortex
1618{
1619 bool Load() override
1620 {
1621 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1622 }
1623
1624 bool Validate(SpellInfo const* /*spell*/) override
1625 {
1627 }
1628
1629 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1630 {
1631 if (Creature* caster = GetCaster()->ToCreature())
1632 {
1633 for (ThreatReference const* ref : caster->GetThreatManager().GetUnsortedThreatList())
1634 {
1635 if (Player* targetPlayer = ref->GetVictim()->ToPlayer())
1636 {
1637 if (targetPlayer->IsGameMaster())
1638 continue;
1639
1640 if (InstanceScript* instance = caster->GetInstanceScript())
1641 {
1642 // Teleport spell - I'm not sure but might be it must be cast by each vehicle when it's passenger leaves it.
1643 if (Creature* trigger = ObjectAccessor::GetCreature(*caster, instance->GetGuidData(DATA_TRIGGER)))
1644 trigger->CastSpell(targetPlayer, SPELL_VORTEX_6, true);
1645 }
1646 }
1647 }
1648
1649 if (Creature* malygos = caster->ToCreature())
1650 {
1651 malygos->GetMotionMaster()->MoveLand(POINT_LAND_AFTER_VORTEX_P_ONE, MalygosPositions[2]);
1652 malygos->RemoveAura(SPELL_VORTEX_1);
1653 }
1654 }
1655 }
1656
1661};
1662
1664{
1665 public:
1666 ExactDistanceCheck(Unit* source, float dist) : _source(source), _dist(dist) { }
1667
1669 {
1670 return _source->GetExactDist2d(unit) > _dist;
1671 }
1672
1673 private:
1674 Unit* _source;
1675 float _dist;
1676};
1677
1678// 56438 - Arcane Overload
1680{
1681 bool Load() override
1682 {
1683 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1684 }
1685
1686 void ResizeEffectRadiusTargetChecker(std::list<WorldObject*>& targets)
1687 {
1688 Creature* arcaneOverload = GetCaster()->ToCreature();
1689 targets.remove_if(ExactDistanceCheck(arcaneOverload,
1690 GetEffectInfo(EFFECT_0).CalcRadius(arcaneOverload).Max * arcaneOverload->GetObjectScale()));
1691 }
1692
1697};
1698
1699// 61210 - Align Disk Aggro
1701{
1702 bool Load() override
1703 {
1704 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1705 }
1706
1707 void HandleScript(SpellEffIndex /*effIndex*/)
1708 {
1709 Creature* caster = GetCaster()->ToCreature();
1710 if (Creature* target = GetHitCreature())
1711 target->GetMotionMaster()->MoveChase(caster->GetVictim());
1712 }
1713
1718};
1719
1721{
1722 public:
1723 IsPlayerOnHoverDisk(bool isOnHoverDisk) : _isOnHoverDisk(isOnHoverDisk) { }
1724
1726 {
1727 if (Unit* passenger = obj->ToUnit())
1728 if (passenger->GetVehicleBase() && passenger->GetVehicleBase()->GetEntry() == NPC_HOVER_DISK_MELEE)
1729 return _isOnHoverDisk;
1730
1731 return !_isOnHoverDisk;
1732 }
1733
1734 private:
1736};
1737
1738// 56397 - Arcane Barrage
1740{
1741 bool Load() override
1742 {
1743 return GetCaster()->GetTypeId() == TYPEID_UNIT && GetCaster()->GetInstanceScript() != nullptr;
1744 }
1745
1746 void FilterMeleeHoverDiskPassangers(std::list<WorldObject*>& targets)
1747 {
1748 if (targets.empty())
1749 return;
1750
1751 Creature* caster = GetCaster()->ToCreature();
1752 InstanceScript* instance = caster->GetInstanceScript();
1753 Creature* malygos = ObjectAccessor::GetCreature(*caster, instance->GetGuidData(DATA_MALYGOS));
1754
1755 // If max possible targets are more than 1 then Scions wouldn't select previosly selected target,
1756 // in longer terms this means if spell picks target X then 2nd cast of this spell will pick smth else
1757 // and if 3rd picks X again 4th will pick smth else (by not limiting the cast to certain caster).
1758 if (targets.size() > 1)
1759 if (malygos && !malygos->AI()->GetGUID(DATA_LAST_TARGET_BARRAGE_GUID).IsEmpty())
1760 targets.remove_if(Trinity::ObjectGUIDCheck(malygos->AI()->GetGUID(DATA_LAST_TARGET_BARRAGE_GUID)));
1761
1762 // Remove players not on Hover Disk from second list
1763 std::list<WorldObject*> playersWithoutDisk;
1764 IsPlayerOnHoverDisk check(false);
1765 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
1766 if (check(*itr))
1767 playersWithoutDisk.push_back(*itr);
1768
1769 // if it's empty than we can have player on Hover disk as target.
1770 if (!playersWithoutDisk.empty())
1771 targets = playersWithoutDisk;
1772
1773 // Finally here we remove all targets that have been damaged by Arcane Barrage
1774 // and have 2 seconds long aura still lasting. Used to give healers some time.
1775 if (!targets.empty())
1776 targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_ARCANE_BARRAGE_DAMAGE));
1777
1778 // Now we resize the list to max output targets which can be only 1
1779 // to take it's guid and send/store it to DATA_LAST_TARGET_BARRAGE_GUID.
1780 // Same target is never picked until next pick pass. This doesn't mean
1781 // that it can't be hit more than once. In fact all is chance and raid speed.
1782 if (!targets.empty())
1783 {
1784 if (targets.size() > 1)
1786
1787 if (WorldObject* filteredTarget = targets.front())
1788 if (malygos)
1789 malygos->AI()->SetGUID(filteredTarget->GetGUID(), DATA_LAST_TARGET_BARRAGE_GUID);
1790 }
1791 }
1792
1794 {
1795 if (Player* hitTarget = GetHitPlayer())
1797 .SetOriginalCaster(GetCaster()->GetGUID()));
1798 }
1799
1805};
1806
1807// 58842 - Destroy Platform Channel
1809{
1810 bool Load() override
1811 {
1812 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1813 }
1814
1815 bool Validate(SpellInfo const* /*spell*/) override
1816 {
1818 }
1819
1820 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1821 {
1822 if (Creature* target = GetTarget()->ToCreature())
1823 if (InstanceScript* instance = target->GetInstanceScript())
1824 if (Creature* platformTrigger = target->GetMap()->GetCreature(instance->GetGuidData(DATA_ALEXSTRASZA_BUNNY_GUID)))
1825 platformTrigger->CastSpell(platformTrigger, SPELL_DESTROY_PLATFORM_BOOM_VISUAL);
1826 }
1827
1832};
1833
1834// 59084 - Destroy Platform Boom Visual
1836{
1837 bool Load() override
1838 {
1839 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1840 }
1841
1842 bool Validate(SpellInfo const* /*spell*/) override
1843 {
1845 }
1846
1847 void HandleDummy(SpellEffIndex /*effIndex*/)
1848 {
1849 if (Creature* target = GetHitCreature())
1850 target->CastSpell(target, SPELL_DESTROY_PLATFORM_EVENT);
1851 }
1852
1857};
1858
1859// 59099 - Destroy Platform Event
1861{
1862 bool Load() override
1863 {
1864 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1865 }
1866
1868 {
1869 Creature* caster = GetCaster()->ToCreature();
1870 if (InstanceScript* instance = caster->GetInstanceScript())
1871 if (GameObject* platform = caster->GetMap()->GetGameObject(instance->GetGuidData(DATA_PLATFORM)))
1872 platform->SetFlag(GO_FLAG_DESTROYED);
1873 }
1874
1875 void HandleScript(SpellEffIndex /*effIndex*/)
1876 {
1878 }
1879
1885};
1886
1887// 56070 - Summon Red Dragon Buddy
1889{
1890 bool Load() override
1891 {
1892 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1893 }
1894
1896 {
1897 // Adjust effect summon position to lower Z
1898 Position const offset = { 0.0f, 0.0f, -80.0f, 0.0f };
1899 dest.RelocateOffset(offset);
1900 }
1901
1906};
1907
1908// 56072 - Ride Red Dragon Buddy
1910{
1911 bool Load() override
1912 {
1913 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1914 }
1915
1916 void HandleScript(SpellEffIndex /*effIndex*/)
1917 {
1918 if (Unit* target = GetHitUnit())
1919 target->CastSpell(GetCaster(), GetEffectValueAsInt(), true);
1920 }
1921
1926};
1927
1928// 60939 - Surge of Power
1930{
1931 bool Load() override
1932 {
1933 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1934 }
1935
1936 bool Validate(SpellInfo const* /*spell*/) override
1937 {
1939 }
1940
1941 void SendThreeTargets(std::list<WorldObject*>& targets)
1942 {
1943 // This spell hits only vehicles (SMSG_SPELL_GO target)
1944 Creature* caster = GetCaster()->ToCreature();
1945 // Remove all objects that aren't* vehicles.
1946 targets.remove_if(IsCreatureVehicleCheck(false));
1947 if (targets.empty())
1948 return;
1949
1950 // But in fact it selects 3 targets (SMSG_SPELL_GO target are not filtered)
1951 std::list<WorldObject*> selectedTargets = targets;
1952
1953 uint8 guidDataSlot = DATA_FIRST_SURGE_TARGET_GUID; // SetGuid in Malygos AI is reserved for 14th, 15th and 16th Id for the three targets
1954 Trinity::Containers::RandomResize(selectedTargets, 3);
1955 for (std::list<WorldObject*>::const_iterator itr = selectedTargets.begin(); itr != selectedTargets.end(); ++itr)
1956 {
1957 Creature* target = (*itr)->ToCreature();
1958 caster->AI()->SetGUID(target->GetGUID(), guidDataSlot++);
1959
1960 if (Vehicle* vehicle = target->GetVehicleKit())
1961 if (Unit* passenger = vehicle->GetPassenger(0))
1962 if (passenger->GetTypeId() == TYPEID_PLAYER)
1963 caster->AI()->Talk(EMOTE_SURGE_OF_POWER_WARNING_P3, passenger);
1964 }
1965 }
1966
1971
1977};
1978
1979// 60936 - Surge of Power
1981{
1982 bool Load() override
1983 {
1984 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1985 }
1986
1987 void FilterTargets(std::list<WorldObject*>& targets)
1988 {
1989 Creature* caster = GetCaster()->ToCreature();
1990
1991 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end();)
1992 {
1993 bool found = false;
1994 WorldObject* target = *itr;
1995
1997 {
1998 if (target->GetGUID() == caster->AI()->GetGUID(guidSlot))
1999 {
2000 found = true;
2001 break;
2002 }
2003 }
2004
2005 if (!found)
2006 targets.erase(itr++);
2007 else
2008 ++itr;
2009 }
2010 }
2011
2016};
2017
2018// 61028 - Alexstrasza's Gift Beam
2020{
2021 bool Load() override
2022 {
2023 return GetCaster()->GetTypeId() == TYPEID_UNIT;
2024 }
2025
2026 bool Validate(SpellInfo const* /*spell*/) override
2027 {
2029 }
2030
2031 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2032 {
2033 if (Creature* target = GetTarget()->ToCreature())
2034 target->CastSpell(target, SPELL_ALEXSTRASZAS_GIFT_BEAM_VISUAL);
2035 }
2036
2037 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2038 {
2039 if (Creature* target = GetTarget()->ToCreature())
2040 target->RemoveAura(SPELL_ALEXSTRASZAS_GIFT_BEAM_VISUAL);
2041 }
2042
2048};
2049
2050// 61023 - Alexstrasza's Gift Visual
2052{
2053public:
2058
2059private:
2060 bool Load() override
2061 {
2062 return GetCaster()->GetTypeId() == TYPEID_UNIT;
2063 }
2064
2065 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2066 {
2067 if (Creature* target = GetTarget()->ToCreature())
2068 {
2069 if (target->GetMap()->GetDifficultyID() == DIFFICULTY_10_N)
2070 _alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_10, *target, QuaternionData::fromEulerAnglesZYX(target->GetOrientation(), 0.0f, 0.0f), 0s);
2071 else if (target->GetMap()->GetDifficultyID() == DIFFICULTY_25_N)
2072 _alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_25, *target, QuaternionData::fromEulerAnglesZYX(target->GetOrientation(), 0.0f, 0.0f), 0s);
2073 }
2074 }
2075
2076 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2077 {
2078 if (Creature* target = GetTarget()->ToCreature())
2079 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
2080 {
2082 if (GameObject* heartMagic = target->GetMap()->GetGameObject(instance->GetGuidData(DATA_HEART_OF_MAGIC_GUID)))
2083 {
2084 heartMagic->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
2085 // TO DO: This is hack, core doesn't have support for these flags,
2086 // remove line below if it ever gets supported otherwise object won't be accessible.
2087 heartMagic->RemoveFlag(GO_FLAG_INTERACT_COND);
2088 }
2089 }
2090 }
2091
2097
2099};
2100
2102{
2103 public:
2104 achievement_denyin_the_scion() : AchievementCriteriaScript("achievement_denyin_the_scion") { }
2105
2106 bool OnCheck(Player* source, Unit* /*target*/) override
2107 {
2108 // Only melee disks can be used
2109 if (Unit* disk = source->GetVehicleBase())
2110 if (disk->GetEntry() == NPC_HOVER_DISK_MELEE)
2111 return true;
2112
2113 return false;
2114 }
2115};
2116
2118{
2129
2147
2149}
@ DIFFICULTY_10_N
Definition DBCEnums.h:936
@ DIFFICULTY_25_N
Definition DBCEnums.h:937
uint8_t uint8
Definition Define.h:156
int8_t int8
Definition Define.h:152
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
@ IN_PROGRESS
@ FAIL
@ NOT_STARTED
@ CHASE_MOTION_TYPE
@ POINT_MOTION_TYPE
@ EFFECT_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
@ TYPEID_UNIT
Definition ObjectGuid.h:43
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
Spells
Definition PlayerAI.cpp:32
float frand(float min, float max)
Definition Random.cpp:55
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
SpellEffIndex
@ EFFECT_0
@ EFFECT_2
@ TARGET_DEST_CASTER_RADIUS
@ TARGET_UNIT_SRC_AREA_ENEMY
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SEND_EVENT
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ GO_FLAG_INTERACT_COND
@ GO_FLAG_NOT_SELECTABLE
@ GO_FLAG_DESTROYED
@ FACTION_FRIENDLY
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_DUMMY
@ SPELLVALUE_MAX_TARGETS
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define SpellDestinationTargetSelectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define SpellHitFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
EvadeReason
@ MOVE_FLIGHT
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
DamageEffectType
@ UNIT_STATE_ROOT
Definition Unit.h:271
@ UNIT_STATE_CASTING
Definition Unit.h:276
Movements
Position const AlexstraszaSpawnPos
#define MAX_RANGE_HOVER_DISK_SPAWNPOINTS
@ LIGHT_CHANGE_DIMENSIONS
@ LIGHT_OBSCURE_ARCANE_RUNES
@ LIGHT_OBSCURE_SPACE
@ DATA_LAST_TARGET_BARRAGE_GUID
@ DATA_FIRST_SURGE_TARGET_GUID
@ NUM_MAX_SURGE_TARGETS
@ LIGHT_DEFAULT
@ DATA_SUMMON_DEATHS
@ DATA_PHASE
@ DATA_LAST_OVERLOAD_GUID
@ LIGHT_ARCANE_RUNES
@ ACTION_HANDLE_P_THREE_INTRO
@ ACTION_LAND_ENCOUNTER_START
@ ACTION_SET_DISK_VICTIM_CHASE
@ ACTION_CYCLIC_MOVEMENT
@ ACTION_DELAYED_DESPAWN
@ ACTION_EXECUTE_VORTEX
@ ACTION_HANDLE_RESPAWN
@ ACTION_LIFT_IN_AIR
void AddSC_boss_malygos()
@ SEAT_0
@ SPELL_PORTAL_BEAM
@ SPELL_CLEAR_ALL_DEBUFFS
@ SPELL_ARCANE_STORM_EXTRA_VISUAL
@ SPELL_VORTEX_1
@ SPELL_RIDE_HOVER_DISK
@ SPELL_ARCANE_PULSE
@ SPELL_POWER_SPARK_MALYGOS
@ SPELL_POWER_SPARK_DEATH
@ SPELL_PORTAL_VISUAL_CLOSED
@ SPELL_SUMMON_ARCANE_BOMB
@ SPELL_ARCANE_BARRAGE
@ SPELL_ARCANE_STORM_P_I
@ SPELL_SUMMON_RED_DRAGON_BUDDY_F_CAST
@ SPELL_HASTE
@ SPELL_RIDE_RED_DRAGON_BUDDY
@ SPELL_ARCANE_BOMB_TRIGGER
@ SPELL_DESTROY_PLATFORM_BOOM_VISUAL
@ SPELL_ARCANE_BARRAGE_DAMAGE
@ SPELL_ARCANE_BREATH
@ SPELL_ARCANE_SHOCK
@ SPELL_VORTEX_2
@ SPELL_DUMMY_NUKE
@ SPELL_DESTROY_PLATFORM_CHANNEL
@ SPELL_RANDOM_PORTAL
@ SPELL_VORTEX_3
@ SPELL_SURGE_OF_POWER_PHASE_3_10
@ SPELL_ARCANE_OVERLOAD_1
@ SPELL_ARCANE_BOMB_KNOCKBACK_DAMAGE
@ SPELL_MALYGOS_BERSERK
@ SPELL_ALEXSTRASZAS_GIFT_BEAM_VISUAL
@ SPELL_SURGE_OF_POWER_PHASE_3_25
@ SPELL_IMMUNE_CURSES
@ SPELL_ALIGN_DISK_AGGRO
@ SPELL_DESTROY_PLATFORM_EVENT
@ SPELL_STATIC_FIELD_MISSLE
@ SPELL_BERSERK
@ SPELL_SURGE_OF_POWER_WARNING_SELECTOR_25
@ SPELL_SUMMON_POWER_PARK
@ SPELL_TELEPORT_VISUAL_ONLY
@ SPELL_SURGE_OF_POWER_P_II
@ SPELL_VORTEX_6
@ SPELL_ARCANE_STORM_P_III
@ PHASE_ONE
@ PHASE_NOT_STARTED
@ PHASE_THREE
@ PHASE_TWO
Position const RangeHoverDisksSpawnPositions[MAX_RANGE_HOVER_DISK_SPAWNPOINTS]
#define MAX_SUMMONS_PHASE_TWO_25MAN
@ SAY_DEATH
@ SAY_START_P_THREE
@ SAY_END_P_ONE
@ SAY_ANTI_MAGIC_SHELL
@ SAY_ONE
@ SAY_TWO
@ EMOTE_POWER_SPARK_SUMMONED
@ SAY_DEEP_BREATH
@ SAY_KILLED_PLAYER_P_THREE
@ SAY_KILLED_PLAYER_P_TWO
@ EMOTE_SURGE_OF_POWER_WARNING_P3
@ SAY_SURGE_OF_POWER
@ SAY_END_P_TWO
@ SAY_MAGIC_BLAST
@ SAY_INTRO_EVENT
@ SAY_FOUR
@ SAY_SPELL_CASTING_P_THREE
@ SAY_THREE
@ EMOTE_SURGE_OF_POWER_WARNING_P2
@ SAY_START_P_ONE
@ SAY_KILLED_PLAYER_P_ONE
@ EMOTE_HIT_BERSERKER_TIMER
@ SAY_BUFF_SPARK
Position const MalygosPositions[MAX_MALYGOS_POS]
Position const HeartOfMagicSpawnPos
Position const MeleeHoverDisksSpawnPositions[MAX_RANGE_HOVER_DISK_SPAWNPOINTS]
Position const MeleeHoverDisksWaypoints[MAX_MELEE_HOVER_DISK_WAYPOINTS]
#define MAX_MELEE_HOVER_DISK_SPAWNPOINTS
#define MAX_MALYGOS_POS
@ POINT_DESTROY_PLATFORM_P_TWO
@ POINT_NEAR_RANDOM_PORTAL_P_NONE
@ POINT_LIFT_IN_AIR_P_ONE
@ POINT_LAND_AFTER_VORTEX_P_ONE
@ POINT_PHASE_ONE_TO_TWO_TRANSITION
@ POINT_LAND_P_ONE
@ POINT_SURGE_OF_POWER_P_TWO
@ POINT_FLY_OUT_OF_PLATFORM_P_TWO
@ POINT_VORTEX_P_ONE
@ POINT_IDLE_P_THREE
#define MAX_SUMMONS_PHASE_TWO_10MAN
Achievements
@ ACHIEV_TIMED_START_EVENT
#define MAX_MELEE_HOVER_DISK_WAYPOINTS
AreaIds
@ AREA_EYE_OF_ETERNITY
@ EVENT_LAND_START_ENCOUNTER
@ EVENT_STOP_PORTAL_BEAM
@ EVENT_ARCANE_SHOCK
@ EVENT_START_P_THREE
@ EVENT_VORTEX
@ EVENT_SUMMON_ARCANE_BOMB
@ EVENT_MOVE_TO_POINT_SURGE_P_TWO
@ EVENT_ARCANE_STORM
@ EVENT_DELAYED_REINFORCEMENTS
@ EVENT_HASTE_BUFF
@ EVENT_STATIC_FIELD
@ EVENT_SURGE_OF_POWER_P_THREE
@ EVENT_POWER_SPARKS
@ EVENT_MOVE_TO_P_THREE_POINT
@ EVENT_LIGHT_DIMENSION_CHANGE
@ EVENT_SAY_INTRO
@ EVENT_SURGE_OF_POWER_P_TWO
@ EVENT_CAST_RIDE_SPELL
@ EVENT_ARCANE_BARRAGE
@ EVENT_PATHING_AROUND_PLATFORM
@ EVENT_ARCANE_PULSE
@ EVENT_PREVENT_SAY_SPAM_ON_KILL
@ EVENT_FLY_OUT_OF_PLATFORM
@ EVENT_NUKE_DUMMY
@ EVENT_DELAY_MOVE_TO_DESTROY_P
@ EVENT_START_FIRST_RANDOM_PORTAL
@ EVENT_RANDOM_PORTAL
@ EVENT_MOVE_TO_VORTEX_POINT
@ EVENT_ARCANE_BREATH
HookList< EffectApplyHandler > AfterEffectRemove
Unit * GetCaster() const
Unit * GetTarget() const
HookList< EffectApplyHandler > OnEffectApply
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
TypeID GetTypeId() const
Definition BaseEntity.h:166
InstanceScript *const instance
SummonList summons
EventMap events
void DoZoneInCombat()
Definition CreatureAI.h:169
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:386
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
void SetReactState(ReactStates st)
Definition Creature.h:174
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Position GetRespawnPosition(float *dist=nullptr) const
void SetImmuneToAll(bool apply) override
Definition Creature.h:181
CreatureAI * AI() const
Definition Creature.h:228
uint32 ExecuteEvent()
Definition EventMap.cpp:77
void Update(uint32 time)
Definition EventMap.h:61
void CancelEventGroup(uint32 group)
Definition EventMap.cpp:157
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
void SetPhase(uint8 phase)
Definition EventMap.cpp:32
void Reset()
Definition EventMap.cpp:25
ExactDistanceCheck(Unit *source, float dist)
bool operator()(WorldObject *unit)
void RemoveFlag(GameObjectFlags flags)
Definition GameObject.h:278
virtual bool SetBossState(uint32 id, EncounterState state)
virtual ObjectGuid GetGuidData(uint32 type) const override
EncounterState GetBossState(uint32 id) const
void TriggerGameEvent(uint32 gameEventId, WorldObject *source=nullptr, WorldObject *target=nullptr) override
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
IsCreatureVehicleCheck(bool isVehicle)
bool operator()(WorldObject *obj)
IsPlayerOnHoverDisk(bool isOnHoverDisk)
bool operator()(WorldObject *obj)
GameObject * GetGameObject(ObjectGuid const &guid)
Definition Map.cpp:3552
void SetZoneOverrideLight(uint32 zoneId, uint32 areaLightId, uint32 overrideLightId, Milliseconds transitionTime)
Definition Map.cpp:4044
Difficulty GetDifficultyID() const
Definition Map.h:360
Creature * GetCreature(ObjectGuid const &guid)
Definition Map.cpp:3542
void MoveTakeoff(uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
MovementGeneratorType GetCurrentMovementGeneratorType() const
void MoveFollow(Unit *target, float dist, Optional< ChaseAngle > angle={}, Optional< Milliseconds > duration={}, bool ignoreTargetWalk=false, MovementSlot slot=MOTION_SLOT_ACTIVE, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MoveCirclePath(float x, float y, float z, float radius, bool clockwise, uint8 stepCount, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MoveLand(uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
static ObjectGuid const Empty
Definition ObjectGuid.h:314
bool IsEmpty() const
Definition ObjectGuid.h:362
bool IsVehicle() const
Definition ObjectGuid.h:365
void Clear()
Definition ObjectGuid.h:329
float GetObjectScale() const
Definition Object.h:92
Player * ToPlayer()
Definition Object.h:126
uint32 GetEntry() const
Definition Object.h:89
Creature * ToCreature()
Definition Object.h:121
Unit * ToUnit()
Definition Object.h:116
uint32 const Id
Definition SpellInfo.h:328
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Creature * GetHitCreature() const
Player * GetHitPlayer() const
Unit * GetCaster() const
HookList< HitHandler > AfterHit
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
int32 GetEffectValueAsInt() const
HookList< HitHandler > OnHit
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
HookList< EffectHandler > OnEffectLaunchTarget
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
bool empty() const
void DespawnIf(T const &predicate)
void DoAction(int32 info, Predicate &&predicate, uint16 max=0)
virtual void Reset()
Definition UnitAI.h:64
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
virtual void SetGUID(ObjectGuid const &guid, int32 id)
Definition UnitAI.h:76
virtual void DoAction(int32 param)
Definition UnitAI.h:73
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:180
virtual ObjectGuid GetGUID(int32 id) const
Definition UnitAI.h:77
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:79
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:162
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
float GetHealthPct() const
Definition Unit.h:796
float GetSpeed(UnitMoveType mtype) const
Definition Unit.cpp:8932
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3828
void SetControlled(bool apply, UnitState state)
Definition Unit.cpp:11545
void SetFaction(uint32 faction) override
Definition Unit.h:872
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition Unit.cpp:3231
Unit * GetVehicleBase() const
Definition Unit.cpp:12111
MotionMaster * GetMotionMaster()
Definition Unit.h:1723
void SetFacingToObject(WorldObject const *object, bool force=true)
Definition Unit.cpp:13307
void StopMoving()
Definition Unit.cpp:10680
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13361
void SetUninteractible(bool apply)
Definition Unit.cpp:8564
bool IsAIEnabled() const
Definition Unit.h:666
bool SetCanFly(bool enable)
Definition Unit.cpp:13459
uint64 GetHealth() const
Definition Unit.h:788
Unit * GetVictim() const
Definition Unit.h:726
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition Unit.cpp:8942
void NearTeleportTo(TeleportLocation const &target, bool casting=false)
Definition Unit.cpp:12958
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4804
void RemoveAllAuras()
Definition Unit.cpp:4382
Vehicle * GetVehicleKit() const
Definition Unit.h:1782
bool AttackStop()
Definition Unit.cpp:5965
bool IsInCombat() const
Definition Unit.h:1058
bool operator()(ObjectGuid guid)
Map * GetMap() const
Definition Object.h:411
InstanceScript * GetInstanceScript() const
Definition Object.cpp:396
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2217
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition Object.cpp:1398
void setActive(bool isActiveObject)
Definition Object.cpp:276
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition Object.cpp:1441
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:1517
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:432
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:100
bool OnCheck(Player *source, Unit *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void Register() override
void ResizeEffectRadiusTargetChecker(std::list< WorldObject * > &targets)
void HandleVisual(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleDummy(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
void SendThreeTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void FilterMeleeHoverDiskPassangers(std::list< WorldObject * > &targets)
@ DATA_VORTEX_HANDLING
@ DATA_RESPAWN_IRIS
@ DATA_POWER_SPARKS_HANDLING
@ DATA_MALYGOS_EVENT
@ GO_HEART_OF_MAGIC_10
@ GO_HEART_OF_MAGIC_25
@ GO_ALEXSTRASZA_S_GIFT_10
@ GO_ALEXSTRASZA_S_GIFT_25
@ NPC_PORTAL_TRIGGER
@ NPC_POWER_SPARK
@ NPC_HOVER_DISK_CASTER
@ NPC_ALEXSTRASZA
@ NPC_HOVER_DISK_MELEE
#define RegisterEyeOfEternityCreatureAI(ai_name)
@ SPELL_RIDE_RED_DRAGON_TRIGGERED
@ SPELL_PORTAL_OPENED
@ DATA_HEART_OF_MAGIC_GUID
@ DATA_TRIGGER
@ DATA_MALYGOS
@ DATA_ALEXSTRASZA_BUNNY_GUID
@ DATA_FOCUSING_IRIS_GUID
@ DATA_PLATFORM
@ DATA_GIFT_BOX_BUNNY_GUID
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
void RandomResize(C &container, std::size_t requestedSize)
Definition Containers.h:67
constexpr void SetOrientation(float orientation)
Definition Position.h:82
constexpr float GetPositionX() const
Definition Position.h:87
float m_positionZ
Definition Position.h:66
constexpr float GetPositionY() const
Definition Position.h:88
float GetExactDist2d(const float x, const float y) const
Definition Position.h:117
float m_positionX
Definition Position.h:64
float m_positionY
Definition Position.h:65
constexpr void GetPosition(float &x, float &y) const
Definition Position.h:92
constexpr float GetOrientation() const
Definition Position.h:90
constexpr float GetPositionZ() const
Definition Position.h:89
static QuaternionData fromEulerAnglesZYX(float Z, float Y, float X)
T const & RAID_MODE(T const &normal10, T const &normal25) const
Difficulty GetDifficulty() const
void RelocateOffset(Position const &offset)
Definition Spell.cpp:90
void UpdateAI(uint32 diff) override
Definition CombatAI.cpp:241
void MoveInLineOfSight(Unit *who) override
void Reset() override
bool _flyingOutOfPlatform
void JustEngagedWith(Unit *) override
ObjectGuid _surgeTargetGUID[3]
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
uint8 _preparingPulsesChecker
void SetData(uint32 data, uint32 value) override
ObjectGuid GetGUID(int32 type) const override
bool _arcaneReinforcements
void JustDied(Unit *) override
void DoAction(int32 action) override
bool _performingSurgeOfPower
void SetPhaseEvents()
void UpdateAI(uint32 diff) override
uint32 GetData(uint32 data) const override
void MovementInform(uint32 type, uint32 id) override
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
void EnterEvadeMode(EvadeReason) override
void SetPhase(uint8 phase, bool setEvents=false)
bool _performingDestroyPlatform
ObjectGuid _arcaneOverloadGUID
boss_malygos(Creature *creature)
void KilledUnit(Unit *victim) override
void SetGUID(ObjectGuid const &guid, int32 id) override
ObjectGuid _lastHitByArcaneBarrageGUID
bool _firstCyclicMovementStarted
void IsSummonedBy(WorldObject *summoner) override
void UpdateAI(uint32) override
void DoAction(int32) override
InstanceScript * _instance
npc_arcane_overload(Creature *creature)
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void DoAction(int32 action) override
npc_caster_hover_disk(Creature *creature)
InstanceScript * _instance
void PassengerBoarded(Unit *unit, int8, bool apply) override
== Fields =======================================
void EnterEvadeMode(EvadeReason) override
void MovementInform(uint32 type, uint32 id) override
void Reset() override
npc_melee_hover_disk(Creature *creature)
void DoAction(int32) override
void PassengerBoarded(Unit *unit, int8, bool apply) override
== Fields =======================================
void UpdateAI(uint32 diff) override
InstanceScript * _instance
void Reset() override
void DoAction(int32) override
InstanceScript * _instance
void EnterEvadeMode(EvadeReason) override
npc_nexus_lord(Creature *creature)
void UpdateAI(uint32 diff) override
void JustDied(Unit *) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
npc_portal_eoe(Creature *creature)
InstanceScript * _instance
void UpdateAI(uint32) override
InstanceScript * _instance
npc_power_spark(Creature *creature)
void UpdateAI(uint32) override
void JustDied(Unit *) override
InstanceScript * _instance
void UpdateAI(uint32 diff) override
void EnterEvadeMode(EvadeReason) override
void JustDied(Unit *) override
void JustEngagedWith(Unit *) override
void IsSummonedBy(WorldObject *) override
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
npc_scion_of_eternity(Creature *creature)
npc_static_field(Creature *creature)
void IsSummonedBy(WorldObject *) override
npc_wyrmrest_skytalon(Creature *creature)
void IsSummonedBy(WorldObject *summoner) override
void PassengerBoarded(Unit *, int8, bool apply) override
== Fields =======================================
void UpdateAI(uint32 diff) override