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 "CreatureTextMgr.h"
26#include "eye_of_eternity.h"
27#include "GameObject.h"
28#include "GameObjectAI.h"
29#include "GridNotifiers.h"
30#include "InstanceScript.h"
31#include "Map.h"
32#include "MotionMaster.h"
33#include "ObjectAccessor.h"
34#include "Player.h"
35#include "ScriptedCreature.h"
36#include "SpellInfo.h"
37#include "SpellScript.h"
38#include "TemporarySummon.h"
39#include "Vehicle.h"
40
42{
43 // =========== INTRO BEFORE WE START ENCOUNTER ===============
48
49 // =========== PHASE ONE ===============
54
55 // =========== PHASE TWO ===============
65
66 // =========== PHASE THREE =============
70
71 // ========== MISC MECHANICS ===========
73 EVENT_MOVE_TO_VORTEX_POINT = 22, // This should be fixed someday in core, we can't call new movement from MovementInform
74 EVENT_START_FIRST_RANDOM_PORTAL = 23, // There is something that is still loading when we first enter instance and it breaks
75 // first visual cast of intro portal beam mechanic, so we need short delay from the event.
76 EVENT_DELAY_MOVE_TO_DESTROY_P = 24, // If Malygos is too close to destroy platform point and transition from II to III is hit,
77 // this event will be sheduled to start after 5 seconds so there is enough time for "dimension change".
78
79 // ============ NEXUS LORDS ============
83
84 // ======== SCIONS OF ETERNITY =========
86
87 // ======== WYRMREST SKYTALON ==========
89};
90
98
100{
101 // Intro
103 SPELL_PORTAL_BEAM = 56046, // Malygos cast on portal to activate it during PHASE_NOT_STARTED
104
105 //Phase I
107 SPELL_MALYGOS_BERSERK = 47008, // it's the berserk spell that will hit only Malygos after 10 min of 60670
114 SPELL_VORTEX_1 = 56237, // seems that frezze object animation
115 SPELL_VORTEX_2 = 55873, // visual effect
116 SPELL_VORTEX_3 = 56105, // this spell must handle all the script - cast by the boss and to himself
117 SPELL_VORTEX_6 = 73040, // teleport - (cast to all raid), caster vortex bunnies, targets players.
118
119 // Phase II
120 SPELL_TELEPORT_VISUAL_ONLY = 41232, // Light blue animation cast by arcane NPCs when spawned on Hover Disks
127 SPELL_ARCANE_OVERLOAD_1 = 56432, // cast by npc Arcane Overload ID: 30282
128 // SPELL_ARCANE_OVERLOAD_2 = 56435, // Triggered by 56432 - resizing target
129 // SPELL_ARCANE_OVERLOAD_3 = 56438, // Triggered by 56432 - damage reduction
131 // SPELL_SURGE_OF_POWER_TRIGGERED = 56548,
132 SPELL_ARCANE_SHOCK = 57058, // used by Nexus Lords
133 SPELL_HASTE = 57060, // used by Nexus Lords
134 SPELL_ARCANE_BARRAGE = 56397, // used by Scions of Eternity
135 SPELL_ARCANE_BARRAGE_DAMAGE = 63934, // the actual damage - cast by affected player by script spell
136
137 // Transition /II-III/
139 SPELL_SUMMON_RED_DRAGON_BUDDY_F_CAST = 58846, // After implicitly hit player targets they will force cast 56070 on self
143
144 // Phase III
151 SPELL_SURGE_OF_POWER_WARNING_SELECTOR_25 = 60939, // used in 25 player mode for selecting targets for warnings and then sends to actual spell
153
154 // Phase I and III
156
157 // Outro
160
174
176{
177 SEAT_0 = 0
179
181{
182 // Malygos
189
190 // Caster hover disk despawn action
192
193 // Nexus Lord's action used to shedule casting spell that determine disk's target to chase
196
198{
199 // Malygos
205 // SAY_START_P_TWO = 5, // Unused by Blizzard for some reason on any version
211 // SAY_START_P_THREE = 11, // Unused by Blizzard for some reason on any version
220
221 // Alexstrasza
226
227 // Power Sparks
230
231#define MAX_SUMMONS_PHASE_TWO_10MAN 6
232#define MAX_SUMMONS_PHASE_TWO_25MAN 12
233
234#define MAX_RANGE_HOVER_DISK_SPAWNPOINTS 8
236{
237 { 782.9821f, 1296.652f, 282.1114f, 0.0f },
238 { 764.3126f, 1328.871f, 282.3091f, 0.0f },
239 { 725.8506f, 1306.749f, 282.2698f, 0.0f },
240 { 744.5175f, 1274.396f, 282.3402f, 0.0f },
241 { 764.3936f, 1274.371f, 282.6011f, 0.0f },
242 { 779.3761f, 1316.166f, 282.1653f, 0.0f },
243 { 744.4915f, 1328.901f, 282.2112f, 0.0f },
244 { 729.2364f, 1287.328f, 282.4173f, 0.0f }
245};
246
247#define MAX_MELEE_HOVER_DISK_SPAWNPOINTS 4
249{
250 { 754.4617f, 1283.859f, 285.0522f, 0.0f },
251 { 771.7864f, 1301.853f, 285.0522f, 0.0f },
252 { 753.9635f, 1319.003f, 285.0522f, 0.0f },
253 { 736.4914f, 1301.683f, 285.0522f, 0.0f }
254};
255
256#define MAX_MELEE_HOVER_DISK_WAYPOINTS 16
258{
259 // First melee hover disk wps
260 { 766.2931f, 1312.904f, 277.0551f, 0.0f },
261 { 754.3397f, 1319.759f, 274.0536f, 0.0f },
262 { 742.1018f, 1312.714f, 270.1367f, 0.0f },
263 { 735.6851f, 1301.422f, 266.7208f, 0.0f },
264 // Second melee hover disk wps
265 { 742.6257f, 1313.471f, 275.9713f, 0.0f },
266 { 736.8845f, 1301.921f, 274.0264f, 0.0f },
267 { 742.6632f, 1289.951f, 269.8603f, 0.0f },
268 { 754.3682f, 1283.942f, 266.6098f, 0.0f },
269 // Third melee hover disk wps
270 { 742.2078f, 1290.518f, 276.2484f, 0.0f },
271 { 754.5398f, 1284.311f, 273.5815f, 0.0f },
272 { 766.5588f, 1290.345f, 269.6655f, 0.0f },
273 { 773.4768f, 1301.474f, 266.5821f, 0.0f },
274 // Forth melee hover disk wps
275 { 766.1189f, 1290.197f, 276.9436f, 0.0f },
276 { 771.9507f, 1301.602f, 273.9712f, 0.0f },
277 { 766.1253f, 1313.451f, 270.4991f, 0.0f },
278 { 754.5378f, 1319.399f, 266.6653f, 0.0f }
279};
280
281#define MAX_MALYGOS_POS 10
283{
284 { 754.544f, 1301.71f, 320.01f, 0.0f }, // Point destroy platform
285 { 754.393f, 1301.27f, 292.91f, 0.0f }, // Point Vortex
286 { 754.362f, 1301.61f, 266.17f, 0.0f }, // Point land after Vortex
287 { 754.695f, 1301.66f, 316.65f, 0.0f }, // Point Surge of Power phase II
288 { 755.681f, 1298.41f, 220.06f, 0.0f } // Point idle phase III
289};
290
291Position const AlexstraszaSpawnPos = { 854.551f, 1225.31f, 300.901f, 0.0f }; // Alexstrasza's spawn position
292Position const HeartOfMagicSpawnPos = { 755.351f, 1298.31f, 223.909f, 0.0f }; // Heart of Magic spawn position
293
294#define TEN_MINUTES (10*MINUTE*IN_MILLISECONDS)
295
300
302{
305
307{
308 // Lights
314
315 // Data (setters/getters)
316 DATA_SUMMON_DEATHS = 0, // phase 2
318
319 // Target guids
320 DATA_LAST_OVERLOAD_GUID = 13, // used to store last Arcane Overload guid
322 // DATA_SECOND_SURGE_TARGET_GUID = 15,
323 // DATA_THIRD_SURGE_TARGET_GUID = 16,
325
327};
328
329// Used to check if summons guids come from vehicles
331{
332 public:
333 bool operator()(ObjectGuid guid) { return guid.IsVehicle(); }
334};
335
336struct boss_malygos : public BossAI
337{
339 {
340 Initialize();
342 _flySpeed = me->GetSpeed(MOVE_FLIGHT); // Get initial fly speed, otherwise on each wipe fly speed would add up if we get it
344 }
345
347 {
348 _summonDeaths = 0;
352 for (ObjectGuid& guid : _surgeTargetGUID)
353 guid.Clear();
354
355 _killSpamFilter = false;
356 _executingVortex = false;
358 _flyingOutOfPlatform = false;
362 }
363
364 void Reset() override
365 {
366 // EnterEvadeMode and Reset() links are cut for the sake of properly functioning despawner.
367 if (!_despawned)
368 _Reset();
369
370 Initialize();
371
372 me->SetDisableGravity(true);
373 me->SetImmuneToAll(true);
375 // 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
377 if (_despawned)
379
384 }
385
386 uint32 GetData(uint32 data) const override
387 {
388 switch (data)
389 {
391 return _summonDeaths;
392 case DATA_PHASE:
393 return _phase;
394 }
395
396 return 0;
397 }
398
399 void SetData(uint32 data, uint32 value) override
400 {
401 if (data == DATA_SUMMON_DEATHS && _phase == PHASE_TWO && !_despawned)
402 {
403 _summonDeaths = value;
404
406 {
408 {
411 }
412 }
414 {
416 {
419 }
420 }
421 }
422 }
423
433
434 void SetGUID(ObjectGuid const& guid, int32 id) override
435 {
436 switch (id)
437 {
439 _arcaneOverloadGUID = guid;
440 break;
445 break;
448 break;
449 }
450 }
451
452 void DoAction(int32 action) override
453 {
454 switch (action)
455 {
459 {
460 Position pos;
461 pos.m_positionZ = alexstraszaBunny->GetPositionZ();
462 alexstraszaBunny->GetNearPoint2D(nullptr, pos.m_positionX, pos.m_positionY, 30.0f, alexstraszaBunny->GetAbsoluteAngle(me));
464 me->SetImmuneToAll(false);
467 }
468 break;
470 DoCast(me, SPELL_VORTEX_1, true);
471 DoCast(me, SPELL_VORTEX_2, true);
472 // the vortex execution continues in the dummy effect of this spell (see it's script)
473 DoCast(me, SPELL_VORTEX_3, true);
474 break;
476 {
477 Position _zToLift = me->GetPosition();
478 if (_phase == PHASE_ONE)
479 {
480 _zToLift.m_positionZ += 20.0f;
482 }
483 else if (_phase == PHASE_TWO)
484 {
485 _zToLift.m_positionZ = 300.1f;
487 }
488 break;
489 }
494 // Vehicles shouldn't be despawned with 0 delay if the call comes from virtual function that overrides PassengerBoarded.
495 // Aside from that he doesn't despawn both vehicles and arcane overloads right away, but with some delay.
500 me->StopMoving();
501 if (me->GetPositionZ() > 300.0f)
503 else
505
507 break;
509 // Teleport to spawn position, we can't use normal relocate
510 float x, y, z, o;
511 me->GetRespawnPosition(x, y, z, &o);
512 me->NearTeleportTo(x, y, z, o);
513 // Respawn Iris
515 _despawned = false;
516 break;
518 me->GetMotionMaster()->MoveCirclePath(MalygosPositions[3].GetPositionX(), MalygosPositions[3].GetPositionY(), 283.2763f, 120.0f, true, 16);
519 break;
520 }
521 }
522
523 void SetPhase(uint8 phase, bool setEvents = false)
524 {
525 events.Reset();
526 events.SetPhase(phase);
527 _phase = phase;
528 if (setEvents)
530 }
531
558
559 void JustEngagedWith(Unit* /*who*/) override
560 {
561 // We can't call full function here since it includes DoZoneInCombat(),
562 // if someone does it will be returned with a warning.
563 me->setActive(true);
565 {
567 return;
568 }
569
571
573 DoCast(SPELL_BERSERK); // periodic aura, first tick in 10 minutes
575 }
576
577 void EnterEvadeMode(EvadeReason /*why*/) override
578 {
580
582
583 if (!summons.empty())
584 {
585 if (_phase == PHASE_TWO)
586 {
589 summons.DespawnIf(pred);
591 }
592 else if (_phase == PHASE_THREE)
594 }
595
596 me->DespawnOrUnsummon(0s, 30s);
597 }
598
599 void KilledUnit(Unit* victim) override
600 {
601 if (victim->GetTypeId() != TYPEID_PLAYER)
602 return;
603
604 if (!_killSpamFilter)
605 {
606 switch (_phase)
607 {
608 case PHASE_ONE:
611 _killSpamFilter = true;
612 break;
613 case PHASE_TWO:
616 _killSpamFilter = true;
617 break;
618 case PHASE_THREE:
621 _killSpamFilter = true;
622 break;
623 }
624 }
625 }
626
627 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
628 {
629 if (spellInfo->Id == SPELL_POWER_SPARK_MALYGOS)
630 {
631 if (Creature* creature = caster->ToCreature())
632 creature->DespawnOrUnsummon();
633
635 }
636 else if (spellInfo->Id == SPELL_MALYGOS_BERSERK)
638 }
639
640 void MoveInLineOfSight(Unit* who) override
641
642 {
643 if (!me->IsInCombat() || _phase != PHASE_ONE)
644 return;
645
646 if (who->GetEntry() == NPC_POWER_SPARK)
647 if (who->GetDistance(me) <= 2.5f)
649 }
650
651 void MovementInform(uint32 type, uint32 id) override
652 {
653 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
654 return;
655
656 switch (id)
657 {
659 if (Creature* portal = me->FindNearestCreature(NPC_PORTAL_TRIGGER, 31.0f, true))
660 {
663 DoCast(portal, SPELL_PORTAL_BEAM);
664 }
665 break;
666 case POINT_LAND_P_ONE:
667 me->SetDisableGravity(false);
668 break;
672 break;
674 me->SetDisableGravity(false);
675 _executingVortex = false;
677 break;
679 me->SetDisableGravity(true);
681 break;
684 {
688 me->SetFacingToObject(alexstraszaBunny);
690 }
691 _flyingOutOfPlatform = false;
694 break;
696 me->SetDisableGravity(true);
698 me->SetFacingToObject(alexstraszaBunny);
701 break;
704 {
708 }
709 break;
714 break;
718 break;
719 }
720 }
721
722 void DamageTaken(Unit* /*cause*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
723 {
724 if (damage > me->GetHealth() && _phase != PHASE_THREE)
725 damage = me->GetHealth() - 1;
726 }
727
728 void UpdateAI(uint32 diff) override
729 {
731 return;
732
733 events.Update(diff);
734
735 // we can't cast if we are casting already unless in PHASE_NOT_STARTED channeling PORTAL_BEAM
737 return;
738
739 // at 50% hp Malygos switchs to phase 2 and removes hovering until reset or end of encounter
740 if (_phase == PHASE_ONE && me->GetHealthPct() <= 50.0f)
741 {
742 SetPhase(PHASE_TWO, true);
744 me->AttackStop();
746 }
747
748 while (uint32 eventId = events.ExecuteEvent())
749 {
750 switch (eventId)
751 {
755 break;
758 break;
761 {
762 me->SetFacingToObject(iris);
763 iris->Delete(); // this is not the best way.
764 }
766 SetPhase(PHASE_ONE, true);
767 break;
768 case EVENT_SAY_INTRO:
771 break;
772 case EVENT_VORTEX:
773 _executingVortex = true;
776 break;
779 me->AttackStop();
781 break;
785 break;
788 {
790 break;
791 }
792
795 break;
797 if (_phase == PHASE_ONE)
798 {
800 {
802 break;
803 }
804
807 }
808 else if (_phase == PHASE_THREE)
809 {
812 }
813 break;
816 {
818 {
819 Position randomPosOnRadius;
820 // Hardcodded retail value, reason is Z getters can fail... (TO DO: Change to getter when height calculation works on 100%!)
821 randomPosOnRadius.m_positionZ = 283.0521f;
822 alexstraszaBunny->GetNearPoint2D(nullptr, randomPosOnRadius.m_positionX, randomPosOnRadius.m_positionY, 120.0f, alexstraszaBunny->GetAbsoluteAngle(me));
825 }
826 }
827
829 {
830 for (uint8 rangeDisks = 0; rangeDisks < (GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL ? 4 : 5); rangeDisks++)
831 {
833
834 if (casterDiskSummon->IsAIEnabled())
835 casterDiskSummon->AI()->DoAction(rangeDisks);
836 }
837
838 for (uint8 meleeDisks = 0; meleeDisks < 2; meleeDisks++)
839 {
842 }
843
844 _arcaneReinforcements = false;
845
848 }
849 break;
851 for (uint8 rangeDisks = 5; rangeDisks < 8; rangeDisks++)
852 {
854
855 if (casterDiskSummon->IsAIEnabled())
856 casterDiskSummon->AI()->DoAction(rangeDisks);
857 }
858
859 for (uint8 meleeDisks = 2; meleeDisks < 4; meleeDisks++)
860 {
863 }
864 break;
868 break;
871 {
876 }
877 break;
880 {
881 me->StopMoving();
883 }
884
886 {
888 if (Creature* lastArcaneOverloadBunny = ObjectAccessor::GetCreature(*me, _arcaneOverloadGUID))
889 DoCast(lastArcaneOverloadBunny, SPELL_ARCANE_BOMB_TRIGGER, true);
890 }
892 break;
895 {
899 }
900 else
901 {
904 }
905 break;
908 break;
911 break;
915 break;
923 SetPhase(PHASE_THREE, true);
924 break;
927 {
928 if (Unit* tempSurgeTarget = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, true, SPELL_RIDE_RED_DRAGON_BUDDY))
929 {
930 if (Vehicle* drakeVehicle = tempSurgeTarget->GetVehicleKit())
931 {
932 if (Unit* passenger = drakeVehicle->GetPassenger(0))
933 {
934 if (passenger->GetTypeId() == TYPEID_PLAYER)
935 {
937 DoCast(tempSurgeTarget, SPELL_SURGE_OF_POWER_PHASE_3_10, true);
938 }
939 }
940 }
941 }
942 }
944 {
945 for (ObjectGuid& guid : _surgeTargetGUID)
946 guid.Clear();
947
949 }
950
952 break;
954 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 60.0f, false, true, SPELL_RIDE_RED_DRAGON_BUDDY))
955 DoCast(target, SPELL_STATIC_FIELD_MISSLE, true);
956
958 break;
960 _killSpamFilter = false;
961 break;
962 default:
963 break;
964 }
965
967 return;
968 }
969
970 if (_phase != PHASE_THREE)
972 }
973
974 void JustDied(Unit* /*killer*/) override
975 {
976 _JustDied();
979 alexstraszaGiftBoxBunny->SummonGameObject(RAID_MODE(GO_HEART_OF_MAGIC_10, GO_HEART_OF_MAGIC_25), HeartOfMagicSpawnPos, QuaternionData(), 0s);
980
983 }
984
985private:
986 uint8 _phase; // Counter for phases used with a getter.
987 uint8 _summonDeaths; // Keeps count of arcane trash.
988 uint8 _preparingPulsesChecker; // In retail they use 2 preparing pulses with 7 sec CD, after they pass 2 seconds.
989 ObjectGuid _arcaneOverloadGUID; // Last Arcane Overload summoned to know to which should visual be cast to (the purple ball, not bubble).
990 ObjectGuid _lastHitByArcaneBarrageGUID; // Last hit player by Arcane Barrage, will be removed if targets > 1.
991 ObjectGuid _surgeTargetGUID[3]; // All these three are used to keep current tagets to which warning should be sent.
992
993 bool _killSpamFilter; // Prevent text spamming on killed player by helping implement a CD.
994 bool _despawned; // Checks if boss pass through evade on reset.
995 bool _executingVortex; // Prevents some events being sheduled during Vortex takeoff/land.
996 bool _arcaneReinforcements; // Checks if 10 or 25 man arcane trash will be spawned.
997 bool _flyingOutOfPlatform; // Used to prevent Malygos casting Arcane Overload shields while leaving platform.
998 bool _firstCyclicMovementStarted; // At first movement start he throws one shield asap, so this check is needed for it only.
999 bool _performingSurgeOfPower; // Used to prevent starting Cyclic Movement called in Arcane Bomb event.
1000 bool _performingDestroyPlatform; // Used to prevent starting some movements right when Destroy Platfrom event starts.
1001
1002 float _flySpeed; // Used to store base fly speed to prevent stacking on each evade.
1003};
1004
1006{
1007 npc_portal_eoe(Creature* creature) : ScriptedAI(creature)
1008 {
1009 _instance = creature->GetInstanceScript();
1010 }
1011
1012 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
1013 {
1014 if (spellInfo->Id == SPELL_PORTAL_OPENED)
1015 {
1017 {
1018 if (malygos->AI()->GetData(DATA_PHASE) == PHASE_ONE)
1020 }
1021 }
1022 }
1023
1024 void UpdateAI(uint32 /*diff*/) override
1025 {
1026 // When duration of opened riff visual ends, closed one should be cast
1029
1031 {
1032 if (malygos->AI()->GetData(DATA_PHASE) != PHASE_ONE && me->HasAura(SPELL_PORTAL_OPENED))
1033 {
1036 }
1037 }
1038 }
1039
1040private:
1042};
1043
1045{
1046 npc_power_spark(Creature* creature) : ScriptedAI(creature)
1047 {
1048 _instance = creature->GetInstanceScript();
1050 MoveToMalygos();
1051 }
1052
1054 {
1056
1058 me->GetMotionMaster()->MoveFollow(malygos, 0.0f, 0.0f);
1059 }
1060
1061 void UpdateAI(uint32 /*diff*/) override
1062 {
1063 if (!_instance)
1064 return;
1065
1067 {
1068 if (malygos->AI()->GetData(DATA_PHASE) != PHASE_ONE || _instance->GetBossState(DATA_MALYGOS_EVENT) == FAIL)
1069 {
1071 return;
1072 }
1073
1074 if (malygos->HasAura(SPELL_VORTEX_1))
1075 {
1077 return;
1078 }
1079
1081 me->GetMotionMaster()->MoveFollow(malygos, 0.0f, 0.0f);
1082 }
1083 }
1084
1085 void JustDied(Unit* /*killer*/) override
1086 {
1087 me->CastSpell(me, SPELL_POWER_SPARK_DEATH, true); // not supposed to hide the fact it's there by not selectable
1088 }
1089
1090private:
1092};
1093
1095{
1097 {
1098 Initialize();
1099 _instance = creature->GetInstanceScript();
1101 // TO DO: These were a bit faster than what they should be. Not sure what is the reason.
1102 me->SetSpeedRate(MOVE_FLIGHT, 1.25f);
1103 }
1104
1106 {
1107 _wpCount = 0;
1108 }
1109
1110 void Reset() override
1111 {
1113
1114 Initialize();
1115 }
1116
1117 void PassengerBoarded(Unit* unit, int8 /*seat*/, bool apply) override
1118 {
1119 if (apply)
1120 {
1121 if (unit->GetTypeId() == TYPEID_UNIT)
1122 {
1124 DoZoneInCombat(unit->ToCreature());
1125 }
1126 else if (unit->GetTypeId() == TYPEID_PLAYER)
1127 me->SetDisableGravity(true);
1128 }
1129 else
1130 {
1131 if (unit->GetTypeId() != TYPEID_PLAYER)
1132 {
1133
1136 me->SetDisableGravity(false);
1137 me->SetCanFly(false);
1138 }
1139 else if (unit->GetTypeId() == TYPEID_PLAYER)
1140 {
1141 me->SetDisableGravity(false);
1142 me->SetCanFly(false);
1143 }
1144
1146 me->RemoveAllAuras();
1147 }
1148 }
1149
1150 void UpdateAI(uint32 diff) override
1151 {
1152 _events.Update(diff);
1153
1154 while (uint32 eventId = _events.ExecuteEvent())
1156 }
1157
1158 void DoAction(int32 /*action*/) override
1159 {
1160 if (Vehicle* vehicleTemp = me->GetVehicleKit())
1161 {
1162 if (vehicleTemp->GetPassenger(0) && vehicleTemp->GetPassenger(0)->GetTypeId() == TYPEID_PLAYER)
1163 {
1164 vehicleTemp->RemoveAllPassengers();
1166 }
1167 }
1168
1169 me->DespawnOrUnsummon(3s);
1170 }
1171
1172 void MovementInform(uint32 type, uint32 id) override
1173 {
1174 if (type != POINT_MOTION_TYPE)
1175 return;
1176
1177 if (_wpCount < 3)
1178 {
1179 _events.ScheduleEvent(id + 1, 1ms);
1180 ++_wpCount;
1181 }
1182 else if (Vehicle* hoverDisk = me->GetVehicleKit())
1183 if (Unit* passenger = hoverDisk->GetPassenger(0))
1184 if (Creature* lordPassenger = passenger->ToCreature())
1185 lordPassenger->AI()->DoAction(ACTION_SET_DISK_VICTIM_CHASE);
1186 }
1187
1188private:
1189 uint8 _wpCount; // how many points are triggered
1192};
1193
1195{
1197 {
1198 _instance = creature->GetInstanceScript();
1200 // TO DO: Something is wrong with calculations for flying creatures that are on WP/Cyclic path.
1201 // They should get the same difference as to when at ground from run creature switch to walk.
1202 me->SetSpeedRate(MOVE_FLIGHT, 0.45f);
1203 }
1204
1205 void Reset() override
1206 {
1208 }
1209
1210 void EnterEvadeMode(EvadeReason /*why*/) override
1211 {
1212 }
1213
1214 void PassengerBoarded(Unit* unit, int8 /*seat*/, bool apply) override
1215 {
1216 if (apply)
1217 {
1218 if (unit->GetTypeId() == TYPEID_UNIT)
1220 }
1221 else
1222 {
1223 me->StopMoving();
1224 me->SetDisableGravity(false);
1225 me->SetCanFly(false);
1226 me->RemoveAllAuras();
1227 }
1228 }
1229
1230 void DoAction(int32 action) override
1231 {
1232 if (action < ACTION_DELAYED_DESPAWN)
1233 {
1234 me->GetMotionMaster()->MoveCirclePath(MalygosPositions[3].GetPositionX(), MalygosPositions[3].GetPositionY(), 282.3402f, 35.0f, true, 16);
1235 }
1236 else
1237 {
1238 me->DespawnOrUnsummon(3s);
1239 }
1240 }
1241
1242private:
1244};
1245
1247{
1248 npc_nexus_lord(Creature* creature) : ScriptedAI(creature)
1249 {
1250 _instance = creature->GetInstanceScript();
1251 }
1252
1253 void Reset() override
1254 {
1255 _events.Reset();
1256 }
1257
1258 void EnterEvadeMode(EvadeReason /*why*/) override
1259 {
1260 }
1261
1262 void DoAction(int32 /*action*/) override
1263 {
1267 }
1268
1269 void UpdateAI(uint32 diff) override
1270 {
1271 if (!UpdateVictim())
1272 return;
1273
1274 _events.Update(diff);
1275
1276 while (uint32 eventId = _events.ExecuteEvent())
1277 {
1278 switch (eventId)
1279 {
1280 case EVENT_ARCANE_SHOCK:
1281 if (Unit* victim = SelectTarget(SelectTargetMethod::Random, 0, 5.0f, true))
1282 DoCast(victim, SPELL_ARCANE_SHOCK);
1284 break;
1285 case EVENT_HASTE_BUFF:
1288 break;
1289 case EVENT_NUKE_DUMMY:
1293 break;
1294 }
1295 }
1296
1298 }
1299
1300 void JustDied(Unit* /*killer*/) override
1301 {
1303 malygos->AI()->SetData(DATA_SUMMON_DEATHS, malygos->AI()->GetData(DATA_SUMMON_DEATHS) + 1);
1304 }
1305
1306private:
1309};
1310
1312{
1314 {
1315 _instance = creature->GetInstanceScript();
1316 }
1317
1318 void Reset() override
1319 {
1320 _events.Reset();
1321 }
1322
1323 void IsSummonedBy(WorldObject* /*summoner*/) override
1324 {
1326 }
1327
1328 void JustEngagedWith(Unit* /*who*/) override
1329 {
1330 }
1331
1332 void AttackStart(Unit* /*target*/) override
1333 {
1334 }
1335
1336 void EnterEvadeMode(EvadeReason /*why*/) override
1337 {
1338 }
1339
1340 void UpdateAI(uint32 diff) override
1341 {
1342 _events.Update(diff);
1343
1344 while (uint32 eventId = _events.ExecuteEvent())
1345 {
1346 switch (eventId)
1347 {
1351 break;
1352 }
1353 }
1354 }
1355
1356 void JustDied(Unit* /*killer*/) override
1357 {
1359 malygos->AI()->SetData(DATA_SUMMON_DEATHS, malygos->AI()->GetData(DATA_SUMMON_DEATHS) + 1);
1360 }
1361
1362private:
1365};
1366
1368{
1370 {
1371 _instance = creature->GetInstanceScript();
1373 }
1374
1375 void IsSummonedBy(WorldObject* summoner) override
1376 {
1377 if (Creature* creature = summoner->ToCreature())
1378 creature->AI()->SetGUID(me->GetGUID(), DATA_LAST_OVERLOAD_GUID);
1379 }
1380
1381 void UpdateAI(uint32 /*diff*/) override
1382 {
1383 }
1384
1385 void DoAction(int32 /*action*/) override
1386 {
1388 {
1389 if (malygos->AI()->GetData(DATA_PHASE) == PHASE_TWO)
1390 me->DespawnOrUnsummon(6s);
1391 // If evade is hit during phase II shields should disappear with no delay
1392 else if (malygos->AI()->GetData(DATA_PHASE) == 0)
1394 }
1395 }
1396
1397 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
1398 {
1399 if (spellInfo->Id == SPELL_ARCANE_BOMB_TRIGGER)
1400 {
1403 }
1404 }
1405
1406private:
1408};
1409
1410// SmartAI does not work correctly for vehicles
1412{
1414 {
1415 }
1416
1417 void IsSummonedBy(WorldObject* summoner) override
1418 {
1419 _summoner.Clear();
1420 if (Player* player = summoner->ToPlayer())
1421 {
1422 _summoner = player->GetGUID();
1424 }
1425 }
1426
1427 void UpdateAI(uint32 diff) override
1428 {
1429 VehicleAI::UpdateAI(diff);
1430 _events.Update(diff);
1431
1432 while (uint32 eventId = _events.ExecuteEvent())
1433 {
1434 switch (eventId)
1435 {
1439 break;
1440 }
1441 }
1442 }
1443
1444 void PassengerBoarded(Unit* /*unit*/, int8 /*seat*/, bool apply) override
1445 {
1446 if (!apply)
1447 {
1448 me->DespawnOrUnsummon(2050ms);
1449 me->SetOrientation(2.5f);
1450 me->SetSpeedRate(MOVE_FLIGHT, 1.0f);
1451 Position pos = me->GetPosition();
1452 pos.m_positionX += 10.0f;
1453 pos.m_positionY += 10.0f;
1454 pos.m_positionZ += 12.0f;
1455 me->GetMotionMaster()->MovePoint(1, pos);
1456 }
1457 }
1458
1459private:
1462};
1463
1464// We shouldn't use SAI for stuff that aren't within boss main mechanic
1465// and SAI type of despawn can cause problems here.
1467{
1468 npc_static_field(Creature* creature) : ScriptedAI(creature)
1469 {
1470 }
1471
1472 void IsSummonedBy(WorldObject* /*summoner*/) override
1473 {
1474 // For some great reason the spell doesn't time it...
1475 me->DespawnOrUnsummon(30s);
1476 }
1477};
1478
1479// 56046 - Portal Beam
1481{
1483
1484 bool Load() override
1485 {
1486 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1487 }
1488
1489 bool Validate(SpellInfo const* /*spell*/) override
1490 {
1492 }
1493
1494 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1495 {
1496 if (Creature* target = GetTarget()->ToCreature())
1497 target->CastSpell(target, SPELL_PORTAL_OPENED);
1498 }
1499
1500 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1501 {
1502 if (Creature* target = GetTarget()->ToCreature())
1503 target->RemoveAura(SPELL_PORTAL_OPENED);
1504 }
1505
1511};
1512
1513// 56047 - Random Portal
1515{
1517
1518 bool Load() override
1519 {
1520 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1521 }
1522
1523 void HandleDummy(SpellEffIndex /*effIndex*/)
1524 {
1525 Creature* malygos = GetCaster()->ToCreature();
1526 if (Creature* target = GetHitCreature())
1527 {
1528 Position pos;
1529 pos.m_positionZ = target->GetPositionZ();
1530 target->GetNearPoint2D(nullptr, pos.m_positionX, pos.m_positionY, frand(29.1f, 30.0f), target->GetAbsoluteAngle(malygos));
1532 }
1533 }
1534
1539};
1540
1542{
1543 public:
1544 IsCreatureVehicleCheck(bool isVehicle) : _isVehicle(isVehicle) { }
1545
1547 {
1548 if (Unit* unit = obj->ToUnit())
1549 if (unit->GetTypeId() == TYPEID_UNIT && unit->GetVehicleKit())
1550 return _isVehicle;
1551
1552 return !_isVehicle;
1553 }
1554
1555 private:
1557};
1558
1559// 57459, 61693, 61694 - Arcane Storm
1561{
1563
1564 bool Load() override
1565 {
1566 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1567 }
1568
1569 bool Validate(SpellInfo const* /*spell*/) override
1570 {
1572 }
1573
1574 void FilterTargets(std::list<WorldObject*>& targets)
1575 {
1576 if (targets.empty())
1577 return;
1578
1579 Creature* malygos = GetCaster()->ToCreature();
1581 {
1582 // Resize list only to objects that are vehicles.
1583 IsCreatureVehicleCheck check(true);
1584 Trinity::Containers::RandomResize(targets, check, (malygos->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL ? 4 : 10));
1585 }
1586 else
1588 }
1589
1590 void HandleVisual(SpellEffIndex /*effIndex*/)
1591 {
1592 // Both missiles should start approx at same time (with SPELL_ARCANE_STORM_EXTRA_VISUAL having advantage - it should lead)
1593 if (!GetHitUnit())
1594 return;
1595
1597 }
1598
1604};
1605
1606// 56105 - Vortex
1608{
1610
1611 bool Load() override
1612 {
1613 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1614 }
1615
1616 void HandleScript(SpellEffIndex /*effIndex*/)
1617 {
1618 Creature* caster = GetCaster()->ToCreature();
1619 // 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,
1620 // the players enter the vehicles casting SPELL_VORTEX_4 or SPELL_VORTEX_5.
1621 if (InstanceScript* instance = caster->GetInstanceScript())
1622 instance->SetData(DATA_VORTEX_HANDLING, 0);
1623
1624 // the rest of the vortex execution continues when SPELL_VORTEX_2 is removed.
1625 }
1626
1631};
1632
1633// 55873 - Vortex
1635{
1637
1638 bool Load() override
1639 {
1640 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1641 }
1642
1643 bool Validate(SpellInfo const* /*spell*/) override
1644 {
1646 }
1647
1648 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1649 {
1650 if (Creature* caster = GetCaster()->ToCreature())
1651 {
1652 for (ThreatReference const* ref : caster->GetThreatManager().GetUnsortedThreatList())
1653 {
1654 if (Player* targetPlayer = ref->GetVictim()->ToPlayer())
1655 {
1656 if (targetPlayer->IsGameMaster())
1657 continue;
1658
1659 if (InstanceScript* instance = caster->GetInstanceScript())
1660 {
1661 // Teleport spell - I'm not sure but might be it must be cast by each vehicle when it's passenger leaves it.
1662 if (Creature* trigger = ObjectAccessor::GetCreature(*caster, instance->GetGuidData(DATA_TRIGGER)))
1663 trigger->CastSpell(targetPlayer, SPELL_VORTEX_6, true);
1664 }
1665 }
1666 }
1667
1668 if (Creature* malygos = caster->ToCreature())
1669 {
1670 malygos->GetMotionMaster()->MoveLand(POINT_LAND_AFTER_VORTEX_P_ONE, MalygosPositions[2]);
1671 malygos->RemoveAura(SPELL_VORTEX_1);
1672 }
1673 }
1674 }
1675
1680};
1681
1683{
1684 public:
1685 ExactDistanceCheck(Unit* source, float dist) : _source(source), _dist(dist) { }
1686
1688 {
1689 return _source->GetExactDist2d(unit) > _dist;
1690 }
1691
1692 private:
1693 Unit* _source;
1694 float _dist;
1695};
1696
1697// 56438 - Arcane Overload
1699{
1701
1702 bool Load() override
1703 {
1704 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1705 }
1706
1707 void ResizeEffectRadiusTargetChecker(std::list<WorldObject*>& targets)
1708 {
1709 Creature* arcaneOverload = GetCaster()->ToCreature();
1710 targets.remove_if(ExactDistanceCheck(arcaneOverload,
1711 GetEffectInfo(EFFECT_0).CalcRadius(arcaneOverload) * arcaneOverload->GetObjectScale()));
1712 }
1713
1718};
1719
1720// 61210 - Align Disk Aggro
1722{
1724
1725 bool Load() override
1726 {
1727 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1728 }
1729
1730 void HandleScript(SpellEffIndex /*effIndex*/)
1731 {
1732 Creature* caster = GetCaster()->ToCreature();
1733 if (Creature* target = GetHitCreature())
1734 target->GetMotionMaster()->MoveChase(caster->GetVictim());
1735 }
1736
1741};
1742
1744{
1745 public:
1746 IsPlayerOnHoverDisk(bool isOnHoverDisk) : _isOnHoverDisk(isOnHoverDisk) { }
1747
1749 {
1750 if (Unit* passenger = obj->ToUnit())
1751 if (passenger->GetVehicleBase() && passenger->GetVehicleBase()->GetEntry() == NPC_HOVER_DISK_MELEE)
1752 return _isOnHoverDisk;
1753
1754 return !_isOnHoverDisk;
1755 }
1756
1757 private:
1759};
1760
1761// 56397 - Arcane Barrage
1763{
1765
1766 bool Load() override
1767 {
1768 return GetCaster()->GetTypeId() == TYPEID_UNIT && GetCaster()->GetInstanceScript() != nullptr;
1769 }
1770
1771 void FilterMeleeHoverDiskPassangers(std::list<WorldObject*>& targets)
1772 {
1773 if (targets.empty())
1774 return;
1775
1776 Creature* caster = GetCaster()->ToCreature();
1777 InstanceScript* instance = caster->GetInstanceScript();
1778 Creature* malygos = ObjectAccessor::GetCreature(*caster, instance->GetGuidData(DATA_MALYGOS));
1779
1780 // If max possible targets are more than 1 then Scions wouldn't select previosly selected target,
1781 // in longer terms this means if spell picks target X then 2nd cast of this spell will pick smth else
1782 // and if 3rd picks X again 4th will pick smth else (by not limiting the cast to certain caster).
1783 if (targets.size() > 1)
1784 if (malygos && !malygos->AI()->GetGUID(DATA_LAST_TARGET_BARRAGE_GUID).IsEmpty())
1785 targets.remove_if(Trinity::ObjectGUIDCheck(malygos->AI()->GetGUID(DATA_LAST_TARGET_BARRAGE_GUID)));
1786
1787 // Remove players not on Hover Disk from second list
1788 std::list<WorldObject*> playersWithoutDisk;
1789 IsPlayerOnHoverDisk check(false);
1790 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
1791 if (check(*itr))
1792 playersWithoutDisk.push_back(*itr);
1793
1794 // if it's empty than we can have player on Hover disk as target.
1795 if (!playersWithoutDisk.empty())
1796 targets = playersWithoutDisk;
1797
1798 // Finally here we remove all targets that have been damaged by Arcane Barrage
1799 // and have 2 seconds long aura still lasting. Used to give healers some time.
1800 if (!targets.empty())
1801 targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_ARCANE_BARRAGE_DAMAGE));
1802
1803 // Now we resize the list to max output targets which can be only 1
1804 // to take it's guid and send/store it to DATA_LAST_TARGET_BARRAGE_GUID.
1805 // Same target is never picked until next pick pass. This doesn't mean
1806 // that it can't be hit more than once. In fact all is chance and raid speed.
1807 if (!targets.empty())
1808 {
1809 if (targets.size() > 1)
1811
1812 if (WorldObject* filteredTarget = targets.front())
1813 if (malygos)
1814 malygos->AI()->SetGUID(filteredTarget->GetGUID(), DATA_LAST_TARGET_BARRAGE_GUID);
1815 }
1816 }
1817
1819 {
1820 if (Player* hitTarget = GetHitPlayer())
1821 hitTarget->CastSpell(hitTarget, SPELL_ARCANE_BARRAGE_DAMAGE, GetCaster()->GetGUID());
1822 }
1823
1829};
1830
1831// 58842 - Destroy Platform Channel
1833{
1835
1836 bool Load() override
1837 {
1838 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1839 }
1840
1841 bool Validate(SpellInfo const* /*spell*/) override
1842 {
1844 }
1845
1846 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1847 {
1848 if (Creature* target = GetTarget()->ToCreature())
1849 if (InstanceScript* instance = target->GetInstanceScript())
1850 if (Creature* platformTrigger = target->GetMap()->GetCreature(instance->GetGuidData(DATA_ALEXSTRASZA_BUNNY_GUID)))
1851 platformTrigger->CastSpell(platformTrigger, SPELL_DESTROY_PLATFORM_BOOM_VISUAL);
1852 }
1853
1858};
1859
1860// 59084 - Destroy Platform Boom Visual
1862{
1864
1865 bool Load() override
1866 {
1867 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1868 }
1869
1870 bool Validate(SpellInfo const* /*spell*/) override
1871 {
1873 }
1874
1875 void HandleDummy(SpellEffIndex /*effIndex*/)
1876 {
1877 if (Creature* target = GetHitCreature())
1878 target->CastSpell(target, SPELL_DESTROY_PLATFORM_EVENT);
1879 }
1880
1885};
1886
1887// 59099 - Destroy Platform Event
1916
1917// 56070 - Summon Red Dragon Buddy
1919{
1921
1922 bool Load() override
1923 {
1924 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1925 }
1926
1928 {
1929 // Adjust effect summon position to lower Z
1930 Position const offset = { 0.0f, 0.0f, -80.0f, 0.0f };
1931 dest.RelocateOffset(offset);
1932 }
1933
1938};
1939
1940// 56072 - Ride Red Dragon Buddy
1961
1962// 60939 - Surge of Power
1964{
1966
1967 bool Load() override
1968 {
1969 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1970 }
1971
1972 bool Validate(SpellInfo const* /*spell*/) override
1973 {
1975 }
1976
1977 void SendThreeTargets(std::list<WorldObject*>& targets)
1978 {
1979 // This spell hits only vehicles (SMSG_SPELL_GO target)
1980 Creature* caster = GetCaster()->ToCreature();
1981 // Remove all objects that aren't* vehicles.
1982 targets.remove_if(IsCreatureVehicleCheck(false));
1983 if (targets.empty())
1984 return;
1985
1986 // But in fact it selects 3 targets (SMSG_SPELL_GO target are not filtered)
1987 std::list<WorldObject*> selectedTargets = targets;
1988
1989 uint8 guidDataSlot = DATA_FIRST_SURGE_TARGET_GUID; // SetGuid in Malygos AI is reserved for 14th, 15th and 16th Id for the three targets
1990 Trinity::Containers::RandomResize(selectedTargets, 3);
1991 for (std::list<WorldObject*>::const_iterator itr = selectedTargets.begin(); itr != selectedTargets.end(); ++itr)
1992 {
1993 Creature* target = (*itr)->ToCreature();
1994 caster->AI()->SetGUID(target->GetGUID(), guidDataSlot++);
1995
1996 if (Vehicle* vehicle = target->GetVehicleKit())
1997 if (Unit* passenger = vehicle->GetPassenger(0))
1998 if (passenger->GetTypeId() == TYPEID_PLAYER)
1999 caster->AI()->Talk(EMOTE_SURGE_OF_POWER_WARNING_P3, passenger);
2000 }
2001 }
2002
2007
2013};
2014
2015// 60936 - Surge of Power
2017{
2019
2020 bool Load() override
2021 {
2022 return GetCaster()->GetTypeId() == TYPEID_UNIT;
2023 }
2024
2025 void FilterTargets(std::list<WorldObject*>& targets)
2026 {
2027 Creature* caster = GetCaster()->ToCreature();
2028
2029 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end();)
2030 {
2031 bool found = false;
2032 WorldObject* target = *itr;
2033
2035 {
2036 if (target->GetGUID() == caster->AI()->GetGUID(guidSlot))
2037 {
2038 found = true;
2039 break;
2040 }
2041 }
2042
2043 if (!found)
2044 targets.erase(itr++);
2045 else
2046 ++itr;
2047 }
2048 }
2049
2054};
2055
2056// 61028 - Alexstrasza's Gift Beam
2058{
2060
2061 bool Load() override
2062 {
2063 return GetCaster()->GetTypeId() == TYPEID_UNIT;
2064 }
2065
2066 bool Validate(SpellInfo const* /*spell*/) override
2067 {
2069 }
2070
2071 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2072 {
2073 if (Creature* target = GetTarget()->ToCreature())
2074 target->CastSpell(target, SPELL_ALEXSTRASZAS_GIFT_BEAM_VISUAL);
2075 }
2076
2077 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2078 {
2079 if (Creature* target = GetTarget()->ToCreature())
2080 target->RemoveAura(SPELL_ALEXSTRASZAS_GIFT_BEAM_VISUAL);
2081 }
2082
2088};
2089
2090// 61023 - Alexstrasza's Gift Visual
2092{
2094
2095public:
2100
2101private:
2102 bool Load() override
2103 {
2104 return GetCaster()->GetTypeId() == TYPEID_UNIT;
2105 }
2106
2107 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2108 {
2109 if (Creature* target = GetTarget()->ToCreature())
2110 {
2111 if (target->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
2113 else if (target->GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)
2115 }
2116 }
2117
2118 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2119 {
2120 if (Creature* target = GetTarget()->ToCreature())
2121 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
2122 {
2124 if (GameObject* heartMagic = target->GetMap()->GetGameObject(instance->GetGuidData(DATA_HEART_OF_MAGIC_GUID)))
2125 {
2126 heartMagic->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
2127 // TO DO: This is hack, core doesn't have support for these flags,
2128 // remove line below if it ever gets supported otherwise object won't be accessible.
2129 heartMagic->RemoveFlag(GO_FLAG_INTERACT_COND);
2130 }
2131 }
2132 }
2133
2139
2141};
2142
2144{
2145 public:
2146 achievement_denyin_the_scion() : AchievementCriteriaScript("achievement_denyin_the_scion") { }
2147
2148 bool OnCheck(Player* source, Unit* /*target*/) override
2149 {
2150 // Only melee disks can be used
2151 if (Unit* disk = source->GetVehicleBase())
2152 if (disk->GetEntry() == NPC_HOVER_DISK_MELEE)
2153 return true;
2154
2155 return false;
2156 }
2157};
2158
2160{
2171
2189
2191}
Actions
@ RAID_DIFFICULTY_10MAN_NORMAL
Definition DBCEnums.h:286
@ RAID_DIFFICULTY_25MAN_NORMAL
Definition DBCEnums.h:287
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition DBCEnums.h:122
uint8_t uint8
Definition Define.h:135
int8_t int8
Definition Define.h:131
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
@ IN_PROGRESS
@ FAIL
@ NOT_STARTED
@ CHASE_MOTION_TYPE
@ POINT_MOTION_TYPE
@ EFFECT_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
@ TYPEID_UNIT
Definition ObjectGuid.h:38
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
Spells
Definition PlayerAI.cpp:32
float frand(float min, float max)
Definition Random.cpp:55
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
SpellEffIndex
@ EFFECT_0
@ EFFECT_2
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SEND_EVENT
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ TARGET_DEST_CASTER_RADIUS
@ TARGET_UNIT_SRC_AREA_ENEMY
@ GO_FLAG_INTERACT_COND
@ GO_FLAG_NOT_SELECTABLE
@ GO_FLAG_DESTROYED
@ FACTION_FRIENDLY
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_DUMMY
@ SPELLVALUE_MAX_TARGETS
#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)
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ MOVE_FLIGHT
@ UNIT_FLAG_UNINTERACTIBLE
@ UNIT_STATE_ROOT
Definition Unit.h:230
@ UNIT_STATE_CASTING
Definition Unit.h:235
DamageEffectType
Definition Unit.h:352
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
InstanceScript *const instance
SummonList summons
EventMap events
@ EVADE_REASON_OTHER
Definition CreatureAI.h:98
void DoZoneInCombat(Creature *creature=nullptr)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:293
void GetRespawnPosition(float &x, float &y, float &z, float *ori=nullptr, float *dist=nullptr) const
void SetReactState(ReactStates st)
Definition Creature.h:119
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetImmuneToAll(bool apply) override
Definition Creature.h:126
CreatureAI * AI() const
Definition Creature.h:154
void Update(uint32 time)
Definition EventMap.h:67
EventId ExecuteEvent()
Definition EventMap.cpp:73
void SetPhase(PhaseIndex phase)
Definition EventMap.cpp:28
void CancelEventGroup(GroupIndex group)
Definition EventMap.cpp:165
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
void Reset()
Definition EventMap.cpp:21
ExactDistanceCheck(Unit *source, float dist)
bool operator()(WorldObject *unit)
void RemoveFlag(GameObjectFlags flags)
Definition GameObject.h:172
virtual bool SetBossState(uint32 id, EncounterState state)
virtual ObjectGuid GetGuidData(uint32 type) const override
EncounterState GetBossState(uint32 id) const
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
IsCreatureVehicleCheck(bool isVehicle)
bool operator()(WorldObject *obj)
IsPlayerOnHoverDisk(bool isOnHoverDisk)
bool operator()(WorldObject *obj)
GameObject * GetGameObject(ObjectGuid const &guid)
Definition Map.cpp:4430
void SetZoneOverrideLight(uint32 zoneId, uint32 areaLightId, uint32 overrideLightId, Milliseconds transitionTime)
Definition Map.cpp:4798
Difficulty GetDifficulty() const
Definition Map.h:412
Creature * GetCreature(ObjectGuid const &guid)
Definition Map.cpp:4397
MovementGeneratorType GetCurrentMovementGeneratorType() const
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MoveTakeoff(uint32 id, Position const &pos, Optional< float > velocity={})
void MoveCirclePath(float x, float y, float z, float radius, bool clockwise, uint8 stepCount)
void MoveFollow(Unit *target, float dist, ChaseAngle angle, MovementSlot slot=MOTION_SLOT_ACTIVE)
void MoveLand(uint32 id, Position const &pos, Optional< float > velocity={})
static ObjectGuid const Empty
Definition ObjectGuid.h:140
bool IsEmpty() const
Definition ObjectGuid.h:172
bool IsVehicle() const
Definition ObjectGuid.h:175
void Clear()
Definition ObjectGuid.h:150
static Creature * ToCreature(Object *o)
Definition Object.h:186
float GetObjectScale() const
Definition Object.h:84
static Unit * ToUnit(Object *o)
Definition Object.h:192
TypeID GetTypeId() const
Definition Object.h:93
void SetFlag(uint16 index, uint32 newFlag)
Definition Object.cpp:760
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
static Player * ToPlayer(Object *o)
Definition Object.h:180
uint32 Id
Definition SpellInfo.h:289
Creature * GetHitCreature() const
Player * GetHitPlayer() const
Unit * GetCaster() const
HookList< HitHandler > AfterHit
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
HookList< HitHandler > OnHit
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
int32 GetEffectValue() 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 DoAction(int32)
Definition UnitAI.h:154
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
virtual void Reset()
Definition UnitAI.h:145
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:166
virtual ObjectGuid GetGUID(int32=0) const
Definition UnitAI.h:158
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:96
virtual void SetGUID(ObjectGuid const &, int32=0)
Definition UnitAI.h:157
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:243
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
float GetHealthPct() const
Definition Unit.h:921
float GetSpeed(UnitMoveType mtype) const
Definition Unit.cpp:8668
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3638
void SetControlled(bool apply, UnitState state)
Definition Unit.cpp:11256
void SetFaction(uint32 faction) override
Definition Unit.h:974
void StopMoving(bool force=false)
Definition Unit.cpp:10312
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition Unit.cpp:3093
Unit * GetVehicleBase() const
Definition Unit.cpp:11826
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13286
void SetFacingToObject(WorldObject const *object, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13259
bool SetCanFly(bool enable, bool packetOnly=false)
Definition Unit.cpp:13374
bool IsAIEnabled() const
Definition Unit.h:798
uint32 GetHealth() const
Definition Unit.h:913
void NearTeleportTo(Position const &pos, bool casting=false)
Definition Unit.cpp:12832
Unit * GetVictim() const
Definition Unit.h:859
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition Unit.cpp:8678
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void RemoveAllAuras()
Definition Unit.cpp:4157
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:954
Vehicle * GetVehicleKit() const
Definition Unit.h:1735
bool AttackStop()
Definition Unit.cpp:5645
bool IsInCombat() const
Definition Unit.h:1144
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:955
bool operator()(ObjectGuid guid)
Map * GetMap() const
Definition Object.h:449
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1087
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition Object.cpp:1992
void setActive(bool isActiveObject)
Definition Object.cpp:991
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition Object.cpp:2015
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2099
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1123
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:56
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool OnCheck(Player *source, Unit *) override
PrepareSpellScript(spell_alexstrasza_bunny_destroy_platform_boom_visual)
PrepareSpellScript(spell_alexstrasza_bunny_destroy_platform_event)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_alexstrasza_gift_beam_visual)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_alexstrasza_gift_beam)
void Register() override
PrepareSpellScript(spell_arcane_overload)
void ResizeEffectRadiusTargetChecker(std::list< WorldObject * > &targets)
void HandleVisual(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_malygos_arcane_storm)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_malygos_destroy_platform_channel)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_malygos_portal_beam)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_malygos_random_portal)
PrepareSpellScript(spell_malygos_surge_of_power_25)
void FilterTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_malygos_surge_of_power_warning_selector_25)
void SendThreeTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_malygos_vortex_dummy)
void HandleScript(SpellEffIndex)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_malygos_vortex_visual)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_nexus_lord_align_disk_aggro)
PrepareSpellScript(spell_scion_of_eternity_arcane_barrage)
void FilterMeleeHoverDiskPassangers(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_wyrmrest_skytalon_ride_red_dragon_buddy_trigger)
PrepareSpellScript(spell_wyrmrest_skytalon_summon_red_dragon_buddy)
@ 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:66
float m_positionZ
Definition Position.h:58
float GetExactDist2d(const float x, const float y) const
Definition Position.h:109
float m_positionX
Definition Position.h:56
float GetPositionZ() const
Definition Position.h:81
float m_positionY
Definition Position.h:57
float GetOrientation() const
Definition Position.h:82
void SetOrientation(float orientation)
Definition Position.h:74
float GetPositionX() const
Definition Position.h:79
void GetPosition(float &x, float &y) const
Definition Position.h:84
float GetPositionY() const
Definition Position.h:80
T const & RAID_MODE(T const &normal10, T const &normal25) const
Difficulty GetDifficulty() const
void RelocateOffset(Position const &offset)
Definition Spell.cpp:110
void UpdateAI(uint32 diff) override
Definition CombatAI.cpp:279
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
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