TrinityCore
npc_arthas.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
19#include "Containers.h"
20#include "GameObject.h"
21#include "InstanceScript.h"
22#include "Log.h"
23#include "Map.h"
24#include "MotionMaster.h"
25#include "MoveSplineInit.h"
26#include "ObjectAccessor.h"
27#include "PassiveAI.h"
28#include "Player.h"
29#include "Random.h"
30#include "ScriptedCreature.h"
31#include "ScriptedGossip.h"
32#include "ScriptMgr.h"
33#include "ScriptSystem.h"
34#include "SmartEnum.h"
35#include "SpellScript.h"
37#include "TemporarySummon.h"
38#include <array>
39#include <unordered_map>
40#include <vector>
41
43{
45 NPC_UTHER = 26528,
46 NPC_JAINA = 26497,
47 NPC_CITIZEN = 28167,
48 NPC_RESIDENT = 28169,
49 NPC_FOOTMAN = 27745,
50 NPC_KNIGHT = 27746,
51 NPC_PRIEST = 27747,
61 NPC_EPOCH = 26532,
62 NPC_MALGANIS = 26533,
64
75 GO_CHEST_HEROIC = 193597
76};
77
79{
80 // RP1: Arthas/Jaina/Uther, outside Stratholme gates
81 RP1_CHAIN_ARTHAS1 = 1, // Initial movement
82 RP1_CHAIN_UTHER1 = 1, // Initial movement
83 RP1_CHAIN_JAINA1 = 1, // Initial movement
84 RP1_CHAIN_ARTHAS2 = 2, // Arthas moves up the hill to look out over Stratholme
85 RP1_CHAIN_UTHER2 = 2, // Uther follows
86 RP1_CHAIN_JAINA2 = 2, // Jaina follows
87 RP1_CHAIN_UTHER3 = 3, // Uther leaves
88 RP1_CHAIN_JAINA3 = 3, // Jaina turns to leave, but is stopped by Arthas
89 RP1_CHAIN_JAINA4 = 4, // Jaina leaves for real
90 RP1_CHAIN_ARTHAS3 = 3, // Arthas moves down the hill to the bridge
91 RP1_CHAIN_ARTHAS4 = 4, // Arthas moves to the Stratholme entrance
92
93 // RP2: Arthas/Mal'ganis, at Stratholme gates
94 RP2_CHAIN_ARTHAS1 = 5, // Arthas enters Stratholme proper
95 RP2_CHAIN_CITIZEN1 = 1, // A Stratholme citizen greets Arthas
96 RP2_CHAIN_ARTHAS2 = 6, // Arthas advances towards the approaching citizen
97 RP2_CHAIN_ARTHAS3 = 7, // Arthas moves on to a nearby resident
98
99 // RP3: Arthas/Infinites, in Stratholme Town Hall
100 RP3_CHAIN_ARTHAS1 = 91, // Arthas enters Stratholme Town Hall
101 RP3_CHAIN_ARTHAS2 = 92, // Arthas approaches one of the disguised Infinites
102 RP3_CHAIN_ARTHAS3 = 95, // Arthas proceeds up the stairs
103 RP3_CHAIN_ARTHAS3_2 = 96, // Arthas encounters more Infinite resistance
104 RP3_CHAIN_ARTHAS4 = 97, // Arthas presses onward into a hallway
105 RP3_CHAIN_ARTHAS5 = 98, // Arthas advances into the boss room
106 RP3_CHAIN_EPOCH = 1, // Chrono-Lord Epoch advances out of the portal
107
108 // Spawn motions (all on 27742, infinite adversary)
121
122 // RP4: Arthas moving towards Gauntlet
123 RP4_CHAIN_ARTHAS1 = 101, // Arthas moves up to the bookcase
124 RP4_CHAIN_ARTHAS2 = 128, // Arthas advances to the start of the Gauntlet section
125 RP4_CHAIN_GAUNTLET1 = 1024, // Arthas charges to the halfway point of the Gauntlet
126 RP4_CHAIN_GAUNTLET2 = 1025, // Arthas continues to Market Row
127
128 // RP5: Arthas advances on Crusader Square and faces off against Mal'ganis
129 RP5_CHAIN_ARTHAS1 = 121, // Arthas moves into Crusader Square
130 RP5_CHAIN_ARTHAS2 = 124, // After Mal'ganis' defeat, Arthas attempts to chase him down
131 RP5_CHAIN_ARTHAS3 = 125, // Arthas departs...
132 RP5_CHAIN_ARTHAS4 = 127 // ...and then finally despawns
134
136{
145
149
156
161
166
168{
177
179{
182
184{
215
244
246
285
290
298
314
316{
317 RP1_LINE_ARTHAS1 = 0, // Glad you could make it, Uther.
318 RP1_LINE_UTHER1 = 0, // Watch your tone with me, boy. You may be the prince, but I'm still your superior as a paladin!
319 RP1_LINE_ARTHAS2 = 1, // As if I could forget. Listen, Uther, there's something about the plague you should know...
320 RP1_LINE_ARTHAS3 = 2, // Oh, no. We're too late. These people have all been infected! They may look fine now, but it's just a matter of time before they turn into the undead!
321 RP1_LINE_UTHER2 = 1, // What?
322 RP1_LINE_ARTHAS4 = 3, // This entire city must be purged.
323 RP1_LINE_UTHER3 = 2, // How can you even consider that? There's got to be some other way.
324 RP1_LINE_ARTHAS5 = 4, // Damn it, Uther! As your future king, I order you to purge this city!
325 RP1_LINE_UTHER4 = 3, // You are not my king yet, boy! Nor would I obey that command even if you were!
326 RP1_LINE_ARTHAS6 = 5, // Then I must consider this an act of treason.
327 RP1_LINE_UTHER5 = 4, // Treason? Have you lost your mind, Arthas?
328 RP1_LINE_ARTHAS7 = 6, // Have I? Lord Uther, by my right of succession and the sovereignty of my crown, I hereby relieve you of your command and suspend your paladins from service.
329 RP1_LINE_JAINA1 = 0, // Arthas! You can't just--
330 RP1_LINE_ARTHAS8 = 7, // It's done! Those of you who have the will to save this land, follow me! The rest of you... get out of my sight!
331 RP1_LINE_UTHER6 = 5, // You've just crossed a terrible threshold, Arthas.
332 RP1_LINE_ARTHAS9 = 8, // Jaina?
333 RP1_LINE_JAINA2 = 1, // I'm sorry, Arthas. I can't watch you do this.
334 RP1_LINE_ARTHAS10 = 9, // Take position here, and I will lead a small force inside Stratholme to begin the culling. We must contain and purge the infected for the sake of all of Lordaeron!
335 RP1_LINE_ARTHAS11 = 40 // All officers should check in with me when their squads are ready. We'll enter Stratholme on my order.
337
339{
340 RP2_LINE_ARTHAS1 = 10, // Everyone looks ready. Remember, these people are all infected with the plague and will die soon. We must purge Stratholme to protect the remainder of Lordaeron from the Scourge. Let's go.
341 RP2_LINE_CITIZEN1 = 0, // Prince Arthas, may the light be praised! Many people in the town have begun to fall seriously ill, can you help us?
342 RP2_LINE_ARTHAS2 = 11, // I can only help you with a clean death.
343 RP2_LINE_CITIZEN2 = 1, // What? This can't be!
344 RP2_LINE_RESIDENT1 = 0, // Oh, no...
345 RP2_LINE_ARTHAS3 = 12, // That was just the beginning.
346 RP2_LINE_MALGANIS1 = 0, // Yes, this is the beginning. I've been waiting for you, young prince. I am Mal'Ganis.
347 RP2_LINE_MALGANIS2 = 1, // As you can see, your people are now mine. I will now turn this city household by household, until the flame of life has been snuffed out... forever.
348 RP2_LINE_ARTHAS4 = 13, // I won't allow it, Mal'Ganis! Better that these people die by my hand than serve as your slaves in death!
349 RP2_LINE_ARTHAS5 = 14 // Mal'Ganis will send out some of his Scourge minions to interfere with us. Those of you with the strongest steel and magic shall go forth and destroy them. I will lead the rest of my forces in purging Stratholme of the infected.
351
353{
354 RP3_LINE_ARTHAS1 = 16, // Follow me, I know the way through.
355 RP3_LINE_CITIZEN1 = 0, // Ah, you've finally arrived Prince Arthas. You're here just in the nick of time.
356 RP3_LINE_ARTHAS2 = 17, // Yes, I'm glad I could get to you before the plague.
357 RP3_LINE_ARTHAS3 = 18, // What is this sorcery?
358 RP3_LINE_CITIZEN2 = 1, // There's no need for you to understand, Arthas. All you need to do is die.
359 RP3_LINE_ARTHAS4 = 19, // Mal'Ganis appears to have more than Scourge in his arsenal. We should make haste.
360
361 RP3_LINE_ARTHAS10 = 20, // More vile sorcery! Be ready for anything!
362 RP3_LINE_ARTHAS11 = 21, // Let's move on.
363
364 RP3_LINE_ARTHAS20 = 22, // Watch your backs: they have us surrounded in this hall.
365 RP3_LINE_ARTHAS21 = 24, // Mal'ganis is not making this easy.
366
367 RP3_LINE_ARTHAS30 = 25, // They're very persistent.
368 RP3_LINE_ARTHAS31 = 26, // What else can he put in my way?
369 RP3_LINE_EPOCH1 = 0, // Prince Arthas Menethil, on this day, a powerful darkness has taken hold of your soul. The death you are destined to visit upon others will this day be your own.
370 RP3_LINE_ARTHAS32 = 27, // I do what I must for Lordaeron, and neither your words nor your actions will stop me.
371 RP3_LINE_EPOCH2 = 1 // We'll see about that, young prince.
373
375{
376 RP4_LINE_ARTHAS1 = 28, // The quickest path to Mal'Ganis lies behind that bookshelf ahead.
377 RP4_LINE_ARTHAS2 = 29, // This will only take a moment.
378 RP4_LINE_ARTHAS3 = 30, // I'm relieved this secret passage still works.
379
380 RP4_LINE_ARTHAS10 = 31, // Let's move through here as quickly as possible. If the undead don't kill us, the fires might.
381 RP4_LINE_ARTHAS11 = 32, // Rest a moment and clear your lungs, but we must move again soon.
382 RP4_LINE_ARTHAS12 = 33, // That's enough; we must move again. Mal'Ganis awaits.
383 RP4_LINE_ARTHAS13 = 34 // At last some good luck. Market Row has not caught fire yet. Mal'Ganis is supposed to be in Crusaders' Square, which is just ahead. Tell me when you're ready to move forward.
385
387{
388 RP5_LINE_ARTHAS1 = 35, // Justice will be done.
389 RP5_LINE_ARTHAS2 = 36, // We're going to finish this right now, Mal'Ganis. Just you... and me.
390 RP5_LINE_MALGANIS1 = 2, // This will be a fine test, Prince Arthas.
391 RP5_LINE_MALGANIS12 = 10, // Your journey has just begun, young prince. Gather your forces and meet me in the arctic land of Northrend. It is there that we shall settle the score between us. It is there that your true destiny will unfold.
392 RP5_LINE_ARTHAS10 = 37, // I'll hunt you to the ends of the earth if I have to! Do you hear me? To the ends of the earth!
393 RP5_LINE_ARTHAS11 = 38, // You performed well this day. Anything that Mal'Ganis has left behind is yours. Take it as your reward. I must now begin plans for an expedition to Northrend.
394 RP5_LINE_CHROMIE0 = 0 // Why, hello again!
396
398{
399 // Arthas/Uther RP
403
404 // Arthas/Mal'ganis RP
414
415 // Town Hall
437
440
444
445 // Array element count
447};
448
450{
454
455// @todo sniff
456// All kinds of positions Arthas needs for RP events (there are a lot of these)
457static std::array<Position, NUM_POSITIONS> const ArthasPositions =
458{
459 {
460 { 1983.857f, 1287.043f, 145.5596f, 3.0892330f }, // RP1_ARTHAS_INITIAL
461 { 1783.843f, 1267.481f, 139.7800f, 0.2698664f }, // RP1_UTHER_SPAWN
462 { 1876.788f, 1305.723f, 146.2474f, 6.0737460f }, // RP1_JAINA_SPAWN
463
464 { 2047.948f, 1287.598f, 142.8568f, 3.176499f }, // ARTHAS_PURGE_PENDING_POS
465 { 2091.994f, 1277.257f, 140.4707f, 1.134464f }, // ARTHAS_WAVES_POS // @todo
466 { 2074.624f, 1282.958f, 141.6344f }, // RP2_PRIEST1_POS
467 { 2074.805f, 1292.172f, 141.6728f }, // RP2_PRIEST2_POS
468 { 2077.590f, 1284.609f, 141.5710f }, // RP2_FOOT1_POS
469 { 2078.365f, 1281.254f, 141.5182f }, // RP2_FOOT2_POS
470 { 2077.737f, 1290.441f, 141.5698f }, // RP2_FOOT3_POS
471 { 2078.055f, 1293.624f, 141.5544f }, // RP2_FOOT4_POS
472 { 2113.454f, 1287.986f, 136.3829f, 3.071779f }, // RP2_MALGANIS_POS
473
474 { 2366.240f, 1195.253f, 132.0441f, 3.159046f }, // ARTHAS_TOWN_HALL_POS
475 { 2433.154f, 1192.572f, 148.1547f, 5.542059f }, // RP3_SPAWN1_LOC1
476 { 2432.990f, 1192.760f, 148.1474f, 1.026526f }, // RP3_SPAWN1_LOC2
477 { 2432.824f, 1191.816f, 148.1556f, 4.927707f }, // RP3_SPAWN1_LOC3
478 { 2432.711f, 1192.857f, 148.1550f, 6.257423f }, // RP3_SPAWN1_LOC4
479 { 2433.357f, 1192.168f, 148.1593f, 3.001966f }, // RP3_SPAWN1_RIFT_SPAWN
480 { 2414.349f, 1136.075f, 148.1592f, 1.345922f }, // RP3_SPAWN2_LOC1
481 { 2403.961f, 1180.299f, 148.1587f, 5.139339f }, // RP3_SPAWN2_LOC2
482 { 2414.671f, 1136.262f, 148.1592f, 2.305776f }, // RP3_SPAWN2_LOC3
483 { 2403.908f, 1179.994f, 148.1586f, 4.654133f }, // RP3_SPAWN2_LOC4
484 { 2404.311f, 1178.306f, 148.1585f, 1.605703f }, // RP3_SPAWN2_RIFT1
485 { 2414.041f, 1136.068f, 148.1593f, 2.234021f }, // RP3_SPAWN2_RIFT2
486 { 2429.026f, 1102.693f, 148.1499f, 1.952652f }, // RP3_SPAWN3_LOC1
487 { 2441.173f, 1115.225f, 148.1264f, 2.302970f }, // RP3_SPAWN3_LOC2
488 { 2430.645f, 1104.685f, 148.1306f, 1.135255f }, // RP3_SPAWN3_LOC3
489 { 2439.649f, 1113.719f, 148.1298f, 3.111888f }, // RP3_SPAWN3_LOC4
490 { 2429.296f, 1102.007f, 148.1593f, 6.213372f }, // RP3_SPAWN3_RIFT1
491 { 2440.057f, 1114.226f, 148.1593f, 6.108652f }, // RP3_SPAWN3_RIFT2
492 { 2457.008f, 1113.929f, 150.0776f, 3.272437f }, // RP3_EPOCH_SPAWN
493 { 2456.058f, 1113.838f, 150.0917f, 1.745329f }, // RP3_EPOCH_RIFT
494 { 2425.898f, 1118.842f, 148.0759f, 6.073746f }, // ARTHAS_TOWN_HALL_END_POS
495
496 { 2534.988f, 1126.163f, 130.8621f, 2.844887f }, // ARTHAS_GAUNTLET_POS
497 { 2363.440f, 1404.906f, 128.7869f, 2.775074f }, // ARTHAS_GAUNTLET_END_POS
498
499 { 2296.862f, 1501.015f, 128.4456f, 5.131268f }, // RP5_MALGANIS_POS
500 { 2301.055f, 1478.977f, 128.1299f, 1.758816f }, // ARTHAS_FINAL_POS
501 { 2319.560f, 1506.408f, 152.0474f }, // RP5_CHROMIE_SPAWN
502 }
503};
504
507{
508 { 2320.632f, 1507.193f, 152.5081f },
509 { 2319.823f, 1506.605f, 152.5081f },
510 { 2306.770f, 1496.780f, 128.3620f }
511};
512
513static float const ArthasSnapbackDistanceThreshold = 5.0f; // how far we can be from where we're supposed at start of phase to be before we snap back
514
516{
518 bool const HasGossip;
520};
521
522// Positions Arthas should be at when starting a given phase
523static std::unordered_map<uint32, SnapbackInfo> const ArthasSnapbackPositions =
524{
542};
543
545{
546public:
547 npc_arthas_stratholme() : CreatureScript("npc_arthas_stratholme") { }
548
550 {
551 npc_arthas_stratholmeAI(Creature* creature) : ScriptedAI(creature), instance(creature->GetInstanceScript()), _exorcismCooldown(urandms(7, 14)), _progressRP(true), _afterCombat(ACTION_NONE) { }
552
554 {
556 }
557
559 {
560 TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::AdvanceToState: advancing to 0x{:X}", newState);
561 if (!_progressRP)
562 {
563 TC_LOG_WARN("scripts.cos", "npc_arthas_stratholmeAI::AdvanceToState: advancing to instance state 0x{:X}, but RP is paused. Overriding!", newState);
564 _progressRP = true;
565 }
566
567 auto itr = ArthasSnapbackPositions.find(newState);
568 if (itr != ArthasSnapbackPositions.end())
569 {
570 SnapbackInfo const& target = itr->second;
571
572 // Adjust react state and npc flags based on current state
573 me->SetReactState(target.ReactState);
574 if (target.ReactState == REACT_PASSIVE)
575 me->SetImmuneToAll(true, false);
576 else
577 me->SetImmuneToAll(false);
578
579 // Adjust gossip flag based on whether we have a gossip menu or not
580 if (target.HasGossip)
582 else
584
585 TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::AdvanceToState: has snapback for this state, distance = {}", target.SnapbackPosition->GetExactDist(me));
586 // Snapback handling - if we're too far from where we're supposed to be, teleport there
589 }
590
591 switch (newState)
592 {
593 case WAVES_DONE:
595 break;
596 case UTHER_TALK:
598 {
599 uther->setActive(true);
600 uther->GetMotionMaster()->MoveAlongSplineChain(RP1_POINTID_UTHER1, RP1_CHAIN_UTHER1, false);
601 }
603 {
604 jaina->setActive(true);
605 jaina->GetMotionMaster()->MoveAlongSplineChain(0, RP1_CHAIN_JAINA1, true);
606 }
608 break;
611 break;
612 case COMPLETE:
613 if (events.Empty())
614 {
615 // This must be instance loading into COMPLETE state, spawn chromie
619 me->SetVisible(false);
620 }
621 break;
622 default:
623 break;
624 }
625 }
626
627 // Will happen immediately (if OOC) or on reached home (if IC)
629 {
630 if (_progressRP)
631 DoAction(action);
632 else
633 _afterCombat = action;
634 }
635
636 void DoAction(int32 action) override
637 {
638 switch (action)
639 {
642 break;
646 break;
650 break;
654 break;
663 break;
666 break;
669 break;
670 default:
671 break;
672 }
673 }
674
675 void SetGUID(ObjectGuid const& guid, int32 type) override
676 {
677 _eventStarterGuid = guid;
678
680 switch (type)
681 {
683 Talk(RP2_LINE_ARTHAS1, talkTarget);
685 break;
687 Talk(RP3_LINE_ARTHAS1, talkTarget);
689 break;
691 Talk(RP4_LINE_ARTHAS1, talkTarget);
693 break;
695 Talk(RP4_LINE_ARTHAS10, talkTarget);
697 break;
699 Talk(RP5_LINE_ARTHAS1, talkTarget);
702 break;
703 default:
704 break;
705 }
706 }
707
708 void MovementInform(uint32 type, uint32 id) override
709 {
710 if (!_progressRP)
711 return;
712 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE && type != SPLINE_CHAIN_MOTION_TYPE)
713 return;
714 switch (id)
715 {
722 break;
725 break;
728 break;
750 break;
752 if (Creature* uther = me->FindNearestCreature(NPC_UTHER, 500.0f, true))
753 uther->DespawnOrUnsummon();
754 break;
756 if (Creature* jaina = me->FindNearestCreature(NPC_JAINA, 500.0f, true))
757 jaina->DespawnOrUnsummon();
758 break;
762 break;
765 break;
767 if (Creature* citizen = me->FindNearestCreature(NPC_CITIZEN, 100.0f, true))
768 citizen->SetFacingToObject(me);
769 if (Creature* resident = me->FindNearestCreature(NPC_RESIDENT, 100.0f, true))
770 resident->SetFacingToObject(me);
774 break;
779 break;
802 break;
804 {
805 std::list<Creature*> infinites;
807 for (Creature* infinite : infinites)
808 infinite->SetFacingToObject(me);
813 break;
814 }
824 break;
830 break;
837 break;
843 break;
846 events.ScheduleEvent(RP4_EVENT_HIDDEN_PASSAGE, 4s); // @todo sniff timer
848 break;
851 break;
857 break;
861 break;
865 break;
868 break;
871 break;
872 default:
873 break;
874 }
875 }
876
877 bool CanAIAttack(Unit const* who) const override
878 {
880 {
881 Position const& relativePos = me->IsEngaged() ? me->GetHomePosition() : me->GetPosition();
882 // Don't let us chase too far from home
883 if (relativePos.GetExactDist2d(who) > 30.0f)
884 return false;
885 }
886 return ScriptedAI::CanAIAttack(who);
887 }
888
890 {
892 return;
893
894 if (!UpdateVictim())
895 return;
896
897 if (HealthBelowPct(40))
899 if (_exorcismCooldown <= diff)
900 {
903 else if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
904 {
905 DoCast(target, SPELL_EXORCISM);
906 _exorcismCooldown = urandms(7, 14);
907 }
908 }
909 else
910 _exorcismCooldown -= diff;
911 }
912
913 void UpdateAI(uint32 diff) override
914 {
915 if (me->IsEngaged())
916 {
917 UpdateAICombat(diff);
918 return;
919 }
920
921 // EventMap is only used for RP handling. RP events are paused while in combat or leashing back to resume pos
922 if (!_progressRP)
923 return;
924
925 events.Update(diff);
926 while (uint32 event = events.ExecuteEvent())
927 {
928 uint32 talkerEntry = UINT_MAX, talkerLine = 0;
929 switch (event)
930 {
931 case RP1_EVENT_START1:
932 if (Creature* jaina = me->FindNearestCreature(NPC_JAINA, 100.0f, true))
933 jaina->SetFacingToObject(me);
934 break;
935 case RP1_EVENT_START2:
936 if (Creature* uther = me->FindNearestCreature(NPC_UTHER, 100.0f, true))
937 {
938 uther->SetFacingToObject(me);
939 me->SetFacingToObject(uther);
940 }
941 break;
943 talkerEntry = 0, talkerLine = RP1_LINE_ARTHAS1;
944 break;
945 case RP1_EVENT_UTHER1:
946 talkerEntry = NPC_UTHER, talkerLine = RP1_LINE_UTHER1;
947 break;
949 talkerEntry = 0, talkerLine = RP1_LINE_ARTHAS2;
951 if (Creature* uther = me->FindNearestCreature(NPC_UTHER, 100.0f, true))
952 uther->GetMotionMaster()->MoveAlongSplineChain(RP1_POINTID_UTHER2, RP1_CHAIN_UTHER2, true);
953 if (Creature* jaina = me->FindNearestCreature(NPC_JAINA, 100.0f, true))
954 jaina->GetMotionMaster()->MoveAlongSplineChain(RP1_POINTID_JAINA2, RP1_CHAIN_JAINA2, true);
955 break;
957 if (Creature* uther = me->FindNearestCreature(NPC_UTHER, 100.0f, true))
958 uther->SetFacingToObject(me);
959 break;
961 if (Creature* jaina = me->FindNearestCreature(NPC_JAINA, 100.0f, true))
962 jaina->SetFacingToObject(me);
963 break;
965 {
966 me->SetFacingTo(6.248279f); // @todo migrate
967 talkerEntry = 0, talkerLine = RP1_LINE_ARTHAS3;
968 std::list<Creature*> troops;
973 for (Creature* unit : troops)
974 if (unit->IsAlive())
975 unit->SetFacingToObject(me);
976 break;
977 }
978 case RP1_EVENT_UTHER2:
979 talkerEntry = NPC_UTHER, talkerLine = RP1_LINE_UTHER2;
980 break;
982 talkerEntry = 0, talkerLine = RP1_LINE_ARTHAS4;
983 break;
984 case RP1_EVENT_UTHER3:
985 talkerEntry = NPC_UTHER, talkerLine = RP1_LINE_UTHER3;
986 break;
988 if (Creature* uther = me->FindNearestCreature(NPC_UTHER, 100.0f, true))
989 me->SetFacingToObject(uther);
990 break;
992 talkerEntry = 0, talkerLine = RP1_LINE_ARTHAS5;
993 break;
994 case RP1_EVENT_UTHER4:
995 talkerEntry = NPC_UTHER, talkerLine = RP1_LINE_UTHER4;
996 break;
998 talkerEntry = 0, talkerLine = RP1_LINE_ARTHAS6;
999 break;
1000 case RP1_EVENT_UTHER5:
1001 talkerEntry = NPC_UTHER, talkerLine = RP1_LINE_UTHER5;
1002 break;
1003 case RP1_EVENT_ARTHAS7:
1004 talkerEntry = 0, talkerLine = RP1_LINE_ARTHAS7;
1005 break;
1006 case RP1_EVENT_JAINA1:
1007 talkerEntry = NPC_JAINA, talkerLine = RP1_LINE_JAINA1;
1008 break;
1009 case RP1_EVENT_ARTHAS8:
1010 talkerEntry = 0, talkerLine = RP1_LINE_ARTHAS8;
1011 break;
1014 break;
1015 case RP1_EVENT_UTHER6:
1016 talkerEntry = NPC_UTHER, talkerLine = RP1_LINE_UTHER6;
1017 break;
1019 if (Creature* uther = me->FindNearestCreature(NPC_UTHER, 100.0f, true))
1020 uther->GetMotionMaster()->MoveAlongSplineChain(RP1_POINTID_UTHER3, RP1_CHAIN_UTHER3, true);
1021 break;
1023 if (Creature* jaina = me->FindNearestCreature(NPC_JAINA, 100.0f, true))
1024 jaina->GetMotionMaster()->MoveAlongSplineChain(0, RP1_CHAIN_JAINA3, true);
1025 break;
1026 case RP1_EVENT_ARTHAS9:
1027 talkerEntry = 0, talkerLine = RP1_LINE_ARTHAS9;
1028 if (Creature* jaina = me->FindNearestCreature(NPC_JAINA, 100.0f, true))
1029 me->SetFacingToObject(jaina);
1030 break;
1031 case RP1_EVENT_JAINA2:
1032 talkerEntry = NPC_JAINA, talkerLine = RP1_LINE_JAINA2;
1033 break;
1035 if (Creature* jaina = me->FindNearestCreature(NPC_JAINA, 100.0f, true))
1036 jaina->GetMotionMaster()->MoveAlongSplineChain(RP1_POINTID_JAINA4, RP1_CHAIN_JAINA4, true);
1037 break;
1040 break;
1041 case RP1_EVENT_ARTHAS10:
1042 talkerEntry = 0, talkerLine = RP1_LINE_ARTHAS10;
1043 me->SetFacingTo(3.141593f); // @todo migrate
1044 break;
1047 break;
1048 case RP1_EVENT_FINISHED:
1049 talkerEntry = 0, talkerLine = RP1_LINE_ARTHAS11;
1052 break;
1055 break;
1056 case RP2_EVENT_CITIZEN1:
1057 if (Creature* citizen = me->FindNearestCreature(NPC_CITIZEN, 100.0f, true))
1058 {
1059 citizen->GetMotionMaster()->MoveAlongSplineChain(0, RP2_CHAIN_CITIZEN1, true);
1061 }
1062 break;
1063 case RP2_EVENT_ARTHAS2:
1064 talkerEntry = 0, talkerLine = RP2_LINE_ARTHAS2;
1065 break;
1068 break;
1069 case RP2_EVENT_CITIZEN2:
1070 talkerEntry = NPC_CITIZEN, talkerLine = RP2_LINE_CITIZEN2;
1071 break;
1072 case RP2_EVENT_KILL1:
1073 if (Creature* citizen = me->FindNearestCreature(NPC_CITIZEN, 100.0f, true))
1075 if (Creature* resident = me->FindNearestCreature(NPC_RESIDENT, 100.0f, true))
1076 {
1077 resident->SetEmoteState(EMOTE_STATE_COWER);
1079 }
1080 break;
1083 break;
1084 case RP2_EVENT_KILL2:
1085 if (Creature* resident = me->FindNearestCreature(NPC_RESIDENT, 100.0f, true))
1087 break;
1088 case RP2_EVENT_REACT1:
1089 case RP2_EVENT_REACT2:
1090 case RP2_EVENT_REACT3:
1091 case RP2_EVENT_REACT4:
1092 case RP2_EVENT_REACT5:
1093 {
1094 std::list<Creature*> nearbyVictims;
1095 me->GetCreatureListWithEntryInGrid(nearbyVictims, urand(0, 1) ? NPC_CITIZEN : NPC_RESIDENT, 60.0f);
1096 if (!nearbyVictims.empty())
1097 {
1098 Emote emotes[] =
1099 {
1104 };
1105
1107 if (victim->IsAlive())
1109 }
1110 break;
1111 }
1113 me->SetFacingTo(2.234021f); // @todo
1114 break;
1115 case RP2_EVENT_ARTHAS3:
1116 talkerEntry = 0, talkerLine = RP2_LINE_ARTHAS3;
1117 break;
1119 if (Creature* bunny = me->FindNearestCreature(NPC_MALGANIS_BUNNY, 80.0f, true))
1120 bunny->CastSpell(bunny, SPELL_SHADOWSTEP_VISUAL);
1121
1123 {
1124 malganis->CastSpell(malganis, SPELL_SHADOWSTEP_VISUAL);
1125 malganis->AI()->Talk(RP2_LINE_MALGANIS1);
1126 }
1127 break;
1129 if (Creature* malganis = me->FindNearestCreature(NPC_MALGANIS, 80.0f, true))
1130 {
1131 std::list<Creature*> troops;
1134 for (Creature* unit : troops)
1135 if (unit->IsAlive())
1136 unit->SetFacingToObject(malganis);
1137 }
1138 break;
1140 if (Creature* malganis = me->FindNearestCreature(NPC_MALGANIS, 80.0f, true))
1141 me->SetFacingToObject(malganis);
1142 break;
1144 talkerEntry = NPC_MALGANIS, talkerLine = RP2_LINE_MALGANIS2;
1145 break;
1147 if (Creature* malganis = me->FindNearestCreature(NPC_MALGANIS, 80.0f, true))
1148 malganis->CastSpell(malganis, SPELL_SHADOWSTEP_VISUAL);
1149 break;
1151 if (Creature* malganis = me->FindNearestCreature(NPC_MALGANIS, 80.0f, true))
1152 malganis->DespawnOrUnsummon();
1153 if (Creature* bunny = me->FindNearestCreature(NPC_MALGANIS_BUNNY, 80.0f, true))
1154 bunny->CastSpell(bunny, SPELL_SHADOWSTEP_VISUAL);
1155 break;
1156 case RP2_EVENT_ARTHAS4:
1157 talkerEntry = 0, talkerLine = RP2_LINE_ARTHAS4;
1158 break;
1161 break;
1162 case RP2_EVENT_ARTHAS5:
1163 talkerEntry = 0, talkerLine = RP2_LINE_ARTHAS5;
1164 break;
1168 break;
1171 break;
1175 break;
1177 if (Creature* infinite = me->FindNearestCreature(NPC_RESIDENT_INFINITE, 100.0f, true))
1178 infinite->SetFacingToObject(me);
1179 break;
1181 me->SetFacingTo(0.541052f); // @todo
1182 break;
1183 case RP3_EVENT_CITIZEN1:
1184 talkerEntry = NPC_CITIZEN_INFINITE, talkerLine = RP3_LINE_CITIZEN1;
1185 break;
1186 case RP3_EVENT_ARTHAS2:
1187 talkerEntry = 0, talkerLine = RP3_LINE_ARTHAS2;
1189 break;
1191 if (Creature* citizen = me->FindNearestCreature(NPC_CITIZEN_INFINITE, 100.0f, true))
1192 DoCast(citizen, SPELL_CRUSADER_STRIKE);
1193 break;
1195 if (Creature* citizen = me->FindNearestCreature(NPC_CITIZEN_INFINITE, 100.0f, true))
1196 citizen->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
1197 break;
1198 case RP3_EVENT_ARTHAS3:
1199 talkerEntry = 0, talkerLine = RP3_LINE_ARTHAS3;
1200 break;
1201 case RP3_EVENT_CITIZEN2:
1202 talkerEntry = NPC_CITIZEN_INFINITE, talkerLine = RP3_LINE_CITIZEN2;
1203 break;
1206 if (Creature* citizen = me->FindNearestCreature(NPC_CITIZEN_INFINITE, 100.0f, true))
1207 {
1208 citizen->CastSpell(citizen, SPELL_TRANSFORM_VISUAL);
1209 citizen->UpdateEntry(NPC_INFINITE_HUNTER);
1210 }
1211 break;
1213 if (Creature* resident = me->FindNearestCreature(NPC_RESIDENT_INFINITE, 100.0f, true))
1214 {
1215 resident->CastSpell(resident, SPELL_TRANSFORM_VISUAL);
1216 resident->UpdateEntry(NPC_INFINITE_AGENT);
1217 }
1218 break;
1219 case RP3_EVENT_AGGRO:
1222 break;
1223 case RP3_EVENT_ARTHAS4:
1224 talkerEntry = 0, talkerLine = RP3_LINE_ARTHAS4;
1225 break;
1228 break;
1230 talkerEntry = 0, talkerLine = RP3_LINE_ARTHAS10;
1232 break;
1233 case RP3_EVENT_SPAWN1:
1234 {
1235 uint8 extra = urand(0, 2); // 0 = extra adversary, 1 = extra hunter, 2 = extra agent
1245 rift->DespawnOrUnsummon(Seconds(4));
1246 break;
1247 }
1251 {
1252 std::list<Creature*> infinites;
1256 for (Creature* target : infinites)
1257 if (target->IsAlive())
1258 target->SetFacingToObject(me);
1259 break;
1260 }
1264 break;
1265 case RP3_EVENT_ARTHAS11:
1266 talkerEntry = 0, talkerLine = RP3_LINE_ARTHAS11;
1267 break;
1270 break;
1271 case RP3_EVENT_ARTHAS20:
1272 talkerEntry = 0, talkerLine = RP3_LINE_ARTHAS20;
1273 break;
1274 case RP3_EVENT_SPAWN2:
1275 {
1276 uint8 extra = urand(0, 2); // 0 = extra adversary, 1 = extra hunter, 2 = extra agent
1286 rift1->DespawnOrUnsummon(Seconds(5));
1288 rift2->DespawnOrUnsummon(Seconds(5));
1289 break;
1290 }
1292 me->SetFacingTo(1.762783f); // @todo
1293 break;
1297 break;
1298 case RP3_EVENT_ARTHAS21:
1299 talkerEntry = 0, talkerLine = RP3_LINE_ARTHAS21;
1300 break;
1303 break;
1304 case RP3_EVENT_SPAWN3:
1305 {
1306 uint8 extra = urand(0, 2); // 0 = extra adversary, 1 = extra hunter, 2 = extra agent
1316 rift1->DespawnOrUnsummon(Seconds(5));
1318 rift2->DespawnOrUnsummon(Seconds(5));
1319 break;
1320 }
1321 case RP3_EVENT_ARTHAS30:
1322 talkerEntry = 0, talkerLine = RP3_LINE_ARTHAS30;
1323 break;
1327 break;
1330 epoch->GetMotionMaster()->MoveAlongSplineChain(0, RP3_CHAIN_EPOCH, false);
1332 rift->DespawnOrUnsummon(Seconds(27));
1333 break;
1334 case RP3_EVENT_ARTHAS31:
1335 talkerEntry = 0, talkerLine = RP3_LINE_ARTHAS31;
1336 me->SetFacingTo(6.073746f); // @todo
1337 break;
1339 if (Creature* epoch = me->FindNearestCreature(NPC_EPOCH, 100.0f, true))
1340 epoch->SetFacingToObject(me);
1341 break;
1342 case RP3_EVENT_EPOCH1:
1343 talkerEntry = NPC_EPOCH, talkerLine = RP3_LINE_EPOCH1;
1344 break;
1345 case RP3_EVENT_ARTHAS32:
1346 talkerEntry = 0, talkerLine = RP3_LINE_ARTHAS32;
1347 break;
1350 break;
1352 talkerEntry = NPC_EPOCH, talkerLine = RP3_LINE_EPOCH2;
1353 if (Creature* epoch = me->FindNearestCreature(NPC_EPOCH, 100.0f, true))
1354 {
1355 epoch->SetImmuneToAll(false);
1356 me->EngageWithTarget(epoch);
1357 epoch->EngageWithTarget(me);
1358 }
1360 break;
1361 case RP4_EVENT_ARTHAS2:
1362 me->SetFacingTo(0.226893f); // @todo
1363 talkerEntry = 0, talkerLine = RP4_LINE_ARTHAS2;
1364 break;
1366 if (GameObject* passage = me->FindNearestGameObject(GO_HIDDEN_PASSAGE, 100.0f))
1367 passage->SetGoState(GO_STATE_ACTIVE);
1368 break;
1369 case RP4_EVENT_ARTHAS3:
1370 talkerEntry = 0, talkerLine = RP4_LINE_ARTHAS3;
1372 break;
1376 break;
1379 break;
1380 case RP4_EVENT_ARTHAS11:
1381 talkerEntry = 0, talkerLine = RP4_LINE_ARTHAS11;
1382 break;
1384 me->SetFacingTo(1.780236f); // @todo
1385 break;
1386 case RP4_EVENT_ARTHAS12:
1387 talkerEntry = 0, talkerLine = RP4_LINE_ARTHAS12;
1388 break;
1391 break;
1392 case RP4_EVENT_ARTHAS13:
1393 talkerEntry = 0, talkerLine = RP4_LINE_ARTHAS13;
1395 break;
1399 break;
1400 case RP5_EVENT_ARTHAS2:
1401 talkerEntry = 0, talkerLine = RP5_LINE_ARTHAS2;
1402 if (Creature* malganis = me->FindNearestCreature(NPC_MALGANIS, 100.0f, true))
1403 me->SetFacingToObject(malganis);
1404 break;
1406 if (Creature* malganis = me->FindNearestCreature(NPC_MALGANIS, 100.0f, true))
1407 {
1408 malganis->AI()->Talk(RP5_LINE_MALGANIS1, ObjectAccessor::GetUnit(*malganis, _eventStarterGuid));
1409 malganis->SetImmuneToAll(false);
1410 me->EngageWithTarget(malganis);
1411 malganis->EngageWithTarget(me);
1412 }
1414 break;
1416 if (Creature* malganis = me->FindNearestCreature(NPC_MALGANIS, 100.0f, true))
1417 {
1418 malganis->SetFacingToObject(me);
1419 malganis->CastSpell(malganis, SPELL_MALGANIS_QUEST_CREDIT, true);
1420 malganis->CastSpell(malganis, SPELL_MALGANIS_KILL_CREDIT, true);
1422 chest->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
1423 }
1436 break;
1438 talkerEntry = NPC_MALGANIS, talkerLine = RP5_LINE_MALGANIS12;
1439 break;
1441 if (Creature* malganis = me->FindNearestCreature(NPC_MALGANIS, 100.0f, true))
1442 malganis->CastSpell(malganis, SPELL_SHADOWSTEP_VISUAL);
1443 break;
1444 case RP5_EVENT_ARTHAS10:
1445 if (Creature* malganis = me->FindNearestCreature(NPC_MALGANIS, 100.0f, true))
1446 malganis->DespawnOrUnsummon();
1448 talkerEntry = 0, talkerLine = RP5_LINE_ARTHAS10;
1449 break;
1452 break;
1453 case RP5_EVENT_ARTHAS11:
1454 talkerEntry = 0, talkerLine = RP5_LINE_ARTHAS11;
1455 break;
1458 break;
1461 break;
1464 break;
1467 {
1468 chromie->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
1469 std::function<void(Movement::MoveSplineInit&)> initializer = [](Movement::MoveSplineInit& init)
1470 {
1472 init.SetFly();
1473 init.SetWalk(true);
1474 init.MovebyPath(path, 0);
1475 };
1476 chromie->GetMotionMaster()->LaunchMoveSpline(std::move(initializer), 0, MOTION_PRIORITY_NORMAL, POINT_MOTION_TYPE);
1477 }
1478 break;
1480 if (Creature* chromie = me->FindNearestCreature(NPC_CHROMIE_3, 100.0f, true))
1481 chromie->SetAnimTier(AnimTier::Ground, true);
1482 break;
1484 if (Creature* chromie = me->FindNearestCreature(NPC_CHROMIE_3, 100.0f, true))
1485 {
1486 chromie->CastSpell(chromie, SPELL_CHROMIE_3_TRANSFORM);
1487 chromie->AI()->Talk(RP5_LINE_CHROMIE0);
1488 chromie->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
1489 }
1490 break;
1491 default:
1492 break;
1493 }
1494
1495 if (talkerEntry != UINT_MAX)
1496 {
1497 Creature* talker;
1498 if (talkerEntry)
1499 talker = me->FindNearestCreature(talkerEntry, 100.0f, true);
1500 else
1501 talker = me;
1502 if (talker)
1503 talker->AI()->Talk(talkerLine, ObjectAccessor::GetUnit(*talker, _eventStarterGuid));
1504 }
1505 }
1506 }
1507
1509 {
1510 std::list<Creature*> infinites;
1514 for (Creature* target : infinites)
1515 {
1516 target->SetImmuneToAll(false);
1517 me->EngageWithTarget(target);
1518 target->EngageWithTarget(me);
1519 }
1520 }
1521
1522 static void MoveInfiniteOnSpawn(Creature* infinite, SplineChains chainId)
1523 {
1524 if (std::vector<SplineChainLink> const* chain = sScriptSystemMgr->GetSplineChain(NPC_INFINITE_ADVERSARY, chainId))
1525 infinite->GetMotionMaster()->MoveAlongSplineChain(0, *chain, true);
1526 }
1527
1528 void KilledUnit(Unit* who) override
1529 {
1530 if (who && who->GetEntry() == NPC_RISEN_ZOMBIE)
1531 Talk(LINE_SLAY_ZOMBIE, who);
1532 }
1533
1534 void JustEngagedWith(Unit* who) override
1535 {
1536 TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::JustEngagedWith: RP in progress? '{}'", _progressRP ? "YES" : "NO");
1537 if (_progressRP)
1538 {
1539 _progressRP = false;
1541
1543 if (!_resumeMovement.Empty())
1544 TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::JustEngagedWith: spline chain motion paused");
1545 else
1546 TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::JustEngagedWith: entered combat without pathing, pausing RP regardless");
1547 }
1549 }
1550
1551 void EnterEvadeMode(EvadeReason why) override
1552 {
1553 TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::EnterEvadeMode: why = {} ", EnumUtils::ToConstant(why));
1555 }
1556
1557 void JustReachedHome() override
1558 {
1561
1562 _progressRP = true;
1563
1564 if (!_resumeMovement.Empty()) // WP motion was interrupted, resume
1565 {
1566 TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::JustReachedHome: Resuming motion");
1569 }
1570 else
1571 TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::JustReachedHome: Back at leash pos, resuming RP");
1572
1573 if (_afterCombat)
1574 {
1577 }
1578 }
1579
1580 void JustDied(Unit* /*killer*/) override
1581 {
1582 // Instance failure: regress back to last stable state
1584 me->DespawnOrUnsummon(5s);
1585 }
1586
1587 void JustAppeared() override
1588 {
1589 _progressRP = true;
1592 }
1593
1595 {
1597 instance->SetGuidData(command, cause->GetGUID());
1598 }
1599
1600 bool OnGossipSelect(Player* player, uint32 /*sender*/, uint32 listId) override
1601 {
1602 uint32 const action = GetGossipActionFor(player, listId);
1603 TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::GossipSelect: '{}' selects action '{}' on '{}'", player->GetGUID().ToString(), action, me->GetGUID().ToString());
1604
1610 return true;
1611 }
1612
1613 bool OnGossipHello(Player* /*player*/) override
1614 {
1615 return false;
1616 }
1617
1618 private:
1622 uint32 _exorcismCooldown; // no EventMap entry for this, it's reserved for RP handling
1623
1627 };
1628
1629 CreatureAI* GetAI(Creature* creature) const override
1630 {
1631 return GetCullingOfStratholmeAI<npc_arthas_stratholmeAI>(creature);
1632 }
1633};
1634
1636{
1637 auto itr = ArthasSnapbackPositions.find(state);
1638 if (itr == ArthasSnapbackPositions.end())
1639 itr = ArthasSnapbackPositions.begin();
1640 return *(itr->second.SnapbackPosition);
1641}
1642
1643// Arthas' AI is the one controlling everything, all this AI does is report any movementinforms back to Arthas AI
1645{
1647
1648 void MovementInform(uint32 type, uint32 id) override
1649 {
1650 if (type == POINT_MOTION_TYPE || type == EFFECT_MOTION_TYPE || type == SPLINE_CHAIN_MOTION_TYPE)
1651 if (TempSummon* self = me->ToTempSummon())
1652 ASSERT_NOTNULL(self->GetSummonerCreatureBase())->AI()->MovementInform(type, id);
1653 }
1654};
1655
1656// 50773 - Crusader Strike
1658{
1659 void HandleDummy(SpellEffIndex /*effIndex*/)
1660 {
1661 if (Unit* target = GetHitUnit())
1662 if (target->GetEntry() == NPC_CITIZEN || target->GetEntry() == NPC_RESIDENT)
1663 Unit::Kill(GetCaster(), target);
1664 }
1665
1666 void Register() override
1667 {
1669 }
1670};
1671
1673{
1677}
Actions
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition: Duration.h:32
#define ASSERT_NOTNULL(pointer)
Definition: Errors.h:84
@ DONE
#define TC_LOG_WARN(filterType__,...)
Definition: Log.h:162
#define TC_LOG_TRACE(filterType__,...)
Definition: Log.h:153
@ MOTION_PRIORITY_NORMAL
@ SPLINE_CHAIN_MOTION_TYPE
@ POINT_MOTION_TYPE
@ EFFECT_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: ObjectDefines.h:70
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
uint32 urandms(uint32 min, uint32 max)
Definition: Random.cpp:49
#define RegisterCreatureAI(ai_name)
Definition: ScriptMgr.h:1380
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
#define sScriptSystemMgr
Definition: ScriptSystem.h:53
uint32 GetGossipActionFor(Player *player, uint32 gossipListId)
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_0
Definition: SharedDefines.h:30
Emote
@ EMOTE_ONESHOT_POINT_NO_SHEATHE
@ EMOTE_ONESHOT_EXCLAMATION
@ EMOTE_STATE_COWER
@ EMOTE_ONESHOT_LAUGH
@ EMOTE_ONESHOT_ROAR
@ EMOTE_ONESHOT_RUDE
@ EMOTE_ONESHOT_TALK
@ SPELL_EFFECT_DUMMY
@ GO_FLAG_NOT_SELECTABLE
@ GO_STATE_ACTIVE
@ TRIGGERED_IGNORE_SET_FACING
Will not adjust facing to target (if any)
Definition: SpellDefines.h:256
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
EvadeReason
Definition: UnitAICommon.h:30
ReactStates
Definition: UnitDefines.h:505
@ REACT_DEFENSIVE
Definition: UnitDefines.h:507
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ REACT_AGGRESSIVE
Definition: UnitDefines.h:508
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:297
@ UNIT_NPC_FLAG_QUESTGIVER
Definition: UnitDefines.h:298
@ UNIT_STATE_CASTING
Definition: Unit.h:270
virtual void JustEngagedWith(Unit *)
Definition: CreatureAI.h:99
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:219
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:371
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:373
bool HasReactState(ReactStates state) const
Definition: Creature.h:162
bool IsEngaged() const override
Definition: Creature.cpp:3601
void SetReactState(ReactStates st)
Definition: Creature.h:160
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
void SetImmuneToAll(bool apply) override
Definition: Creature.h:167
CreatureAI * AI() const
Definition: Creature.h:214
static char const * ToConstant(Enum value)
Definition: SmartEnum.h:120
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
bool Empty() const
Definition: EventMap.h:84
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
virtual bool SetBossState(uint32 id, EncounterState state)
InstanceMap * instance
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, Milliseconds duration=0ms, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty, SmoothPhasingInfo const *smoothPhasingInfo=nullptr)
Definition: Object.cpp:1836
void MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk)
void ResumeSplineChain(SplineChainResumeInfo const &info)
std::string ToString() const
Definition: ObjectGuid.cpp:554
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
Unit * GetCaster() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
static void GetResumeInfo(SplineChainResumeInfo &info, Unit const *owner, Optional< uint32 > id={})
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:159
virtual bool CanAIAttack(Unit const *) const
Definition: UnitAI.h:57
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 DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void SetVisible(bool x)
Definition: Unit.cpp:8351
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
void SetFacingToObject(WorldObject const *object, bool force=true)
Definition: Unit.cpp:12671
bool IsAlive() const
Definition: Unit.h:1164
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:983
TempSummon * ToTempSummon()
Definition: Unit.h:1756
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:982
void EngageWithTarget(Unit *who)
Definition: Unit.cpp:8077
void NearTeleportTo(Position const &pos, bool casting=false)
Definition: Unit.cpp:12327
void SetFacingTo(float const ori, bool force=true)
Definition: Unit.cpp:12653
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition: Unit.cpp:1598
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true, bool skipSettingDeathState=false)
Definition: Unit.cpp:10591
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition: Object.cpp:2170
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition: Object.cpp:3312
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2148
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:91
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:92
virtual void SetGuidData(uint32, ObjectGuid)
Definition: ZoneScript.h:84
CreatureAI * GetAI(Creature *creature) const override
void HandleDummy(SpellEffIndex)
@ DATA_START_MALGANIS
@ DATA_INSTANCE_PROGRESS
@ DATA_ARTHAS_DIED
@ DATA_GAUNTLET_DONE
@ DATA_MALGANIS_DONE
@ DATA_TO_GAUNTLET
@ DATA_START_GAUNTLET
@ DATA_START_WAVES
@ DATA_TOWN_HALL_DONE
@ DATA_REACH_TOWN_HALL
@ DATA_START_TOWN_HALL
@ DATA_GAUNTLET_REACHED
@ DATA_START_PURGE
@ DATA_MAL_GANIS
@ DATA_UTHER_FINISHED
@ ACTION_START_RP_EVENT2
@ ACTION_PROGRESS_UPDATE
@ ACTION_START_RP_EVENT3
@ ACTION_START_RP_EVENT4_2
@ ACTION_START_RP_EVENT4_1
@ ACTION_START_RP_EVENT5
COSProgressStates
@ UTHER_TALK
@ JUST_STARTED
@ TOWN_HALL_COMPLETE
@ CRATES_IN_PROGRESS
@ GAUNTLET_IN_PROGRESS
@ TOWN_HALL_PENDING
@ CRATES_DONE
@ GAUNTLET_PENDING
@ WAVES_DONE
@ MALGANIS_IN_PROGRESS
@ WAVES_IN_PROGRESS
@ GAUNTLET_TRANSITION
@ PURGE_PENDING
@ PURGE_STARTING
@ GAUNTLET_COMPLETE
@ GO_HIDDEN_PASSAGE
std::vector< Vector3 > PointsArray
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition: Containers.h:109
Position const & GetArthasSnapbackFor(COSProgressStates state)
@ GO_CHEST_NORMAL
Definition: npc_arthas.cpp:74
@ NPC_RESIDENT
Definition: npc_arthas.cpp:48
@ NPC_TIME_RIFT_LARGE
Definition: npc_arthas.cpp:57
@ SPELL_EXORCISM
Definition: npc_arthas.cpp:66
@ GO_CHEST_HEROIC
Definition: npc_arthas.cpp:75
@ NPC_EPOCH
Definition: npc_arthas.cpp:61
@ SPELL_MALGANIS_KILL_CREDIT
Definition: npc_arthas.cpp:72
@ NPC_PRIEST
Definition: npc_arthas.cpp:51
@ NPC_INFINITE_ADVERSARY
Definition: npc_arthas.cpp:58
@ SPELL_SHADOWSTEP_VISUAL
Definition: npc_arthas.cpp:69
@ NPC_UTHER
Definition: npc_arthas.cpp:45
@ NPC_TIME_RIFT
Definition: npc_arthas.cpp:56
@ NPC_MALGANIS
Definition: npc_arthas.cpp:62
@ NPC_SORCERESS
Definition: npc_arthas.cpp:52
@ SPELL_CRUSADER_STRIKE
Definition: npc_arthas.cpp:68
@ NPC_FOOTMAN
Definition: npc_arthas.cpp:49
@ NPC_CITIZEN_INFINITE
Definition: npc_arthas.cpp:54
@ NPC_KNIGHT
Definition: npc_arthas.cpp:50
@ NPC_CITIZEN
Definition: npc_arthas.cpp:47
@ SPELL_DEVOTION_AURA
Definition: npc_arthas.cpp:67
@ NPC_JAINA
Definition: npc_arthas.cpp:46
@ SPELL_MALGANIS_QUEST_CREDIT
Definition: npc_arthas.cpp:71
@ SPELL_TRANSFORM_VISUAL
Definition: npc_arthas.cpp:70
@ SPELL_CHROMIE_3_TRANSFORM
Definition: npc_arthas.cpp:73
@ NPC_RESIDENT_INFINITE
Definition: npc_arthas.cpp:55
@ NPC_CHROMIE_3
Definition: npc_arthas.cpp:63
@ NPC_RISEN_ZOMBIE
Definition: npc_arthas.cpp:53
@ NPC_INFINITE_AGENT
Definition: npc_arthas.cpp:60
@ NPC_INFINITE_HUNTER
Definition: npc_arthas.cpp:59
@ SPELL_HOLY_LIGHT
Definition: npc_arthas.cpp:65
@ NPC_MALGANIS_BUNNY
Definition: npc_arthas.cpp:44
SplineChains
Definition: npc_arthas.cpp:79
@ RP1_CHAIN_UTHER2
Definition: npc_arthas.cpp:85
@ RP2_CHAIN_ARTHAS3
Definition: npc_arthas.cpp:97
@ RP3_CHAIN_SPAWN3_LOC3
Definition: npc_arthas.cpp:119
@ RP3_CHAIN_SPAWN2_LOC4
Definition: npc_arthas.cpp:116
@ RP5_CHAIN_ARTHAS3
Definition: npc_arthas.cpp:131
@ RP3_CHAIN_SPAWN3_LOC1
Definition: npc_arthas.cpp:117
@ RP3_CHAIN_SPAWN3_LOC4
Definition: npc_arthas.cpp:120
@ RP1_CHAIN_ARTHAS2
Definition: npc_arthas.cpp:84
@ RP3_CHAIN_SPAWN1_LOC2
Definition: npc_arthas.cpp:110
@ RP2_CHAIN_ARTHAS2
Definition: npc_arthas.cpp:96
@ RP1_CHAIN_JAINA4
Definition: npc_arthas.cpp:89
@ RP3_CHAIN_SPAWN1_LOC3
Definition: npc_arthas.cpp:111
@ RP5_CHAIN_ARTHAS2
Definition: npc_arthas.cpp:130
@ RP5_CHAIN_ARTHAS4
Definition: npc_arthas.cpp:132
@ RP1_CHAIN_ARTHAS4
Definition: npc_arthas.cpp:91
@ RP3_CHAIN_ARTHAS4
Definition: npc_arthas.cpp:104
@ RP3_CHAIN_SPAWN2_LOC2
Definition: npc_arthas.cpp:114
@ RP1_CHAIN_JAINA3
Definition: npc_arthas.cpp:88
@ RP3_CHAIN_SPAWN2_LOC3
Definition: npc_arthas.cpp:115
@ RP1_CHAIN_UTHER3
Definition: npc_arthas.cpp:87
@ RP4_CHAIN_GAUNTLET1
Definition: npc_arthas.cpp:125
@ RP2_CHAIN_CITIZEN1
Definition: npc_arthas.cpp:95
@ RP1_CHAIN_UTHER1
Definition: npc_arthas.cpp:82
@ RP3_CHAIN_SPAWN1_LOC1
Definition: npc_arthas.cpp:109
@ RP3_CHAIN_ARTHAS2
Definition: npc_arthas.cpp:101
@ RP4_CHAIN_ARTHAS1
Definition: npc_arthas.cpp:123
@ RP1_CHAIN_ARTHAS3
Definition: npc_arthas.cpp:90
@ RP3_CHAIN_ARTHAS3
Definition: npc_arthas.cpp:102
@ RP5_CHAIN_ARTHAS1
Definition: npc_arthas.cpp:129
@ RP3_CHAIN_ARTHAS5
Definition: npc_arthas.cpp:105
@ RP3_CHAIN_ARTHAS3_2
Definition: npc_arthas.cpp:103
@ RP3_CHAIN_SPAWN2_LOC1
Definition: npc_arthas.cpp:113
@ RP3_CHAIN_SPAWN3_LOC2
Definition: npc_arthas.cpp:118
@ RP1_CHAIN_JAINA1
Definition: npc_arthas.cpp:83
@ RP3_CHAIN_EPOCH
Definition: npc_arthas.cpp:106
@ RP4_CHAIN_GAUNTLET2
Definition: npc_arthas.cpp:126
@ RP3_CHAIN_ARTHAS1
Definition: npc_arthas.cpp:100
@ RP2_CHAIN_ARTHAS1
Definition: npc_arthas.cpp:94
@ RP4_CHAIN_ARTHAS2
Definition: npc_arthas.cpp:124
@ RP3_CHAIN_SPAWN1_LOC4
Definition: npc_arthas.cpp:112
@ RP1_CHAIN_ARTHAS1
Definition: npc_arthas.cpp:81
@ RP1_CHAIN_JAINA2
Definition: npc_arthas.cpp:86
RPEventLines2
Definition: npc_arthas.cpp:339
@ RP2_LINE_MALGANIS1
Definition: npc_arthas.cpp:346
@ RP2_LINE_ARTHAS5
Definition: npc_arthas.cpp:349
@ RP2_LINE_MALGANIS2
Definition: npc_arthas.cpp:347
@ RP2_LINE_ARTHAS3
Definition: npc_arthas.cpp:345
@ RP2_LINE_ARTHAS2
Definition: npc_arthas.cpp:342
@ RP2_LINE_ARTHAS4
Definition: npc_arthas.cpp:348
@ RP2_LINE_RESIDENT1
Definition: npc_arthas.cpp:344
@ RP2_LINE_CITIZEN1
Definition: npc_arthas.cpp:341
@ RP2_LINE_ARTHAS1
Definition: npc_arthas.cpp:340
@ RP2_LINE_CITIZEN2
Definition: npc_arthas.cpp:343
RPEvents
Definition: npc_arthas.cpp:184
@ RP3_EVENT_ARTHAS11
Definition: npc_arthas.cpp:265
@ RP2_EVENT_REACT5
Definition: npc_arthas.cpp:228
@ RP5_EVENT_MALGANIS12
Definition: npc_arthas.cpp:302
@ RP4_EVENT_ARTHAS12
Definition: npc_arthas.cpp:294
@ RP1_EVENT_JAINA_LEAVE
Definition: npc_arthas.cpp:207
@ RP3_EVENT_SPAWN2_FACE
Definition: npc_arthas.cpp:270
@ RP4_EVENT_GAUNTLET_DONE
Definition: npc_arthas.cpp:297
@ RP3_EVENT_TRANSFORM2
Definition: npc_arthas.cpp:256
@ RP1_EVENT_ARTHAS3
Definition: npc_arthas.cpp:190
@ RP5_EVENT_ARTHAS10_2
Definition: npc_arthas.cpp:305
@ RP3_EVENT_ARTHAS30
Definition: npc_arthas.cpp:275
@ RP1_EVENT_JAINA_LEAVE2
Definition: npc_arthas.cpp:210
@ RP1_EVENT_ARTHAS7
Definition: npc_arthas.cpp:201
@ RP1_EVENT_UTHER_FACE
Definition: npc_arthas.cpp:191
@ RP2_EVENT_REACT3
Definition: npc_arthas.cpp:226
@ RP1_EVENT_ARTHAS2
Definition: npc_arthas.cpp:189
@ RP3_EVENT_SPAWN2
Definition: npc_arthas.cpp:268
@ RP1_EVENT_START2
Definition: npc_arthas.cpp:186
@ RP5_EVENT_ARTHAS_LEAVE2
Definition: npc_arthas.cpp:309
@ RP2_EVENT_ARTHAS5_2
Definition: npc_arthas.cpp:241
@ RP4_EVENT_ARTHAS2
Definition: npc_arthas.cpp:286
@ RP1_EVENT_ARTHAS5
Definition: npc_arthas.cpp:197
@ RP3_EVENT_ARTHAS2
Definition: npc_arthas.cpp:250
@ RP4_EVENT_ARTHAS13
Definition: npc_arthas.cpp:296
@ RP5_EVENT_ARTHAS_LEAVE
Definition: npc_arthas.cpp:308
@ RP3_EVENT_RESIDENT_FACE
Definition: npc_arthas.cpp:247
@ RP2_EVENT_REACT2
Definition: npc_arthas.cpp:225
@ RP5_EVENT_ARTHAS10
Definition: npc_arthas.cpp:304
@ RP1_EVENT_UTHER3
Definition: npc_arthas.cpp:195
@ RP2_EVENT_TROOPS_FACE
Definition: npc_arthas.cpp:232
@ RP2_EVENT_ARTHAS_MOVE_2
Definition: npc_arthas.cpp:219
@ RP1_EVENT_UTHER6
Definition: npc_arthas.cpp:205
@ RP3_EVENT_ARTHAS4
Definition: npc_arthas.cpp:259
@ RP2_EVENT_ARTHAS2
Definition: npc_arthas.cpp:218
@ RP1_EVENT_UTHER4
Definition: npc_arthas.cpp:198
@ RP4_EVENT_HIDDEN_PASSAGE
Definition: npc_arthas.cpp:287
@ RP3_EVENT_TRANSFORM3
Definition: npc_arthas.cpp:257
@ RP3_EVENT_INFINITE_LAUGH
Definition: npc_arthas.cpp:252
@ RP3_EVENT_ARTHAS3
Definition: npc_arthas.cpp:253
@ RP1_EVENT_ARTHAS_LEAVE2
Definition: npc_arthas.cpp:213
@ RP3_EVENT_SPAWN1_FACE
Definition: npc_arthas.cpp:263
@ RP3_EVENT_ARTHAS32
Definition: npc_arthas.cpp:282
@ RP3_EVENT_ARTHAS_MOVE_1_2
Definition: npc_arthas.cpp:261
@ RP2_EVENT_KILL1
Definition: npc_arthas.cpp:221
@ RP3_EVENT_SPAWN1
Definition: npc_arthas.cpp:262
@ RP4_EVENT_ARTHAS11
Definition: npc_arthas.cpp:292
@ RP3_EVENT_ARTHAS_FACE
Definition: npc_arthas.cpp:248
@ RP3_EVENT_CITIZEN2
Definition: npc_arthas.cpp:254
@ RP3_EVENT_EPOCH_FACE
Definition: npc_arthas.cpp:280
@ RP1_EVENT_JAINA1
Definition: npc_arthas.cpp:202
@ RP1_EVENT_UTHER_LEAVE
Definition: npc_arthas.cpp:206
@ RP5_EVENT_ARTHAS11_2
Definition: npc_arthas.cpp:307
@ RP3_EVENT_EPOCH_SPAWN
Definition: npc_arthas.cpp:278
@ RP3_EVENT_ARTHAS_MOVE_3
Definition: npc_arthas.cpp:273
@ RP2_EVENT_ARTHAS4
Definition: npc_arthas.cpp:237
@ RP1_EVENT_ARTHAS9
Definition: npc_arthas.cpp:208
@ RP2_EVENT_ARTHAS5_3
Definition: npc_arthas.cpp:242
@ RP2_EVENT_ARTHAS5
Definition: npc_arthas.cpp:240
@ RP1_EVENT_UTHER1
Definition: npc_arthas.cpp:188
@ RP2_EVENT_REACT4
Definition: npc_arthas.cpp:227
@ RP5_EVENT_MALGANIS_LEAVE
Definition: npc_arthas.cpp:303
@ RP4_EVENT_GAUNTLET_REACHED
Definition: npc_arthas.cpp:289
@ RP4_EVENT_GAUNTLET_RESUME
Definition: npc_arthas.cpp:295
@ RP3_EVENT_ARTHAS31
Definition: npc_arthas.cpp:279
@ RP4_EVENT_ARTHAS_MOVE
Definition: npc_arthas.cpp:291
@ RP1_EVENT_START1
Definition: npc_arthas.cpp:185
@ RP1_EVENT_ARTHAS4
Definition: npc_arthas.cpp:194
@ RP3_EVENT_SPAWN3_AGGRO
Definition: npc_arthas.cpp:277
@ RP4_EVENT_ARTHAS_FACE
Definition: npc_arthas.cpp:293
@ RP5_EVENT_CHROMIE_SPAWN
Definition: npc_arthas.cpp:310
@ RP2_EVENT_WAVE_START
Definition: npc_arthas.cpp:243
@ RP3_EVENT_ARTHAS_MOVE_2
Definition: npc_arthas.cpp:266
@ RP1_EVENT_JAINA_FACE
Definition: npc_arthas.cpp:192
@ RP3_EVENT_EPOCH1
Definition: npc_arthas.cpp:281
@ RP2_EVENT_MALGANIS_LEAVE1
Definition: npc_arthas.cpp:235
@ RP1_EVENT_JAINA2
Definition: npc_arthas.cpp:209
@ RP3_EVENT_ARTHAS_MOVE_1
Definition: npc_arthas.cpp:260
@ RP3_EVENT_SPAWN3
Definition: npc_arthas.cpp:274
@ RP5_EVENT_MALGANIS1
Definition: npc_arthas.cpp:300
@ RP2_EVENT_CITIZEN1
Definition: npc_arthas.cpp:217
@ RP1_EVENT_ARTHAS_TURN
Definition: npc_arthas.cpp:196
@ RP2_EVENT_MALGANIS2
Definition: npc_arthas.cpp:234
@ RP5_EVENT_CHROMIE_TRANSFORM
Definition: npc_arthas.cpp:312
@ RP3_EVENT_TRANSFORM1
Definition: npc_arthas.cpp:255
@ RP1_EVENT_ARTHAS6
Definition: npc_arthas.cpp:199
@ RP1_EVENT_ARTHAS8
Definition: npc_arthas.cpp:203
@ RP2_EVENT_ARTHAS_FACE
Definition: npc_arthas.cpp:233
@ RP3_EVENT_AGGRO
Definition: npc_arthas.cpp:258
@ RP2_EVENT_ARTHAS_MOVE_3
Definition: npc_arthas.cpp:222
@ RP1_EVENT_FINISHED
Definition: npc_arthas.cpp:214
@ RP2_EVENT_ARTHAS4_2
Definition: npc_arthas.cpp:238
@ RP3_EVENT_ARTHAS_FACE2
Definition: npc_arthas.cpp:269
@ RP2_EVENT_ARTHAS_MOVE_4
Definition: npc_arthas.cpp:229
@ RP2_EVENT_ARTHAS_MOVE_1
Definition: npc_arthas.cpp:216
@ RP3_EVENT_SPAWN2_AGGRO
Definition: npc_arthas.cpp:271
@ RP5_EVENT_CHROMIE_LAND
Definition: npc_arthas.cpp:311
@ RP3_EVENT_ARTHAS20
Definition: npc_arthas.cpp:267
@ RP2_EVENT_CITIZEN2
Definition: npc_arthas.cpp:220
@ RP2_EVENT_ARTHAS3
Definition: npc_arthas.cpp:230
@ RP2_EVENT_KILL2
Definition: npc_arthas.cpp:223
@ RP3_EVENT_SPAWN3_FACE
Definition: npc_arthas.cpp:276
@ RP2_EVENT_MALGANIS1
Definition: npc_arthas.cpp:231
@ RP3_EVENT_SPAWN1_AGGRO
Definition: npc_arthas.cpp:264
@ RP1_EVENT_UTHER5
Definition: npc_arthas.cpp:200
@ RP2_EVENT_REACT1
Definition: npc_arthas.cpp:224
@ RP1_EVENT_ARTHAS8_2
Definition: npc_arthas.cpp:204
@ RP2_EVENT_ARTHAS_MOVE_5
Definition: npc_arthas.cpp:239
@ RP5_EVENT_MALGANIS_DONE
Definition: npc_arthas.cpp:301
@ RP4_EVENT_ARTHAS3
Definition: npc_arthas.cpp:288
@ RP1_EVENT_ARTHAS1
Definition: npc_arthas.cpp:187
@ RP5_EVENT_ARTHAS11
Definition: npc_arthas.cpp:306
@ RP3_EVENT_ARTHAS32_2
Definition: npc_arthas.cpp:283
@ RP3_EVENT_CITIZEN1
Definition: npc_arthas.cpp:249
@ RP1_EVENT_ARTHAS10
Definition: npc_arthas.cpp:212
@ EVENT_TOWN_HALL_REACHED
Definition: npc_arthas.cpp:245
@ RP3_EVENT_ARTHAS_KILL
Definition: npc_arthas.cpp:251
@ RP3_EVENT_ARTHAS21
Definition: npc_arthas.cpp:272
@ RP2_EVENT_MALGANIS_LEAVE2
Definition: npc_arthas.cpp:236
@ RP1_EVENT_ARTHAS_LEAVE
Definition: npc_arthas.cpp:211
@ RP1_EVENT_UTHER2
Definition: npc_arthas.cpp:193
@ RP5_EVENT_ARTHAS2
Definition: npc_arthas.cpp:299
@ RP3_EVENT_EPOCH_AGGRO
Definition: npc_arthas.cpp:284
uint32 const chromiePathSize
Definition: npc_arthas.cpp:505
RPEventLines3
Definition: npc_arthas.cpp:353
@ RP3_LINE_EPOCH2
Definition: npc_arthas.cpp:371
@ RP3_LINE_EPOCH1
Definition: npc_arthas.cpp:369
@ RP3_LINE_ARTHAS30
Definition: npc_arthas.cpp:367
@ RP3_LINE_ARTHAS11
Definition: npc_arthas.cpp:362
@ RP3_LINE_CITIZEN2
Definition: npc_arthas.cpp:358
@ RP3_LINE_ARTHAS4
Definition: npc_arthas.cpp:359
@ RP3_LINE_ARTHAS20
Definition: npc_arthas.cpp:364
@ RP3_LINE_ARTHAS21
Definition: npc_arthas.cpp:365
@ RP3_LINE_ARTHAS10
Definition: npc_arthas.cpp:361
@ RP3_LINE_ARTHAS32
Definition: npc_arthas.cpp:370
@ RP3_LINE_ARTHAS2
Definition: npc_arthas.cpp:356
@ RP3_LINE_ARTHAS3
Definition: npc_arthas.cpp:357
@ RP3_LINE_ARTHAS31
Definition: npc_arthas.cpp:368
@ RP3_LINE_CITIZEN1
Definition: npc_arthas.cpp:355
@ RP3_LINE_ARTHAS1
Definition: npc_arthas.cpp:354
@ RP3_ACTION_AFTER_SPAWN1
Definition: npc_arthas.cpp:171
@ RP5_ACTION_AFTER_MALGANIS
Definition: npc_arthas.cpp:175
@ RP3_ACTION_AFTER_SPAWN2
Definition: npc_arthas.cpp:172
@ ACTION_NONE
Definition: npc_arthas.cpp:169
@ RP3_ACTION_AFTER_SPAWN3
Definition: npc_arthas.cpp:173
@ RP3_ACTION_AFTER_INITIAL
Definition: npc_arthas.cpp:170
@ RP3_ACTION_AFTER_EPOCH
Definition: npc_arthas.cpp:174
RPEventLines1
Definition: npc_arthas.cpp:316
@ RP1_LINE_ARTHAS8
Definition: npc_arthas.cpp:330
@ RP1_LINE_ARTHAS11
Definition: npc_arthas.cpp:335
@ RP1_LINE_ARTHAS3
Definition: npc_arthas.cpp:320
@ RP1_LINE_ARTHAS7
Definition: npc_arthas.cpp:328
@ RP1_LINE_ARTHAS6
Definition: npc_arthas.cpp:326
@ RP1_LINE_UTHER5
Definition: npc_arthas.cpp:327
@ RP1_LINE_ARTHAS9
Definition: npc_arthas.cpp:332
@ RP1_LINE_UTHER6
Definition: npc_arthas.cpp:331
@ RP1_LINE_UTHER4
Definition: npc_arthas.cpp:325
@ RP1_LINE_UTHER2
Definition: npc_arthas.cpp:321
@ RP1_LINE_ARTHAS1
Definition: npc_arthas.cpp:317
@ RP1_LINE_ARTHAS5
Definition: npc_arthas.cpp:324
@ RP1_LINE_JAINA2
Definition: npc_arthas.cpp:333
@ RP1_LINE_UTHER3
Definition: npc_arthas.cpp:323
@ RP1_LINE_UTHER1
Definition: npc_arthas.cpp:318
@ RP1_LINE_JAINA1
Definition: npc_arthas.cpp:329
@ RP1_LINE_ARTHAS10
Definition: npc_arthas.cpp:334
@ RP1_LINE_ARTHAS4
Definition: npc_arthas.cpp:322
@ RP1_LINE_ARTHAS2
Definition: npc_arthas.cpp:319
static std::unordered_map< uint32, SnapbackInfo > const ArthasSnapbackPositions
Definition: npc_arthas.cpp:523
RPEventLines5
Definition: npc_arthas.cpp:387
@ RP5_LINE_MALGANIS1
Definition: npc_arthas.cpp:390
@ RP5_LINE_ARTHAS2
Definition: npc_arthas.cpp:389
@ RP5_LINE_ARTHAS10
Definition: npc_arthas.cpp:392
@ RP5_LINE_MALGANIS12
Definition: npc_arthas.cpp:391
@ RP5_LINE_CHROMIE0
Definition: npc_arthas.cpp:394
@ RP5_LINE_ARTHAS1
Definition: npc_arthas.cpp:388
@ RP5_LINE_ARTHAS11
Definition: npc_arthas.cpp:393
OtherLines
Definition: npc_arthas.cpp:450
@ LINE_SLAY_ZOMBIE
Definition: npc_arthas.cpp:452
@ LINE_TOWN_HALL_PENDING
Definition: npc_arthas.cpp:451
void AddSC_npc_arthas_stratholme()
PointIDs
Definition: npc_arthas.cpp:136
@ RP1_POINTID_ARTHAS4
Definition: npc_arthas.cpp:144
@ RP5_POINTID_ARTHAS3
Definition: npc_arthas.cpp:163
@ RP5_POINTID_ARTHAS1
Definition: npc_arthas.cpp:162
@ RP1_POINTID_UTHER2
Definition: npc_arthas.cpp:139
@ RP2_POINTID_ARTHAS3
Definition: npc_arthas.cpp:148
@ RP4_POINTID_ARTHAS1
Definition: npc_arthas.cpp:157
@ RP1_POINTID_UTHER3
Definition: npc_arthas.cpp:141
@ RP1_POINTID_JAINA2
Definition: npc_arthas.cpp:140
@ RP2_POINTID_ARTHAS1
Definition: npc_arthas.cpp:146
@ RP3_POINTID_ARTHAS2
Definition: npc_arthas.cpp:152
@ RP4_POINTID_GAUNTLET1
Definition: npc_arthas.cpp:159
@ RP3_POINTID_TOWN_HALL
Definition: npc_arthas.cpp:150
@ RP5_POINTID_ARTHAS4
Definition: npc_arthas.cpp:164
@ RP4_POINTID_ARTHAS2
Definition: npc_arthas.cpp:158
@ RP2_POINTID_ARTHAS2
Definition: npc_arthas.cpp:147
@ RP1_POINTID_JAINA4
Definition: npc_arthas.cpp:142
@ RP3_POINTID_ARTHAS4
Definition: npc_arthas.cpp:154
@ RP4_POINTID_GAUNTLET2
Definition: npc_arthas.cpp:160
@ RP3_POINTID_ARTHAS1
Definition: npc_arthas.cpp:151
@ RP3_POINTID_ARTHAS5
Definition: npc_arthas.cpp:155
@ RP1_POINTID_UTHER1
Definition: npc_arthas.cpp:137
@ RP3_POINTID_ARTHAS3
Definition: npc_arthas.cpp:153
@ RP1_POINTID_ARTHAS3
Definition: npc_arthas.cpp:143
@ RP1_POINTID_ARTHAS2
Definition: npc_arthas.cpp:138
static float const ArthasSnapbackDistanceThreshold
Definition: npc_arthas.cpp:513
static std::array< Position, NUM_POSITIONS > const ArthasPositions
Definition: npc_arthas.cpp:457
PositionIndices
Definition: npc_arthas.cpp:398
@ RP2_FOOT4_POS
Definition: npc_arthas.cpp:412
@ RP1_UTHER_SPAWN
Definition: npc_arthas.cpp:401
@ RP3_SPAWN2_LOC2
Definition: npc_arthas.cpp:423
@ RP3_SPAWN2_RIFT2
Definition: npc_arthas.cpp:427
@ RP1_JAINA_SPAWN
Definition: npc_arthas.cpp:402
@ RP3_SPAWN1_LOC2
Definition: npc_arthas.cpp:418
@ NUM_POSITIONS
Definition: npc_arthas.cpp:446
@ RP3_SPAWN3_LOC1
Definition: npc_arthas.cpp:428
@ ARTHAS_GAUNTLET_POS
Definition: npc_arthas.cpp:438
@ RP3_SPAWN3_RIFT1
Definition: npc_arthas.cpp:432
@ RP3_EPOCH_RIFT
Definition: npc_arthas.cpp:435
@ RP3_SPAWN1_LOC1
Definition: npc_arthas.cpp:417
@ ARTHAS_FINAL_POS
Definition: npc_arthas.cpp:442
@ RP3_SPAWN3_LOC2
Definition: npc_arthas.cpp:429
@ RP1_ARTHAS_INITIAL
Definition: npc_arthas.cpp:400
@ ARTHAS_GAUNTLET_END_POS
Definition: npc_arthas.cpp:439
@ RP3_SPAWN1_LOC3
Definition: npc_arthas.cpp:419
@ RP3_SPAWN1_LOC4
Definition: npc_arthas.cpp:420
@ RP3_SPAWN2_LOC3
Definition: npc_arthas.cpp:424
@ ARTHAS_PURGE_PENDING_POS
Definition: npc_arthas.cpp:405
@ RP3_SPAWN2_LOC4
Definition: npc_arthas.cpp:425
@ RP2_PRIEST2_POS
Definition: npc_arthas.cpp:408
@ RP2_MALGANIS_POS
Definition: npc_arthas.cpp:413
@ RP3_SPAWN3_LOC4
Definition: npc_arthas.cpp:431
@ RP3_SPAWN2_RIFT1
Definition: npc_arthas.cpp:426
@ RP2_FOOT1_POS
Definition: npc_arthas.cpp:409
@ RP3_SPAWN3_RIFT2
Definition: npc_arthas.cpp:433
@ RP3_SPAWN3_LOC3
Definition: npc_arthas.cpp:430
@ RP5_CHROMIE_SPAWN
Definition: npc_arthas.cpp:443
@ RP5_MALGANIS_POS
Definition: npc_arthas.cpp:441
@ RP2_FOOT2_POS
Definition: npc_arthas.cpp:410
@ ARTHAS_TOWN_HALL_POS
Definition: npc_arthas.cpp:416
@ RP3_SPAWN1_RIFT
Definition: npc_arthas.cpp:421
@ RP2_FOOT3_POS
Definition: npc_arthas.cpp:411
@ RP2_PRIEST1_POS
Definition: npc_arthas.cpp:407
@ RP3_SPAWN2_LOC1
Definition: npc_arthas.cpp:422
@ ARTHAS_TOWN_HALL_END_POS
Definition: npc_arthas.cpp:436
@ ARTHAS_WAVES_POS
Definition: npc_arthas.cpp:406
@ RP3_EPOCH_SPAWN
Definition: npc_arthas.cpp:434
G3D::Vector3 const ChromieSplinePos[chromiePathSize]
Definition: npc_arthas.cpp:506
RPEventLines4
Definition: npc_arthas.cpp:375
@ RP4_LINE_ARTHAS12
Definition: npc_arthas.cpp:382
@ RP4_LINE_ARTHAS13
Definition: npc_arthas.cpp:383
@ RP4_LINE_ARTHAS3
Definition: npc_arthas.cpp:378
@ RP4_LINE_ARTHAS2
Definition: npc_arthas.cpp:377
@ RP4_LINE_ARTHAS1
Definition: npc_arthas.cpp:376
@ RP4_LINE_ARTHAS10
Definition: npc_arthas.cpp:380
@ RP4_LINE_ARTHAS11
Definition: npc_arthas.cpp:381
@ DATA_RP_DUMMY_MOVED
Definition: npc_arthas.cpp:180
float GetExactDist2d(const float x, const float y) const
Definition: Position.h:106
float GetExactDist(float x, float y, float z) const
Definition: Position.h:118
constexpr void GetPosition(float &x, float &y) const
Definition: Position.h:81
T const & RAID_MODE(T const &normal10, T const &normal25) const
bool HealthBelowPct(uint32 pct) const
ReactStates const ReactState
Definition: npc_arthas.cpp:517
bool const HasGossip
Definition: npc_arthas.cpp:518
Position const *const SnapbackPosition
Definition: npc_arthas.cpp:519
bool Empty() const
Definition: SplineChain.h:40
bool CanAIAttack(Unit const *who) const override
Definition: npc_arthas.cpp:877
static void MoveInfiniteOnSpawn(Creature *infinite, SplineChains chainId)
bool OnGossipSelect(Player *player, uint32, uint32 listId) override
void AdvanceDungeon(Player *cause, COSProgressStates from, COSInstanceData command)
void MovementInform(uint32 type, uint32 id) override
Definition: npc_arthas.cpp:708
void EnterEvadeMode(EvadeReason why) override
void SetGUID(ObjectGuid const &guid, int32 type) override
Definition: npc_arthas.cpp:675
void AdvanceToState(COSProgressStates newState)
Definition: npc_arthas.cpp:558
void MovementInform(uint32 type, uint32 id) override
npc_stratholme_rp_dummy(Creature *creature)