TrinityCore
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
139{
140 // Light's Hammer RP
165
166 // Nerub'ar Broodkeeper
170
171 // Rotting Frost Giant
175
176 // Frost Freeze Trap
178
179 // Invisible Stalker (Float, Uninteractible, LargeAOI)
181};
182
184{
188
190{
195
197{
202};
203
205{
209};
210
211// 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
447{
448 npc_rotting_frost_giant(Creature* creature) : ScriptedAI(creature) { }
449
450 void Reset() override
451 {
452 _events.Reset();
456 }
457
458 void JustDied(Unit* /*killer*/) override
459 {
460 _events.Reset();
461 if (InstanceScript* instance = me->GetInstanceScript())
462 instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_DEATH_PLAGUE_AURA);
463 }
464
465 void UpdateAI(uint32 diff) override
466 {
467 if (!UpdateVictim())
468 return;
469
470 _events.Update(diff);
471
473 return;
474
475 while (uint32 eventId = _events.ExecuteEvent())
476 {
477 switch (eventId)
478 {
481 {
484 }
486 break;
487 case EVENT_STOMP:
490 break;
494 break;
495 default:
496 break;
497 }
498
500 return;
501 }
502 }
503
504private:
506};
507
509{
511 {
512 SetCombatMovement(false);
513 }
514
515 void DoAction(int32 action) override
516 {
517 switch (action)
518 {
519 case 1000:
520 case 11000:
522 break;
523 default:
524 break;
525 }
526 }
527
528 void UpdateAI(uint32 diff) override
529 {
530 _events.Update(diff);
531
533 {
536 }
537 }
538
539private:
541};
542
544{
545 npc_alchemist_adrianna(Creature* creature) : ScriptedAI(creature) { }
546
547 bool OnGossipHello(Player* player) override
548 {
552 return false;
553 }
554};
555
557{
558 public:
559 npc_arthas_teleport_visual() : CreatureScript("npc_arthas_teleport_visual") { }
560
562 {
563 npc_arthas_teleport_visualAI(Creature* creature) : NullCreatureAI(creature), _instance(creature->GetInstanceScript())
564 {
565 }
566
567 void Reset() override
568 {
569 _events.Reset();
574 }
575
576 void UpdateAI(uint32 diff) override
577 {
578 if (_events.Empty())
579 return;
580
581 _events.Update(diff);
582
584 {
587 }
588 }
589
590 private:
593 };
594
595 CreatureAI* GetAI(Creature* creature) const override
596 {
597 // Distance from the center of the spire
598 if (creature->GetExactDist2d(4357.052f, 2769.421f) < 100.0f && creature->GetHomePosition().GetPositionZ() < 315.0f)
599 return GetIcecrownCitadelAI<npc_arthas_teleport_visualAI>(creature);
600
601 // Default to no script
602 return nullptr;
603 }
604};
605
607{
609
610 bool OnGossipSelect(Player* /*player*/, uint32 menuId, uint32 /*gossipListId*/) override
611 {
612 if (menuId == GOSSIP_MENUID_ALLY || menuId == GOSSIP_MENUID_HORDE)
613 if (InstanceScript* instance = me->GetInstanceScript())
614 instance->SetData(DATA_FACTION_BUFF, 0);
615 return false;
616 }
617};
618
620{
621public:
622 ICCOrbControllerMinionSearch(Unit* owner, bool checkCasting) : _owner(owner), _checkCasting(checkCasting) { }
623
624 bool operator()(Creature* target) const
625 {
626 if (!target->IsAlive() || (_checkCasting && target->HasUnitState(UNIT_STATE_CASTING)) || target->GetWaypointPathId() || _owner->GetDistance(target) > 10.0f)
627 return false;
628
629 switch (target->GetEntry())
630 {
636 return true;
637 default:
638 return false;
639 }
640 }
641
642private:
643 // Need check to not use polymorph in a casting creature
646};
647
649{
656};
657
659{
660 npc_icc_orb_controller(Creature* creature) : ScriptedAI(creature), _isInCombat(false), _isLongRepeat(false) { }
661
662 void Reset() override
663 {
664 _scheduler.Schedule(1s, [this](TaskContext /*initialize*/)
665 {
666 std::vector<Creature*> creatures;
667 ICCOrbControllerMinionSearch check(me, false);
669 Cell::VisitGridObjects(me, searcher, 10.0f);
670
671 if (creatures.empty())
672 return;
673
674 for (Creature* creature : creatures)
675 {
676 creature->AI()->SetGUID(me->GetGUID(), DATA_GUID);
677 _minionGuids.push_back(creature->GetGUID());
678 }
679
681 });
682 }
683
684 void ScheduleVisualChannel(bool evading)
685 {
686 _scheduler.Schedule(evading ? 5s : 1s, [this](TaskContext visual)
687 {
689 if (Unit* minion = ObjectAccessor::GetUnit(*me, guid))
690 minion->CastSpell(nullptr, SPELL_BLOOD_ORB_VISUAL);
691 visual.Repeat(_isLongRepeat ? 21s : 3s);
693 });
694 }
695
697 {
698 for (GuidVector::iterator itr = _minionGuids.begin(); itr != _minionGuids.end();)
699 {
700 if (Unit* minion = ObjectAccessor::GetUnit(*me, (*itr)))
701 {
702 if (!minion->IsAlive())
703 {
704 itr = _minionGuids.erase(itr);
705 continue;
706 }
707
708 ++itr;
709 }
710 // Is not in world anymore
711 else
712 itr = _minionGuids.erase(itr);
713 }
714 }
715
716 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
717 {
718 if (spellInfo->Id == SPELL_ORB_CONTROLLER_ACTIVE)
720 orb->AI()->SetGUID(caster->GetGUID(), DATA_GUID);
721 }
722
723 void SetGUID(ObjectGuid const& guid, int32 id) override
724 {
725 if (id != ACTION_COMBAT || _isInCombat)
726 return;
727
728 Creature* darkfallen = ObjectAccessor::GetCreature(*me, guid);
729 if (!darkfallen)
730 return;
731
732 _isInCombat = true;
734 if (_minionGuids.empty())
735 return;
736
737 for (ObjectGuid guid : _minionGuids)
738 {
739 if (Creature* minion = ObjectAccessor::GetCreature(*me, guid))
740 if (minion->IsAIEnabled() && !minion->IsInCombat())
741 minion->AI()->DoZoneInCombat(darkfallen);
742 }
743
745 minion->CastSpell(nullptr, SPELL_SIPHON_ESSENCE);
746 }
747
748 void DoAction(int32 action) override
749 {
750 if (action == ACTION_EVADE && _isInCombat)
751 {
752 _isInCombat = false;
756 orb->SetFlag(GO_FLAG_NOT_SELECTABLE);
757 }
758 }
759
760 void UpdateAI(uint32 diff) override
761 {
762 _scheduler.Update(diff);
763 }
764
765private:
770};
771
773{
774 DarkFallenAI(Creature* creature) : ScriptedAI(creature), IsDoingEmotes(true), AttackSpellId(0) { }
775
776 virtual void ScheduleSpells() = 0;
777
778 void Reset() override
779 {
780 IsDoingEmotes = me->GetWaypointPathId() ? false : true;
783 {
785 })
786 .Schedule(1s, 10s, [this](TaskContext emote)
787 {
788 if (!IsDoingEmotes)
789 return;
790
791 if (roll_chance_i(20))
792 {
793 std::vector<Creature*> creatures;
794 ICCOrbControllerMinionSearch check(me, true);
796 Cell::VisitGridObjects(me, searcher, 10.0f);
797 if (!creatures.empty())
798 {
800 DoCast(friendly, SPELL_POLYMORPH_ALLY);
801 }
802 }
803 Scheduler.Schedule(1s, [this](TaskContext /*emote*/)
804 {
806 });
807 emote.Repeat(15s, 30s);
808 });
809 }
810
811 void JustEngagedWith(Unit* /*who*/) override
812 {
813 IsDoingEmotes = false;
816 if (Unit* trigger = ObjectAccessor::GetUnit(*me, TriggerGuid))
817 trigger->GetAI()->SetGUID(me->GetGUID(), ACTION_COMBAT);
818 }
819
820 void DoAction(int32 action) override
821 {
822 if (action == ACTION_SIPHON_INTERRUPTED)
824 orb->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
825 }
826
827 void SetGUID(ObjectGuid const& guid, int32 id) override
828 {
829 if (id == DATA_GUID)
830 TriggerGuid = guid;
831 }
832
833 void EnterEvadeMode(EvadeReason why) override
834 {
836 if (Unit* trigger = ObjectAccessor::GetUnit(*me, TriggerGuid))
837 trigger->GetAI()->DoAction(ACTION_EVADE);
838 }
839
840 void UpdateAI(uint32 diff) override
841 {
842 if (!UpdateVictim() && !IsDoingEmotes)
843 return;
844
845 Scheduler.Update(diff);
846
847 if (AttackSpellId)
849 }
850
851protected:
856};
857
859{
861
862 void ScheduleSpells() override
863 {
864 Scheduler.Schedule(500ms, [this](TaskContext /*context*/)
865 {
867 })
868 .Schedule(8s, [this](TaskContext unholyStrike)
869 {
871 unholyStrike.Repeat(8s, 9s);
872 })
873 .Schedule(6s, [this](TaskContext bloodMirror)
874 {
876 bloodMirror.Repeat(34s);
877 });
878 }
879};
880
882{
884 {
885 me->SetCanMelee(false); // DoSpellAttackIfReady
886 }
887
888 void ScheduleSpells() override
889 {
891 Scheduler.Schedule(500ms, [this](TaskContext /*context*/)
892 {
893 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false, -SPELL_CHAINS_OF_SHADOW))
895 })
896 .Schedule(11s, [this](TaskContext summonVampiric)
897 {
898 // Vampiric should be summoned by 70647 but i have no idea what is miscB of summon effect
899 if (Unit* target = me->GetVictim())
900 if (Creature* vampiric = me->SummonCreature(NPC_VAMPIRIC_FIEND, target->GetPosition(), TEMPSUMMON_CORPSE_DESPAWN))
901 vampiric->AI()->AttackStart(target);
902 summonVampiric.Repeat(30s);
903 });
904 }
905};
906
908{
909 npc_vampiric_fiend(Creature* creature) : ScriptedAI(creature) { }
910
911 void JustEngagedWith(Unit* /*who*/) override
912 {
914 _scheduler.Schedule(9s, [this](TaskContext /*leechingRoot*/)
915 {
917 })
918 .Schedule(38s, [this](TaskContext /*leechingRoot*/)
919 {
921 });
922 }
923
924 void EnterEvadeMode(EvadeReason /*why*/) override
925 {
928 }
929
930 void UpdateAI(uint32 diff) override
931 {
932 if (!UpdateVictim())
933 return;
934
935 _scheduler.Update(diff);
936 }
937
938private:
940};
941
943{
945 {
946 me->SetCanMelee(false); // DoSpellAttackIfReady
947 }
948
949 void ScheduleSpells() override
950 {
952 Scheduler.Schedule(1s, [this](TaskContext amplifyMagic)
953 {
956 amplifyMagic.Repeat(15s, 24s);
957 })
958 .Schedule(10s, [this](TaskContext blastWave)
959 {
961 blastWave.Repeat(25s, 30s);
962 })
963 .Schedule(17s, [this](TaskContext polymorph)
964 {
965 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false, -SPELL_POLYMORPH))
966 DoCast(target, SPELL_POLYMORPH);
967 polymorph.Repeat(25s, 35s);
968 });
969 }
970};
971
973{
975
976 void ScheduleSpells() override
977 {
978 Scheduler.Schedule(8s, [this](TaskContext lichSlap)
979 {
981 lichSlap.Repeat(12s);
982 })
983 .Schedule(50s, [this](TaskContext immunity)
984 {
985 if (Unit* target = DoSelectLowestHpFriendly(40.0f))
987 immunity.Repeat(20s, 25s);
988 });
989 }
990};
991
993{
995
996 void ScheduleSpells() override
997 {
998 Scheduler.Schedule(8s, [this](TaskContext unholyStrike)
999 {
1001 unholyStrike.Repeat(8s, 11s);
1002 })
1003 .Schedule(10s, [this](TaskContext shadowStep)
1004 {
1005 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
1006 {
1007 DoCast(target, SPELL_SHADOWSTEP);
1008 DoCast(target, SPELL_BLOOD_SAP);
1009 }
1010 shadowStep.Repeat(20s);
1011 });
1012 }
1013};
1014
1016{
1018
1019 // We set the anim tier and flags manually because we don't need them anymore once the spiders are down
1020 void InitializeAI() override
1021 {
1022 me->SetDisableGravity(true);
1023 me->SetImmuneToAll(true);
1025 }
1026
1027 void Reset() override
1028 {
1029 _events.Reset();
1030 }
1031
1032 void JustEngagedWith(Unit* /*who*/) override
1033 {
1037 }
1038
1039 void DoAction(int32 action) override
1040 {
1041 if (action != ACTION_NERUBAR_FALL)
1042 return;
1043
1045 float x, y, z;
1046 me->GetPosition(x, y);
1047 z = me->GetFloorZ();
1048 me->SetHomePosition(x, y, z, me->GetOrientation());
1049
1052 }
1053
1054 void MovementInform(uint32 type, uint32 id) override
1055 {
1056 if (type == EFFECT_MOTION_TYPE && id == POINT_LAND)
1057 {
1058 me->SetImmuneToAll(false);
1059 me->SetDisableGravity(false);
1060 }
1061 }
1062
1063 void UpdateAI(uint32 diff) override
1064 {
1065 if (!UpdateVictim())
1066 return;
1067
1068 _events.Update(diff);
1069
1071 return;
1072
1073 while (uint32 eventId = _events.ExecuteEvent())
1074 {
1075 switch (eventId)
1076 {
1079 _events.Repeat(4s, 10s);
1080 break;
1081 case EVENT_DARK_MENDING:
1082 {
1083 // Select a friendly target between 1% and 75% hp
1084 Unit* target = nullptr;
1085 Trinity::MostHPPercentMissingInRange u_check(me, 40.0f, 1, 75);
1087 Cell::VisitGridObjects(me, searcher, 40.0f);
1088
1089 if (target)
1090 DoCast(target, SPELL_DARK_MENDING);
1091 _events.Repeat(3s, 10s);
1092 break;
1093 }
1094 case EVENT_WEB_WRAP:
1095 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f))
1096 DoCast(target, SPELL_WEB_WRAP);
1097 _events.Repeat(16s, 20s);
1098 break;
1099 default:
1100 break;
1101 }
1102
1104 return;
1105 }
1106 }
1107
1108private:
1110};
1111
1113{
1115
1116 void Reset() override
1117 {
1119 _triggerGuid = trigger->GetGUID();
1120 }
1121
1122 bool OnGossipHello(Player* player) override
1123 {
1124 me->CastSpell(player, SPELL_EMPOWERED_BLOOD, true);
1126 return true;
1127 }
1128
1130 {
1132 me->SetGoAnimProgress(255);
1135 trigger->DespawnOrUnsummon();
1136 _scheduler.Schedule(3s, [this](TaskContext /*context*/)
1137 {
1138 me->Delete();
1139 });
1140 }
1141
1142 void SetGUID(ObjectGuid const& guid, int32 id) override
1143 {
1144 if (id == DATA_GUID)
1145 {
1146 if (Unit* target = ObjectAccessor::GetUnit(*me, guid))
1147 me->CastSpell(target, SPELL_EMPOWERED_BLOOD_3, true);
1149 }
1150 }
1151
1152 void UpdateAI(uint32 diff) override
1153 {
1154 _scheduler.Update(diff);
1155 }
1156
1157private:
1160};
1161
1162// 70227 - Empowered Blood
1164{
1165 bool Validate(SpellInfo const* /*spell*/) override
1166 {
1168 }
1169
1170 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1171 {
1173 }
1174
1175 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1176 {
1178 }
1179
1180 void Register() override
1181 {
1184 }
1185};
1186
1187// 70304 - Empowered Blood
1189{
1190 bool Validate(SpellInfo const* /*spell*/) override
1191 {
1193 }
1194
1195 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1196 {
1198 }
1199
1200 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1201 {
1203 }
1204
1205 void Register() override
1206 {
1209 }
1210};
1211
1212// 70299 - Siphon Essence
1214{
1215 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1216 {
1217 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_CANCEL && GetTarget()->IsAIEnabled())
1219 }
1220
1221 void Register() override
1222 {
1224 }
1225};
1226
1227// 70450 - Blood Mirror
1229{
1230 bool Validate(SpellInfo const* /*spell*/) override
1231 {
1233 }
1234
1235 void FilterTargets(std::list<WorldObject*>& targets)
1236 {
1237 targets.remove_if([](WorldObject* target)
1238 {
1239 return target->GetTypeId() != TYPEID_PLAYER;
1240 });
1241
1242 if (targets.size() < 2)
1243 return;
1244
1245 _targets = targets;
1247 }
1248
1249 void HandleMirror(SpellEffIndex /*effIndex*/)
1250 {
1251 if (_targets.empty())
1252 return;
1253
1254 Unit* caster = GetCaster();
1255 WorldObject* target = _targets.front();
1256 WorldObject* mirror = _targets.back();
1257
1258 caster->CastSpell(target, SPELL_BLOOD_MIRROR_2, true);
1259 target->CastSpell(mirror, SPELL_BLOOD_MIRROR_DAMAGE_SHARE, true);
1260 }
1261
1262 void Register() override
1263 {
1266 }
1267
1268private:
1269 std::list<WorldObject*> _targets;
1270};
1271
1272// 72131 - Remove Empowered Blood
1273// 70939 - Blood Queen Lana'thel - Clear all Status Ailments
1275{
1276 bool Validate(SpellInfo const* /*spell*/) override
1277 {
1279 }
1280
1281 void HandleScript(SpellEffIndex /*effIndex*/)
1282 {
1284 }
1285
1286 void Register() override
1287 {
1289 }
1290};
1291
1292// 70733 - Stoneform
1294{
1295 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1296 {
1297 if (Creature* target = GetTarget()->ToCreature())
1298 {
1299 target->SetReactState(REACT_PASSIVE);
1300 target->SetUninteractible(true);
1301 target->SetImmuneToPC(true);
1302 target->SetEmoteState(EMOTE_STATE_CUSTOM_SPELL_02);
1303 }
1304 }
1305
1306 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1307 {
1308 if (Creature* target = GetTarget()->ToCreature())
1309 {
1310 target->SetReactState(REACT_AGGRESSIVE);
1311 target->SetUninteractible(false);
1312 target->SetImmuneToPC(false);
1313 target->SetEmoteState(EMOTE_ONESHOT_NONE);
1314 }
1315 }
1316
1317 void Register() override
1318 {
1321 }
1322};
1323
1324// 70536, 70545, 70546, 70547 - Spirit Alarm
1326{
1328 {
1329 PreventHitDefaultEffect(effIndex);
1330 uint32 trapId = 0;
1331 switch (GetEffectInfo().MiscValue)
1332 {
1334 trapId = GO_SPIRIT_ALARM_1;
1335 break;
1337 trapId = GO_SPIRIT_ALARM_2;
1338 break;
1340 trapId = GO_SPIRIT_ALARM_3;
1341 break;
1343 trapId = GO_SPIRIT_ALARM_4;
1344 break;
1345 default:
1346 return;
1347 }
1348
1349 if (GameObject* trap = GetGObjCaster()->FindNearestGameObject(trapId, 5.0f))
1350 trap->SetRespawnTime(trap->GetGOInfo()->GetAutoCloseTime() / IN_MILLISECONDS);
1351
1352 std::list<Creature*> wards;
1355 for (std::list<Creature*>::iterator itr = wards.begin(); itr != wards.end(); ++itr)
1356 {
1357 if ((*itr)->IsAlive() && (*itr)->HasAura(SPELL_STONEFORM))
1358 {
1359 (*itr)->AI()->Talk(SAY_TRAP_ACTIVATE);
1360 (*itr)->RemoveAurasDueToSpell(SPELL_STONEFORM);
1361 if (Unit* target = (*itr)->SelectNearestTarget(150.0f))
1362 (*itr)->AI()->AttackStart(target);
1363 break;
1364 }
1365 }
1366 }
1367
1368 void Register() override
1369 {
1371 }
1372};
1373
1374// 72864 - Death Plague
1376{
1377 bool Validate(SpellInfo const* /*spell*/) override
1378 {
1380 }
1381
1382 // Damage Effect count
1383 void CountTargets(std::list<WorldObject*>& targets)
1384 {
1385 _sharedList = targets;
1386 _failed = targets.empty();
1387 }
1388
1389 // Filter targets to jump
1390 void FilterTargets(std::list<WorldObject*>& targets)
1391 {
1392 targets = _sharedList;
1393 targets.remove_if([](WorldObject* obj) -> bool
1394 {
1395 Unit* object = obj->ToUnit();
1396
1397 if (!object || object->GetTypeId() != TYPEID_PLAYER)
1398 return true;
1399
1401 return true;
1402
1403 return false;
1404 });
1405 }
1406
1408 {
1409 PreventHitDefaultEffect(effIndex);
1410 Unit* caster = GetCaster();
1411 caster->CastSpell(GetHitUnit(), SPELL_DEATH_PLAGUE, true);
1412 caster->CastSpell(caster, SPELL_RECENTLY_INFECTED, true);
1413 }
1414
1416 {
1417 if (_failed)
1418 {
1419 Unit* caster = GetCaster();
1420 caster->CastSpell(caster, SPELL_DEATH_PLAGUE_KILL, true);
1421 }
1422 }
1423
1424 void Register() override
1425 {
1430 }
1431
1432private:
1433 bool _failed = false;
1434 std::list<WorldObject*> _sharedList;
1435};
1436
1437// 72155, 72162 - Harvest Blight Specimen
1439{
1441 {
1442 PreventHitDefaultEffect(effIndex);
1444 }
1445
1447 {
1449 }
1450
1451 void Register() override
1452 {
1455 }
1456};
1457
1458// 72585 - Soul Missile
1460{
1462 {
1463 static Position const offset = { 0.0f, 0.0f, 200.0f, 0.0f };
1464 dest.RelocateOffset(offset);
1465 }
1466
1467 void Register() override
1468 {
1470 }
1471};
1472
1474 : SpellScript(), _triggerId(triggerId), _triggerFlags(triggerFlags)
1475{
1476}
1477
1479{
1480 return ValidateSpellInfo({ _triggerId });
1481}
1482
1484{
1486}
1487
1489{
1491}
1492
1494{
1495 public:
1496 at_icc_saurfang_portal() : AreaTriggerScript("at_icc_saurfang_portal") { }
1497
1498 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1499 {
1500 InstanceScript* instance = player->GetInstanceScript();
1501 if (!instance || instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE)
1502 return true;
1503
1504 player->TeleportTo(631, 4126.35f, 2769.23f, 350.963f, 0.0f);
1505
1506 if (instance->GetData(DATA_COLDFLAME_JETS) == NOT_STARTED)
1507 {
1508 // Process relocation now, to preload the grid and initialize traps
1509 player->GetMap()->PlayerRelocation(player, 4126.35f, 2769.23f, 350.963f, 0.0f);
1510
1512 std::list<Creature*> traps;
1514 traps.sort(Trinity::ObjectDistanceOrderPred(player));
1515 bool instant = false;
1516 for (std::list<Creature*>::iterator itr = traps.begin(); itr != traps.end(); ++itr)
1517 {
1518 (*itr)->AI()->DoAction(instant ? 1000 : 11000);
1519 instant = !instant;
1520 }
1521 }
1522
1523 return true;
1524 }
1525};
1526
1528{
1529 public:
1530 at_icc_shutdown_traps() : AreaTriggerScript("at_icc_shutdown_traps") { }
1531
1532 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1533 {
1534 if (InstanceScript* instance = player->GetInstanceScript())
1535 instance->SetData(DATA_UPPERSPIRE_TELE_ACT, DONE);
1536
1537 return true;
1538 }
1539};
1540
1542{
1543 public:
1544 at_icc_nerubar_broodkeeper() : OnlyOnceAreaTriggerScript("at_icc_nerubar_broodkeeper") { }
1545
1546 bool TryHandleOnce(Player* player, AreaTriggerEntry const* areaTrigger) override
1547 {
1548 if (InstanceScript* instance = player->GetInstanceScript())
1549 {
1550 if (player->IsGameMaster())
1551 return false;
1552
1553 instance->SetData(DATA_NERUBAR_BROODKEEPER_EVENT, areaTrigger->ID);
1554 }
1555 return true;
1556 }
1557};
1558
1560{
1561 // Creatures
1576
1577 // GameObjects
1579
1580 // Spells
1591
1592 // AreaTriggers
1596}
@ IN_MILLISECONDS
Definition: Common.h:35
int32_t int32
Definition: Define.h:138
uint16_t uint16
Definition: Define.h:143
uint32_t uint32
Definition: Define.h:142
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition: Duration.h:29
@ IN_PROGRESS
@ DONE
@ NOT_STARTED
@ EFFECT_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: ObjectDefines.h:70
@ TEMPSUMMON_CORPSE_DESPAWN
Definition: ObjectDefines.h:67
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
std::vector< ObjectGuid > GuidVector
Definition: ObjectGuid.h:395
bool roll_chance_i(int chance)
Definition: Random.h:59
if(posix_memalign(&__mallocedMemory, __align, __size)) return NULL
#define RegisterGameObjectAI(ai_name)
Definition: ScriptMgr.h:1398
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_0
Definition: SharedDefines.h:30
@ TARGET_UNIT_SRC_AREA_ALLY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ TARGET_DEST_CASTER
Emote
@ 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
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SEND_EVENT
@ SPELL_EFFECT_QUEST_COMPLETE
@ 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
Definition: SpellDefines.h:245
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define SpellObjectAreaTargetSelectFn(F, I, N)
Definition: SpellScript.h:864
#define SpellCastFn(F)
Definition: SpellScript.h:825
#define SpellDestinationTargetSelectFn(F, I, N)
Definition: SpellScript.h:874
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
#define SpellHitFn(F)
Definition: SpellScript.h:854
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:2040
EvadeReason
Definition: UnitAICommon.h:30
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ REACT_AGGRESSIVE
Definition: UnitDefines.h:508
@ UNIT_STATE_CASTING
Definition: Unit.h:270
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:2039
Unit * GetTarget() const
HookList< EffectApplyHandler > OnEffectRemove
Definition: SpellScript.h:2035
HookList< EffectApplyHandler > OnEffectApply
Definition: SpellScript.h:2024
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 SetCanMelee(bool canMelee, bool fleeFromMelee=false)
Definition: Creature.cpp:2822
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:373
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
uint32 GetWaypointPathId() const
Definition: Creature.h:381
void SetImmuneToAll(bool apply) override
Definition: Creature.h:167
bool operator()(Unit *unit) const
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
bool Empty() const
Definition: EventMap.h:84
void Repeat(Milliseconds time)
Definition: EventMap.cpp:63
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
void Reset()
Definition: EventMap.cpp:21
GameObject *const me
Definition: GameObjectAI.h:50
void SetGoState(GOState state)
void Delete()
void SetGoAnimProgress(uint8 animprogress)
Definition: GameObject.h:288
void SetFlag(GameObjectFlags flags)
Definition: GameObject.h:274
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:1053
void MoveLand(uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default)
void Clear()
Definition: ObjectGuid.h:286
static Unit * ToUnit(Object *o)
Definition: Object.h:225
TypeID GetTypeId() const
Definition: Object.h:173
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, TeleportToOptions options=TELE_TO_NONE, Optional< uint32 > instanceId={})
Definition: Player.cpp:1250
bool IsGameMaster() const
Definition: Player.h:1178
uint32 const Id
Definition: SpellInfo.h:325
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
HookList< CastHandler > AfterCast
Definition: SpellScript.h:824
Unit * GetCaster() const
HookList< HitHandler > AfterHit
Definition: SpellScript.h:852
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
Definition: SpellScript.h:873
HookList< EffectHandler > OnEffectHit
Definition: SpellScript.h:839
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
int32 GetEffectValue() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
HookList< EffectHandler > OnEffectLaunch
Definition: SpellScript.h:837
GameObject * GetGObjCaster() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition: SpellScript.h:863
TaskContext & Repeat(std::chrono::duration< Rep, Period > duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< Rep, Period > time, task_handler_t task)
TaskScheduler & Update(success_t const &callback=nullptr)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
bool DoSpellAttackIfReady(uint32 spellId)
Definition: UnitAI.cpp:61
virtual void DoAction(int32)
Definition: UnitAI.h:72
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:159
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:79
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:161
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
Definition: Unit.cpp:3104
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
bool IsAlive() const
Definition: Unit.h:1164
UnitAI * GetAI() const
Definition: Unit.h:660
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition: Unit.cpp:12725
void SetEmoteState(Emote emote)
Definition: Unit.h:852
Unit * GetVictim() const
Definition: Unit.h:715
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
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition: Object.cpp:2170
Map * GetMap() const
Definition: Object.h:624
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1042
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition: Object.cpp:3312
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
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
void setActive(bool isActiveObject)
Definition: Object.cpp:922
float GetFloorZ() const
Definition: Object.cpp:3755
void SetFarVisible(bool on)
Definition: Object.cpp:973
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2148
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1078
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:91
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:92
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(SpellDestination &dest)
void HandleEvent(SpellEffIndex effIndex)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void Register() override
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
ICCTimedEventIds
@ 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
ICCDataTypes
@ 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) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition: Containers.h:109
void RandomResize(C &container, std::size_t requestedSize)
Definition: Containers.h:67
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
Definition: CellImpl.h:179
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:106
constexpr void GetPosition(float &x, float &y) const
Definition: Position.h:81
constexpr float GetOrientation() const
Definition: Position.h:79
void SetCombatMovement(bool allowMovement)
Unit * DoSelectLowestHpFriendly(float range, uint32 minHPDiff=1)
void RelocateOffset(Position const &offset)
Definition: Spell.cpp:122
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)
void ScheduleSpells() override
npc_darkfallen_archmage(Creature *creature)
void ScheduleSpells() override
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
TaskScheduler _scheduler
void UpdateAI(uint32 diff) override
void EnterEvadeMode(EvadeReason) override