TrinityCore
Loading...
Searching...
No Matches
icecrown_citadel.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "icecrown_citadel.h"
19#include "CellImpl.h"
20#include "Containers.h"
21#include "GameObjectAI.h"
22#include "GridNotifiersImpl.h"
23#include "InstanceScript.h"
24#include "MotionMaster.h"
25#include "ObjectAccessor.h"
26#include "PassiveAI.h"
27#include "ScriptedCreature.h"
28#include "ScriptMgr.h"
29#include "SpellAuras.h"
30#include "SpellScript.h"
31#include "TemporarySummon.h"
32
34{
35 // Highlord Tirion Fordring (at Light's Hammer)
42
43 // The Lich King (at Light's Hammer)
49
50 // Highlord Bolvar Fordragon (at Light's Hammer)
52
53 // High Overlord Saurfang (at Light's Hammer)
58
59 // Muradin Bronzebeard (at Light's Hammer)
63
64 // Deathbound Ward
66
67 // Rotting Frost Giant
69};
70
72{
73 // Rotting Frost Giant
78 SPELL_STOMP = 64652,
80
81 // Frost Freeze Trap
83
84 // Alchemist Adrianna
87
88 // Invisible Stalker (Float, Uninteractible, LargeAOI)
90
91 // Empowering Blood Orb
96
97 // Darkfallen Generic
100
101 // Darkfallen Blood Knight
107
108 // Darkfallen Noble
111
112 // Darkfallen Archmage
118
119 // Darkfallen Advisor
122
123 // Vampiric Fiend
126
127 // Darkfallen Tactician
130
131 // Nerubar broodkeeper
135 SPELL_DARK_MENDING = 71020
137
182
188
195
203
210
211// 37119 - Highlord Tirion Fordring (At Light's Hammer)
213{
214 npc_highlord_tirion_fordring_lh(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript())
215 {
216 Initialize();
217 }
218
220 {
224 _damnedKills = 0;
225 }
226
227 void Reset() override
228 {
229 _events.Reset();
230 Initialize();
231 }
232
233 // IMPORTANT NOTE: This is triggered from per-GUID scripts
234 // of The Damned SAI
235 void SetData(uint32 type, uint32 data) override
236 {
237 if (type == DATA_DAMNED_KILLS && data == 1)
238 {
239 if (++_damnedKills == 2)
240 {
241 if (Creature* theLichKing = me->FindNearestCreature(NPC_THE_LICH_KING_LH, 150.0f))
242 {
243 if (Creature* bolvarFordragon = me->FindNearestCreature(NPC_HIGHLORD_BOLVAR_FORDRAGON_LH, 150.0f))
244 {
246 {
247 me->setActive(true);
248 me->SetFarVisible(true);
249 _theLichKing = theLichKing->GetGUID();
250 theLichKing->setActive(true);
251 theLichKing->SetFarVisible(true);
252 _bolvarFordragon = bolvarFordragon->GetGUID();
253 bolvarFordragon->setActive(true);
254 bolvarFordragon->SetFarVisible(true);
255 _factionNPC = factionNPC->GetGUID();
256 factionNPC->setActive(true);
257 factionNPC->SetFarVisible(true);
258 }
259 }
260 }
261
263 return;
264
277
279 {
286 }
287 else
288 {
296 }
297 }
298 }
299 }
300
301 void UpdateAI(uint32 diff) override
302 {
303 if (_damnedKills != 2)
304 return;
305
306 _events.Update(diff);
307
308 while (uint32 eventId = _events.ExecuteEvent())
309 {
310 switch (eventId)
311 {
314 break;
317 break;
320 break;
323 break;
324 case EVENT_LK_INTRO_1:
327 theLichKing->AI()->Talk(SAY_LK_INTRO_1);
328 break;
331 break;
332 case EVENT_LK_INTRO_2:
334 theLichKing->AI()->Talk(SAY_LK_INTRO_2);
335 break;
336 case EVENT_LK_INTRO_3:
338 theLichKing->AI()->Talk(SAY_LK_INTRO_3);
339 break;
340 case EVENT_LK_INTRO_4:
342 theLichKing->AI()->Talk(SAY_LK_INTRO_4);
343 break;
346 {
347 bolvarFordragon->AI()->Talk(SAY_BOLVAR_INTRO_1);
348 bolvarFordragon->setActive(false);
349 bolvarFordragon->SetFarVisible(false);
350 }
351 break;
352 case EVENT_LK_INTRO_5:
354 {
355 theLichKing->AI()->Talk(SAY_LK_INTRO_5);
356 theLichKing->setActive(false);
357 theLichKing->SetFarVisible(false);
358 }
359 break;
362 saurfang->AI()->Talk(SAY_SAURFANG_INTRO_1);
363 break;
366 break;
369 saurfang->AI()->Talk(SAY_SAURFANG_INTRO_2);
370 break;
373 saurfang->AI()->Talk(SAY_SAURFANG_INTRO_3);
374 break;
377 saurfang->AI()->Talk(SAY_SAURFANG_INTRO_4);
378 break;
382 factionNPC->GetMotionMaster()->MovePath((factionNPC->GetSpawnId() * 10) << 3, false);
383 me->setActive(false);
384 _damnedKills = 3;
385 break;
388 muradin->AI()->Talk(SAY_MURADIN_INTRO_1);
389 break;
392 muradin->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
393 break;
396 muradin->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
397 break;
400 break;
403 muradin->AI()->Talk(SAY_MURADIN_INTRO_2);
404 break;
407 muradin->AI()->Talk(SAY_MURADIN_INTRO_3);
408 break;
409 default:
410 break;
411 }
412 }
413 }
414
415private:
422};
423
425{
426public:
427 DeathPlagueTargetSelector(Unit* owner) : _me(owner) { }
428
429 bool operator()(Unit* unit) const
430 {
431 if (unit->GetTypeId() != TYPEID_PLAYER || _me->GetDistance(unit) > 100.0f)
432 return false;
433
434 if (_me->GetVictim() && _me->GetVictim()->GetGUID() == unit->GetGUID())
435 return false;
436
438 return false;
439
440 return true;
441 }
442private:
443 Unit const* _me;
444};
445
446// 38490, 38494 - Rotting Frost Giant
448{
449 npc_rotting_frost_giant(Creature* creature) : ScriptedAI(creature) { }
450
451 void Reset() override
452 {
453 _events.Reset();
457 }
458
459 void JustDied(Unit* /*killer*/) override
460 {
461 _events.Reset();
462 if (InstanceScript* instance = me->GetInstanceScript())
463 instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_DEATH_PLAGUE_AURA);
464 }
465
466 void UpdateAI(uint32 diff) override
467 {
468 if (!UpdateVictim())
469 return;
470
471 _events.Update(diff);
472
474 return;
475
476 while (uint32 eventId = _events.ExecuteEvent())
477 {
478 switch (eventId)
479 {
482 {
485 }
487 break;
488 case EVENT_STOMP:
491 break;
495 break;
496 default:
497 break;
498 }
499
501 return;
502 }
503 }
504
505private:
507};
508
509// 37744 - Frost Freeze Trap
511{
513 {
514 SetCombatMovement(false);
515 }
516
517 void DoAction(int32 action) override
518 {
519 switch (action)
520 {
521 case 1000:
522 case 11000:
524 break;
525 default:
526 break;
527 }
528 }
529
530 void UpdateAI(uint32 diff) override
531 {
532 _events.Update(diff);
533
535 {
538 }
539 }
540
541private:
543};
544
545// 38501 - Alchemist Adrianna
558
559// 30298 - Invisible Stalker (Float, Uninteractible, LargeAOI)
561{
562 public:
563 npc_arthas_teleport_visual() : CreatureScript("npc_arthas_teleport_visual") { }
564
566 {
567 npc_arthas_teleport_visualAI(Creature* creature) : NullCreatureAI(creature), _instance(creature->GetInstanceScript())
568 {
569 }
570
579
580 void UpdateAI(uint32 diff) override
581 {
582 if (_events.Empty())
583 return;
584
585 _events.Update(diff);
586
588 {
591 }
592 }
593
594 private:
597 };
598
599 CreatureAI* GetAI(Creature* creature) const override
600 {
601 // Distance from the center of the spire
602 if (creature->GetExactDist2d(4357.052f, 2769.421f) < 100.0f && creature->GetHomePosition().GetPositionZ() < 315.0f)
603 return GetIcecrownCitadelAI<npc_arthas_teleport_visualAI>(creature);
604
605 // Default to no script
606 return nullptr;
607 }
608};
609
610// 39371 - King Varian Wrynn
611// 39372 - Garrosh Hellscream
613{
615
616 bool OnGossipSelect(Player* /*player*/, uint32 menuId, uint32 /*gossipListId*/) override
617 {
618 if (menuId == GOSSIP_MENUID_ALLY || menuId == GOSSIP_MENUID_HORDE)
619 if (InstanceScript* instance = me->GetInstanceScript())
620 instance->SetData(DATA_FACTION_BUFF, 0);
621 return false;
622 }
623};
624
626{
627public:
628 ICCOrbControllerMinionSearch(Unit* owner, bool checkCasting) : _owner(owner), _checkCasting(checkCasting) { }
629
630 bool operator()(Creature* target) const
631 {
632 if (!target->IsAlive() || (_checkCasting && target->HasUnitState(UNIT_STATE_CASTING)) || target->GetWaypointPathId() || _owner->GetDistance(target) > 10.0f)
633 return false;
634
635 switch (target->GetEntry())
636 {
642 return true;
643 default:
644 return false;
645 }
646 }
647
648private:
649 // Need check to not use polymorph in a casting creature
652};
653
663
664// 38463 - Empowering Orb Visual Stalker
666{
667 npc_icc_orb_controller(Creature* creature) : ScriptedAI(creature), _isInCombat(false), _isLongRepeat(false) { }
668
669 void Reset() override
670 {
671 _scheduler.Schedule(1s, [this](TaskContext const& /*initialize*/)
672 {
673 std::vector<Creature*> creatures;
674 ICCOrbControllerMinionSearch check(me, false);
676 Cell::VisitGridObjects(me, searcher, 10.0f);
677
678 if (creatures.empty())
679 return;
680
681 for (Creature* creature : creatures)
682 {
683 creature->AI()->SetGUID(me->GetGUID(), DATA_GUID);
684 _minionGuids.push_back(creature->GetGUID());
685 }
686
688 });
689 }
690
691 void ScheduleVisualChannel(bool evading)
692 {
693 _scheduler.Schedule(evading ? 5s : 1s, [this](TaskContext& visual)
694 {
696 if (Unit* minion = ObjectAccessor::GetUnit(*me, guid))
697 minion->CastSpell(nullptr, SPELL_BLOOD_ORB_VISUAL);
698 visual.Repeat(_isLongRepeat ? 21s : 3s);
700 });
701 }
702
704 {
705 for (GuidVector::iterator itr = _minionGuids.begin(); itr != _minionGuids.end();)
706 {
707 if (Unit* minion = ObjectAccessor::GetUnit(*me, (*itr)))
708 {
709 if (!minion->IsAlive())
710 {
711 itr = _minionGuids.erase(itr);
712 continue;
713 }
714
715 ++itr;
716 }
717 // Is not in world anymore
718 else
719 itr = _minionGuids.erase(itr);
720 }
721 }
722
723 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
724 {
725 if (spellInfo->Id == SPELL_ORB_CONTROLLER_ACTIVE)
727 orb->AI()->SetGUID(caster->GetGUID(), DATA_GUID);
728 }
729
730 void SetGUID(ObjectGuid const& guid, int32 id) override
731 {
732 if (id != ACTION_COMBAT || _isInCombat)
733 return;
734
735 Creature* darkfallen = ObjectAccessor::GetCreature(*me, guid);
736 if (!darkfallen)
737 return;
738
739 _isInCombat = true;
741 if (_minionGuids.empty())
742 return;
743
744 for (ObjectGuid guid : _minionGuids)
745 {
746 if (Creature* minion = ObjectAccessor::GetCreature(*me, guid))
747 if (minion->IsAIEnabled() && !minion->IsInCombat())
748 minion->AI()->DoZoneInCombat(darkfallen);
749 }
750
752 minion->CastSpell(nullptr, SPELL_SIPHON_ESSENCE);
753 }
754
755 void DoAction(int32 action) override
756 {
757 if (action == ACTION_EVADE && _isInCombat)
758 {
759 _isInCombat = false;
763 orb->SetFlag(GO_FLAG_NOT_SELECTABLE);
764 }
765 }
766
767 void UpdateAI(uint32 diff) override
768 {
769 _scheduler.Update(diff);
770 }
771
772private:
777};
778
780{
781 DarkFallenAI(Creature* creature) : ScriptedAI(creature), IsDoingEmotes(true), AttackSpellId(0) { }
782
783 virtual void ScheduleSpells() = 0;
784
785 void Reset() override
786 {
787 IsDoingEmotes = me->GetWaypointPathId() ? false : true;
790 {
792 })
793 .Schedule(1s, 10s, [this](TaskContext& emote)
794 {
795 if (!IsDoingEmotes)
796 return;
797
798 if (roll_chance(20))
799 {
800 std::vector<Creature*> creatures;
801 ICCOrbControllerMinionSearch check(me, true);
803 Cell::VisitGridObjects(me, searcher, 10.0f);
804 if (!creatures.empty())
805 {
807 DoCast(friendly, SPELL_POLYMORPH_ALLY);
808 }
809 }
810 emote.Schedule(1s, [this](TaskContext& /*emote*/)
811 {
813 });
814 emote.Repeat(15s, 30s);
815 });
816 }
817
818 void JustEngagedWith(Unit* /*who*/) override
819 {
820 IsDoingEmotes = false;
823 if (Unit* trigger = ObjectAccessor::GetUnit(*me, TriggerGuid))
824 trigger->GetAI()->SetGUID(me->GetGUID(), ACTION_COMBAT);
825 }
826
827 void DoAction(int32 action) override
828 {
829 if (action == ACTION_SIPHON_INTERRUPTED)
831 orb->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
832 }
833
834 void SetGUID(ObjectGuid const& guid, int32 id) override
835 {
836 if (id == DATA_GUID)
837 TriggerGuid = guid;
838 }
839
840 void EnterEvadeMode(EvadeReason why) override
841 {
843 if (Unit* trigger = ObjectAccessor::GetUnit(*me, TriggerGuid))
844 trigger->GetAI()->DoAction(ACTION_EVADE);
845 }
846
847 void UpdateAI(uint32 diff) override
848 {
849 if (!UpdateVictim() && !IsDoingEmotes)
850 return;
851
852 Scheduler.Update(diff);
853
854 if (AttackSpellId)
856 }
857
858protected:
863};
864
865// 37595 - Darkfallen Blood Knight
867{
869
870 void ScheduleSpells() override
871 {
872 Scheduler.Schedule(500ms, [this](TaskContext const& /*context*/)
873 {
875 })
876 .Schedule(8s, [this](TaskContext& unholyStrike)
877 {
879 unholyStrike.Repeat(8s, 9s);
880 })
881 .Schedule(6s, [this](TaskContext& bloodMirror)
882 {
884 bloodMirror.Repeat(34s);
885 });
886 }
887};
888
889// 37663 - Darkfallen Noble
891{
893 {
894 me->SetCanMelee(false); // DoSpellAttackIfReady
895 }
896
897 void ScheduleSpells() override
898 {
900 Scheduler.Schedule(500ms, [this](TaskContext const& /*context*/)
901 {
902 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false, -SPELL_CHAINS_OF_SHADOW))
904 })
905 .Schedule(11s, [this](TaskContext& summonVampiric)
906 {
907 // Vampiric should be summoned by 70647 but i have no idea what is miscB of summon effect
908 if (Unit* target = me->GetVictim())
909 if (Creature* vampiric = me->SummonCreature(NPC_VAMPIRIC_FIEND, target->GetPosition(), TEMPSUMMON_CORPSE_DESPAWN))
910 vampiric->AI()->AttackStart(target);
911 summonVampiric.Repeat(30s);
912 });
913 }
914};
915
916// 37901 - Vampiric Fiend
918{
919 npc_vampiric_fiend(Creature* creature) : ScriptedAI(creature) { }
920
921 void JustEngagedWith(Unit* /*who*/) override
922 {
924 _scheduler.Schedule(9s, [this](TaskContext const& /*leechingRoot*/)
925 {
927 })
928 .Schedule(38s, [this](TaskContext const& /*leechingRoot*/)
929 {
931 });
932 }
933
934 void EnterEvadeMode(EvadeReason /*why*/) override
935 {
938 }
939
940 void UpdateAI(uint32 diff) override
941 {
942 if (!UpdateVictim())
943 return;
944
945 _scheduler.Update(diff);
946 }
947
948private:
950};
951
952// 37664 - Darkfallen Archmage
954{
956 {
957 me->SetCanMelee(false); // DoSpellAttackIfReady
958 }
959
960 void ScheduleSpells() override
961 {
963 Scheduler.Schedule(1s, [this](TaskContext& amplifyMagic)
964 {
967 amplifyMagic.Repeat(15s, 24s);
968 })
969 .Schedule(10s, [this](TaskContext& blastWave)
970 {
972 blastWave.Repeat(25s, 30s);
973 })
974 .Schedule(17s, [this](TaskContext& polymorph)
975 {
976 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false, -SPELL_POLYMORPH))
977 DoCast(target, SPELL_POLYMORPH);
978 polymorph.Repeat(25s, 35s);
979 });
980 }
981};
982
983// 37571 - Darkfallen Advisor
985{
987
988 void ScheduleSpells() override
989 {
990 Scheduler.Schedule(8s, [this](TaskContext& lichSlap)
991 {
993 lichSlap.Repeat(12s);
994 })
995 .Schedule(50s, [this](TaskContext& immunity)
996 {
997 if (Unit* target = DoSelectLowestHpFriendly(40.0f))
999 immunity.Repeat(20s, 25s);
1000 });
1001 }
1002};
1003
1004// 37666 - Darkfallen Tactician
1006{
1008
1009 void ScheduleSpells() override
1010 {
1011 Scheduler.Schedule(8s, [this](TaskContext& unholyStrike)
1012 {
1014 unholyStrike.Repeat(8s, 11s);
1015 })
1016 .Schedule(10s, [this](TaskContext& shadowStep)
1017 {
1018 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
1019 {
1020 DoCast(target, SPELL_SHADOWSTEP);
1021 DoCast(target, SPELL_BLOOD_SAP);
1022 }
1023 shadowStep.Repeat(20s);
1024 });
1025 }
1026};
1027
1028// 36725 - Nerub'ar Broodkeeper
1030{
1032
1033 // We set the anim tier and flags manually because we don't need them anymore once the spiders are down
1034 void InitializeAI() override
1035 {
1036 me->SetDisableGravity(true);
1037 me->SetImmuneToAll(true);
1039 }
1040
1041 void Reset() override
1042 {
1043 _events.Reset();
1044 }
1045
1052
1053 void DoAction(int32 action) override
1054 {
1055 if (action != ACTION_NERUBAR_FALL)
1056 return;
1057
1059 float x, y, z;
1060 me->GetPosition(x, y);
1061 z = me->GetFloorZ();
1062 me->SetHomePosition(x, y, z, me->GetOrientation());
1063
1066 }
1067
1068 void MovementInform(uint32 type, uint32 id) override
1069 {
1070 if (type == EFFECT_MOTION_TYPE && id == POINT_LAND)
1071 {
1072 me->SetImmuneToAll(false);
1073 me->SetDisableGravity(false);
1074 }
1075 }
1076
1077 void UpdateAI(uint32 diff) override
1078 {
1079 if (!UpdateVictim())
1080 return;
1081
1082 _events.Update(diff);
1083
1085 return;
1086
1087 while (uint32 eventId = _events.ExecuteEvent())
1088 {
1089 switch (eventId)
1090 {
1093 _events.Repeat(4s, 10s);
1094 break;
1095 case EVENT_DARK_MENDING:
1096 {
1097 // Select a friendly target between 1% and 75% hp
1098 Unit* target = nullptr;
1099 Trinity::MostHPPercentMissingInRange u_check(me, 40.0f, 1, 75);
1101 Cell::VisitGridObjects(me, searcher, 40.0f);
1102
1103 if (target)
1104 DoCast(target, SPELL_DARK_MENDING);
1105 _events.Repeat(3s, 10s);
1106 break;
1107 }
1108 case EVENT_WEB_WRAP:
1109 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f))
1110 DoCast(target, SPELL_WEB_WRAP);
1111 _events.Repeat(16s, 20s);
1112 break;
1113 default:
1114 break;
1115 }
1116
1118 return;
1119 }
1120 }
1121
1122private:
1124};
1125
1126// 201741 - Empowering Blood Orb
1128{
1130
1131 void Reset() override
1132 {
1134 _triggerGuid = trigger->GetGUID();
1135 }
1136
1137 bool OnGossipHello(Player* player) override
1138 {
1139 me->CastSpell(player, SPELL_EMPOWERED_BLOOD, true);
1141 return true;
1142 }
1143
1145 {
1147 me->SetGoAnimProgress(255);
1150 trigger->DespawnOrUnsummon();
1151 _scheduler.Schedule(3s, [this](TaskContext const& /*context*/)
1152 {
1153 me->Delete();
1154 });
1155 }
1156
1157 void SetGUID(ObjectGuid const& guid, int32 id) override
1158 {
1159 if (id == DATA_GUID)
1160 {
1161 if (Unit* target = ObjectAccessor::GetUnit(*me, guid))
1162 me->CastSpell(target, SPELL_EMPOWERED_BLOOD_3, true);
1164 }
1165 }
1166
1167 void UpdateAI(uint32 diff) override
1168 {
1169 _scheduler.Update(diff);
1170 }
1171
1172private:
1175};
1176
1177// 70227 - Empowered Blood
1201
1202// 70304 - Empowered Blood
1226
1227// 70299 - Siphon Essence
1229{
1230 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1231 {
1232 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_CANCEL && GetTarget()->IsAIEnabled())
1234 }
1235
1240};
1241
1242// 70450 - Blood Mirror
1244{
1245 bool Validate(SpellInfo const* /*spell*/) override
1246 {
1248 }
1249
1250 void FilterTargets(std::list<WorldObject*>& targets)
1251 {
1252 targets.remove_if([](WorldObject* target)
1253 {
1254 return target->GetTypeId() != TYPEID_PLAYER;
1255 });
1256
1257 if (targets.size() < 2)
1258 return;
1259
1260 _targets = targets;
1262 }
1263
1264 void HandleMirror(SpellEffIndex /*effIndex*/)
1265 {
1266 if (_targets.empty())
1267 return;
1268
1269 Unit* caster = GetCaster();
1270 WorldObject* target = _targets.front();
1271 WorldObject* mirror = _targets.back();
1272
1273 caster->CastSpell(target, SPELL_BLOOD_MIRROR_2, true);
1274 target->CastSpell(mirror, SPELL_BLOOD_MIRROR_DAMAGE_SHARE, true);
1275 }
1276
1282
1283private:
1284 std::list<WorldObject*> _targets;
1285};
1286
1287// 72131 - Remove Empowered Blood
1288// 70939 - Blood Queen Lana'thel - Clear all Status Ailments
1306
1307// 70733 - Stoneform
1309{
1310 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1311 {
1312 if (Creature* target = GetTarget()->ToCreature())
1313 {
1314 target->SetReactState(REACT_PASSIVE);
1315 target->SetUninteractible(true);
1316 target->SetImmuneToPC(true);
1317 target->SetEmoteState(EMOTE_STATE_CUSTOM_SPELL_02);
1318 }
1319 }
1320
1321 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1322 {
1323 if (Creature* target = GetTarget()->ToCreature())
1324 {
1325 target->SetReactState(REACT_AGGRESSIVE);
1326 target->SetUninteractible(false);
1327 target->SetImmuneToPC(false);
1328 target->SetEmoteState(EMOTE_ONESHOT_NONE);
1329 }
1330 }
1331
1337};
1338
1339// 70536, 70545, 70546, 70547 - Spirit Alarm
1341{
1343 {
1344 PreventHitDefaultEffect(effIndex);
1345 uint32 trapId = 0;
1346 switch (GetEffectInfo().MiscValue)
1347 {
1349 trapId = GO_SPIRIT_ALARM_1;
1350 break;
1352 trapId = GO_SPIRIT_ALARM_2;
1353 break;
1355 trapId = GO_SPIRIT_ALARM_3;
1356 break;
1358 trapId = GO_SPIRIT_ALARM_4;
1359 break;
1360 default:
1361 return;
1362 }
1363
1364 if (GameObject* trap = GetGObjCaster()->FindNearestGameObject(trapId, 5.0f))
1365 trap->SetRespawnTime(trap->GetGOInfo()->GetAutoCloseTime() / IN_MILLISECONDS);
1366
1367 std::list<Creature*> wards;
1370 for (std::list<Creature*>::iterator itr = wards.begin(); itr != wards.end(); ++itr)
1371 {
1372 if ((*itr)->IsAlive() && (*itr)->HasAura(SPELL_STONEFORM))
1373 {
1374 (*itr)->AI()->Talk(SAY_TRAP_ACTIVATE);
1375 (*itr)->RemoveAurasDueToSpell(SPELL_STONEFORM);
1376 if (Unit* target = (*itr)->SelectNearestTarget(150.0f))
1377 (*itr)->AI()->AttackStart(target);
1378 break;
1379 }
1380 }
1381 }
1382
1387};
1388
1389// 72864 - Death Plague
1391{
1392 bool Validate(SpellInfo const* /*spell*/) override
1393 {
1395 }
1396
1397 // Damage Effect count
1398 void CountTargets(std::list<WorldObject*>& targets)
1399 {
1400 _sharedList = targets;
1401 _failed = targets.empty();
1402 }
1403
1404 // Filter targets to jump
1405 void FilterTargets(std::list<WorldObject*>& targets)
1406 {
1407 targets = _sharedList;
1408 targets.remove_if([](WorldObject* obj) -> bool
1409 {
1410 Unit* object = obj->ToUnit();
1411
1412 if (!object || object->GetTypeId() != TYPEID_PLAYER)
1413 return true;
1414
1416 return true;
1417
1418 return false;
1419 });
1420 }
1421
1423 {
1424 PreventHitDefaultEffect(effIndex);
1425 Unit* caster = GetCaster();
1426 caster->CastSpell(GetHitUnit(), SPELL_DEATH_PLAGUE, true);
1427 caster->CastSpell(caster, SPELL_RECENTLY_INFECTED, true);
1428 }
1429
1431 {
1432 if (_failed)
1433 {
1434 Unit* caster = GetCaster();
1435 caster->CastSpell(caster, SPELL_DEATH_PLAGUE_KILL, true);
1436 }
1437 }
1438
1446
1447private:
1448 bool _failed = false;
1449 std::list<WorldObject*> _sharedList;
1450};
1451
1452// 72155, 72162 - Harvest Blight Specimen
1472
1473// 72585 - Soul Missile
1475{
1476 static void RelocateDest(SpellScript const&, SpellDestination& dest)
1477 {
1478 static constexpr Position offset = { 0.0f, 0.0f, 200.0f, 0.0f };
1479 dest.RelocateOffset(offset);
1480 }
1481
1486};
1487
1489 : SpellScript(), _triggerId(triggerId), _triggerFlags(triggerFlags)
1490{
1491}
1492
1494{
1495 return ValidateSpellInfo({ _triggerId });
1496}
1497
1502
1507
1509{
1510 public:
1511 at_icc_saurfang_portal() : AreaTriggerScript("at_icc_saurfang_portal") { }
1512
1513 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1514 {
1515 InstanceScript* instance = player->GetInstanceScript();
1516 if (!instance || instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE)
1517 return true;
1518
1519 player->TeleportTo(631, 4126.35f, 2769.23f, 350.963f, 0.0f);
1520
1521 if (instance->GetData(DATA_COLDFLAME_JETS) == NOT_STARTED)
1522 {
1523 // Process relocation now, to preload the grid and initialize traps
1524 player->GetMap()->PlayerRelocation(player, 4126.35f, 2769.23f, 350.963f, 0.0f);
1525
1527 std::list<Creature*> traps;
1529 traps.sort(Trinity::ObjectDistanceOrderPred(player));
1530 bool instant = false;
1531 for (std::list<Creature*>::iterator itr = traps.begin(); itr != traps.end(); ++itr)
1532 {
1533 (*itr)->AI()->DoAction(instant ? 1000 : 11000);
1534 instant = !instant;
1535 }
1536 }
1537
1538 return true;
1539 }
1540};
1541
1543{
1544 public:
1545 at_icc_shutdown_traps() : AreaTriggerScript("at_icc_shutdown_traps") { }
1546
1547 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1548 {
1549 if (InstanceScript* instance = player->GetInstanceScript())
1550 instance->SetData(DATA_UPPERSPIRE_TELE_ACT, DONE);
1551
1552 return true;
1553 }
1554};
1555
1557{
1558 public:
1559 at_icc_nerubar_broodkeeper() : OnlyOnceAreaTriggerScript("at_icc_nerubar_broodkeeper") { }
1560
1561 bool TryHandleOnce(Player* player, AreaTriggerEntry const* areaTrigger) override
1562 {
1563 if (InstanceScript* instance = player->GetInstanceScript())
1564 {
1565 if (player->IsGameMaster())
1566 return false;
1567
1568 instance->SetData(DATA_NERUBAR_BROODKEEPER_EVENT, areaTrigger->ID);
1569 }
1570 return true;
1571 }
1572};
1573
1575{
1576 // Creatures
1591
1592 // GameObjects
1594
1595 // Spells
1606
1607 // AreaTriggers
1611}
@ IN_MILLISECONDS
Definition Common.h:38
int32_t int32
Definition Define.h:150
uint16_t uint16
Definition Define.h:155
uint32_t uint32
Definition Define.h:154
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:24
@ IN_PROGRESS
@ DONE
@ NOT_STARTED
@ EFFECT_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
@ TEMPSUMMON_CORPSE_DESPAWN
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
std::vector< ObjectGuid > GuidVector
Definition ObjectGuid.h:434
bool roll_chance(float chance, PseudoRandomDistributionState &state)
Definition Random.cpp:131
#define RegisterGameObjectAI(ai_name)
Definition ScriptMgr.h:1410
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SEND_EVENT
@ SPELL_EFFECT_QUEST_COMPLETE
@ TARGET_UNIT_SRC_AREA_ALLY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ TARGET_DEST_CASTER
@ EMOTE_STATE_CUSTOM_SPELL_03
@ EMOTE_ONESHOT_NO
@ EMOTE_ONESHOT_POINT_NO_SHEATHE
@ EMOTE_ONESHOT_YES
@ EMOTE_ONESHOT_EXCLAMATION
@ EMOTE_ONESHOT_QUESTION
@ EMOTE_ONESHOT_LAUGH
@ EMOTE_ONESHOT_NONE
@ EMOTE_ONESHOT_TALK
@ EMOTE_STATE_CUSTOM_SPELL_02
@ HORDE
@ GO_FLAG_NOT_SELECTABLE
@ GO_FLAG_IN_USE
@ GO_STATE_DESTROYED
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_CANCEL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_MOD_ROOT
TriggerCastFlags
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define SpellCastFn(F)
#define SpellDestinationTargetSelectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define SpellHitFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
EvadeReason
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_STATE_CASTING
Definition Unit.h:290
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
Unit * GetTarget() const
HookList< EffectApplyHandler > OnEffectRemove
HookList< EffectApplyHandler > OnEffectApply
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
TypeID GetTypeId() const
Definition BaseEntity.h:166
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:394
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition Creature.h:396
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
uint32 GetWaypointPathId() const
Definition Creature.h:404
void SetImmuneToAll(bool apply) override
Definition Creature.h:187
bool operator()(Unit *unit) const
void Update(uint32 time)
Definition EventMap.h:77
bool Empty() const
Definition EventMap.h:105
void Repeat(Milliseconds time)
Definition EventMap.cpp:67
EventId ExecuteEvent()
Definition EventMap.cpp:77
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:40
void Reset()
Definition EventMap.cpp:25
GameObject *const me
void SetGoState(GOState state)
void SetGoAnimProgress(uint8 animprogress)
Definition GameObject.h:297
void SetFlag(GameObjectFlags flags)
Definition GameObject.h:283
bool operator()(Creature *target) const
ICCOrbControllerMinionSearch(Unit *owner, bool checkCasting)
EncounterState GetBossState(uint32 id) const
void PlayerRelocation(Player *, float x, float y, float z, float orientation)
Definition Map.cpp:1031
void MoveLand(uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void Clear()
Definition ObjectGuid.h:329
uint32 GetEntry() const
Definition Object.h:89
Unit * ToUnit()
Definition Object.h:116
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, TeleportToOptions options=TELE_TO_NONE, Optional< uint32 > instanceId={}, uint32 teleportSpellId=0)
Definition Player.cpp:1181
bool IsGameMaster() const
Definition Player.h:1293
uint32 const Id
Definition SpellInfo.h:328
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
HookList< CastHandler > AfterCast
Unit * GetCaster() const
HookList< HitHandler > AfterHit
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
int32 GetEffectValueAsInt() const
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
HookList< EffectHandler > OnEffectLaunch
GameObject * GetGObjCaster() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
TaskContext & Schedule(TaskScheduler::duration_t time, TaskScheduler::task_handler_t task)
TaskContext & Repeat(TaskScheduler::duration_t duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
TaskScheduler & Update()
Update the scheduler to the current time.
bool DoSpellAttackIfReady(uint32 spellId)
Definition UnitAI.cpp:53
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
virtual void DoAction(int32 param)
Definition UnitAI.h:73
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:172
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:71
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:162
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:81
Definition Unit.h:647
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
Definition Unit.cpp:3268
MotionMaster * GetMotionMaster()
Definition Unit.h:1750
bool IsAlive() const
Definition Unit.h:1205
UnitAI * GetAI() const
Definition Unit.h:680
void SetEmoteState(Emote emote)
Definition Unit.h:880
Unit * GetVictim() const
Definition Unit.h:738
bool HasUnitState(const uint32 f) const
Definition Unit.h:755
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4822
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition Unit.cpp:1662
bool SetDisableGravity(bool disable, bool updateAnimTier=true, bool updatePlayHoverAnim=true)
Definition Unit.cpp:13440
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3992
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition Object.cpp:1544
Map * GetMap() const
Definition Object.h:411
InstanceScript * GetInstanceScript() const
Definition Object.cpp:394
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition Object.cpp:2663
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2222
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:1403
void setActive(bool isActiveObject)
Definition Object.cpp:274
float GetFloorZ() const
Definition Object.cpp:3109
void SetFarVisible(bool on)
Definition Object.cpp:325
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:1522
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:430
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:99
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:100
bool TryHandleOnce(Player *player, AreaTriggerEntry const *areaTrigger) override
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
CreatureAI * GetAI(Creature *creature) const override
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
std::list< WorldObject * > _targets
void CountTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
std::list< WorldObject * > _sharedList
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void HandleScript(SpellEffIndex effIndex)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
static void RelocateDest(SpellScript const &, SpellDestination &dest)
void HandleEvent(SpellEffIndex effIndex)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *spell) override
spell_trigger_spell_from_caster(uint32 triggerId, TriggerCastFlags triggerFlags=TRIGGERED_FULL_MASK)
@ DATA_TEAM_IN_INSTANCE
@ EVENT_AWAKEN_WARD_4
@ EVENT_AWAKEN_WARD_1
@ EVENT_AWAKEN_WARD_3
@ EVENT_AWAKEN_WARD_2
@ EVENT_LK_INTRO_4
@ EVENT_MURADIN_INTRO_5
@ EVENT_SAURFANG_INTRO_2
@ EVENT_TIRION_INTRO_A_7
@ EVENT_TIRION_INTRO_2
@ EVENT_SAURFANG_RUN
@ EVENT_TIRION_INTRO_H_7
@ EVENT_SAURFANG_INTRO_4
@ EVENT_LK_INTRO_1
@ EVENT_ACTIVATE_TRAP
@ EVENT_MURADIN_INTRO_3
@ EVENT_MURADIN_INTRO_2
@ EVENT_MURADIN_RUN
@ EVENT_BOLVAR_INTRO_1
@ EVENT_MURADIN_INTRO_1
@ EVENT_LK_INTRO_5
@ EVENT_DARK_MENDING
@ EVENT_LK_INTRO_2
@ EVENT_STOMP
@ EVENT_TIRION_INTRO_6
@ EVENT_TIRION_INTRO_3
@ EVENT_SAURFANG_INTRO_3
@ EVENT_SOUL_MISSILE
@ EVENT_CRYPT_SCARABS
@ EVENT_MURADIN_INTRO_4
@ EVENT_LK_INTRO_3
@ EVENT_TIRION_INTRO_5
@ EVENT_ARCTIC_BREATH
@ EVENT_WEB_WRAP
@ EVENT_SAURFANG_INTRO_1
@ EVENT_TIRION_INTRO_4
@ EVENT_DEATH_PLAGUE
void AddSC_icecrown_citadel()
static Emote const DarkFallensEmotes[]
@ ACTION_EVADE
@ ACTION_COMBAT
@ ACTION_SIPHON_INTERRUPTED
@ DATA_DAMNED_KILLS
@ DATA_GUID
@ SPELL_STOMP
@ SPELL_SHADOWSTEP
@ SPELL_BLOOD_MIRROR
@ SPELL_CRYPT_SCARABS
@ SPELL_HARVEST_BLIGHT_SPECIMEN
@ SPELL_AMPLIFY_MAGIC
@ SPELL_POLYMORPH_ALLY
@ SPELL_BLOOD_SAP
@ SPELL_COLDFLAME_JETS
@ SPELL_HARVEST_BLIGHT_SPECIMEN25
@ SPELL_CHAINS_OF_SHADOW
@ SPELL_ORB_CONTROLLER_ACTIVE
@ SPELL_DARK_MENDING
@ SPELL_RECENTLY_INFECTED
@ SPELL_SHROUD_OF_SPELL_WARDING
@ SPELL_DEATH_PLAGUE
@ SPELL_BLOOD_MIRROR_2
@ SPELL_BLAST_WAVE
@ SPELL_WEB_WRAP
@ SPELL_UNHOLY_STRIKE
@ SPELL_FIREBALL
@ SPELL_EMPOWERED_BLOOD_3
@ SPELL_SHADOW_BOLT
@ SPELL_LICH_SLAP
@ SPELL_EMPOWERED_BLOOD_2
@ SPELL_DISEASE_CLOUD
@ SPELL_WEB_BEAM
@ SPELL_DEATH_PLAGUE_KILL
@ SPELL_BLOOD_ORB_VISUAL
@ SPELL_SOUL_MISSILE
@ SPELL_VAMPIRIC_AURA
@ SPELL_ARCTIC_BREATH
@ SPELL_DEATH_PLAGUE_AURA
@ SPELL_POLYMORPH
@ SPELL_BLOOD_MIRROR_DAMAGE_SHARE
@ SPELL_SIPHON_ESSENCE
@ SPELL_LEECHING_ROOT
@ SPELL_EMPOWERED_BLOOD_4
@ GOSSIP_MENUID_ALLY
@ GOSSIP_MENUID_HORDE
@ POINT_LAND
@ SAY_LK_INTRO_2
@ SAY_SAURFANG_INTRO_4
@ SAY_TIRION_INTRO_H_5
@ EMOTE_DEATH_PLAGUE_WARNING
@ SAY_MURADIN_INTRO_2
@ SAY_TRAP_ACTIVATE
@ SAY_SAURFANG_INTRO_3
@ SAY_TIRION_INTRO_A_5
@ SAY_MURADIN_INTRO_3
@ SAY_TIRION_INTRO_4
@ SAY_SAURFANG_INTRO_1
@ SAY_SAURFANG_INTRO_2
@ SAY_LK_INTRO_1
@ SAY_LK_INTRO_3
@ SAY_TIRION_INTRO_3
@ SAY_MURADIN_INTRO_1
@ SAY_LK_INTRO_4
@ SAY_TIRION_INTRO_2
@ SAY_TIRION_INTRO_1
@ SAY_BOLVAR_INTRO_1
@ SAY_LK_INTRO_5
@ SPELL_GREEN_BLIGHT_RESIDUE
@ SPELL_ORANGE_BLIGHT_RESIDUE
@ SPELL_EMPOWERED_BLOOD
@ SPELL_STONEFORM
#define RegisterIcecrownCitadelCreatureAI(ai_name)
@ GO_SPIRIT_ALARM_1
@ GO_SPIRIT_ALARM_3
@ GO_SPIRIT_ALARM_2
@ GO_EMPOWERING_BLOOD_ORB
@ GO_SPIRIT_ALARM_4
@ ACTION_NERUBAR_FALL
@ DATA_DEATHBRINGER_SAURFANG
@ DATA_FACTION_BUFF
@ DATA_SINDRAGOSA
@ DATA_UPPERSPIRE_TELE_ACT
@ DATA_COLDFLAME_JETS
@ DATA_BLOOD_QUEEN_LANA_THEL
@ DATA_PROFESSOR_PUTRICIDE
@ DATA_NERUBAR_BROODKEEPER_EVENT
@ NPC_DARKFALLEN_TACTICIAN
@ NPC_ORB_VISUAL_STALKER
@ NPC_VAMPIRIC_FIEND
@ NPC_FROST_FREEZE_TRAP
@ NPC_DARKFALLEN_BLOOD_KNIGHT
@ NPC_HIGHLORD_BOLVAR_FORDRAGON_LH
@ NPC_DARKFALLEN_ADVISOR
@ NPC_SE_HIGH_OVERLORD_SAURFANG
@ NPC_DARKFALLEN_ARCHMAGE
@ NPC_THE_LICH_KING_LH
@ NPC_SE_MURADIN_BRONZEBEARD
@ NPC_DARKFALLEN_NOBLE
@ NPC_DEATHBOUND_WARD
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> std::add_const_t< decltype(*std::ranges::begin(container))> &
Definition Containers.h:110
void RandomResize(C &container, std::size_t requestedSize)
Definition Containers.h:67
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius)
Definition CellImpl.h:140
DarkFallenAI(Creature *creature)
void JustEngagedWith(Unit *) override
void EnterEvadeMode(EvadeReason why) override
TaskScheduler Scheduler
void UpdateAI(uint32 diff) override
void SetGUID(ObjectGuid const &guid, int32 id) override
void DoAction(int32 action) override
ObjectGuid TriggerGuid
void Reset() override
virtual void ScheduleSpells()=0
float GetExactDist2d(const float x, const float y) const
Definition Position.h:117
constexpr void GetPosition(float &x, float &y) const
Definition Position.h:92
constexpr float GetOrientation() const
Definition Position.h:90
void SetCombatMovement(bool allowMovement)
Unit * DoSelectLowestHpFriendly(float range, uint32 minHPDiff=1)
void RelocateOffset(Position const &offset)
Definition Spell.cpp:90
void UpdateAI(uint32 diff) override
go_empowering_blood_orb(GameObject *go)
void SetGUID(ObjectGuid const &guid, int32 id) override
bool OnGossipHello(Player *player) override
npc_alchemist_adrianna(Creature *creature)
bool OnGossipHello(Player *player) override
npc_darkfallen_advisor(Creature *creature)
npc_darkfallen_archmage(Creature *creature)
npc_darkfallen_blood_knight(Creature *creature)
void ScheduleSpells() override
npc_darkfallen_noble(Creature *creature)
npc_darkfallen_tactician(Creature *creature)
bool OnGossipSelect(Player *, uint32 menuId, uint32) override
npc_entrance_faction_leader(Creature *creature)
void DoAction(int32 action) override
npc_frost_freeze_trap(Creature *creature)
void UpdateAI(uint32 diff) override
void SetData(uint32 type, uint32 data) override
void UpdateAI(uint32 diff) override
npc_highlord_tirion_fordring_lh(Creature *creature)
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
void JustEngagedWith(Unit *) override
void DoAction(int32 action) override
npc_icc_nerubar_broodkeeper(Creature *creature)
void SetGUID(ObjectGuid const &guid, int32 id) override
void DoAction(int32 action) override
void UpdateAI(uint32 diff) override
void ScheduleVisualChannel(bool evading)
npc_icc_orb_controller(Creature *creature)
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
void UpdateAI(uint32 diff) override
npc_rotting_frost_giant(Creature *creature)
void JustDied(Unit *) override
npc_vampiric_fiend(Creature *creature)
void JustEngagedWith(Unit *) override
void UpdateAI(uint32 diff) override
void EnterEvadeMode(EvadeReason) override