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 "SpellMgr.h"
31#include "SpellScript.h"
32#include "TemporarySummon.h"
33
35{
36 // Highlord Tirion Fordring (at Light's Hammer)
43
44 // The Lich King (at Light's Hammer)
50
51 // Highlord Bolvar Fordragon (at Light's Hammer)
53
54 // High Overlord Saurfang (at Light's Hammer)
59
60 // Muradin Bronzebeard (at Light's Hammer)
64
65 // Deathbound Ward
67
68 // Rotting Frost Giant
70};
71
73{
74 // Rotting Frost Giant
79 SPELL_STOMP = 64652,
81
82 // Frost Freeze Trap
84
85 // 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
505 }
506
507private:
509};
510
511// 37744 - Frost Freeze Trap
513{
515 {
516 SetCombatMovement(false);
517 }
518
519 void DoAction(int32 action) override
520 {
521 switch (action)
522 {
523 case 1000:
524 case 11000:
526 break;
527 default:
528 break;
529 }
530 }
531
532 void UpdateAI(uint32 diff) override
533 {
534 _events.Update(diff);
535
537 {
540 }
541 }
542
543private:
545};
546
547// 38501 - Alchemist Adrianna
549{
550 npc_alchemist_adrianna(Creature* creature) : ScriptedAI(creature) { }
551
552 bool OnGossipHello(Player* player) override
553 {
557 return false;
558 }
559};
560
561// 30298 - Invisible Stalker (Float, Uninteractible, LargeAOI)
563{
564 public:
565 npc_arthas_teleport_visual() : CreatureScript("npc_arthas_teleport_visual") { }
566
568 {
569 npc_arthas_teleport_visualAI(Creature* creature) : NullCreatureAI(creature), _instance(creature->GetInstanceScript())
570 {
571 }
572
581
582 void UpdateAI(uint32 diff) override
583 {
584 if (_events.Empty())
585 return;
586
587 _events.Update(diff);
588
590 {
593 }
594 }
595
596 private:
599 };
600
601 CreatureAI* GetAI(Creature* creature) const override
602 {
603 // Distance from the center of the spire
604 if (creature->GetExactDist2d(4357.052f, 2769.421f) < 100.0f && creature->GetHomePosition().GetPositionZ() < 315.0f)
605 return GetIcecrownCitadelAI<npc_arthas_teleport_visualAI>(creature);
606
607 // Default to no script
608 return nullptr;
609 }
610};
611
612// 39371 - King Varian Wrynn
613// 39372 - Garrosh Hellscream
615{
617
618 bool OnGossipSelect(Player* /*player*/, uint32 menuId, uint32 /*gossipListId*/) override
619 {
620 if (menuId == GOSSIP_MENUID_ALLY || menuId == GOSSIP_MENUID_HORDE)
621 if (InstanceScript* instance = me->GetInstanceScript())
622 instance->SetData(DATA_FACTION_BUFF, 0);
623 return false;
624 }
625};
626
628{
629public:
630 ICCOrbControllerMinionSearch(Unit* owner, bool checkCasting) : _owner(owner), _checkCasting(checkCasting) { }
631
632 bool operator()(Creature* target) const
633 {
634 if (!target->IsAlive() || (_checkCasting && target->HasUnitState(UNIT_STATE_CASTING)) || target->GetWaypointPath() || _owner->GetDistance(target) > 10.0f)
635 return false;
636
637 switch (target->GetEntry())
638 {
644 return true;
645 default:
646 return false;
647 }
648 }
649
650private:
651 // Need check to not use polymorph in a casting creature
654};
655
665
666// 38463 - Empowering Orb Visual Stalker
668{
669 npc_icc_orb_controller(Creature* creature) : ScriptedAI(creature), _isInCombat(false), _isLongRepeat(false) { }
670
671 void Reset() override
672 {
673 _scheduler.Schedule(1s, [this](TaskContext /*initialize*/)
674 {
675 std::vector<Creature*> creatures;
676 ICCOrbControllerMinionSearch check(me, false);
678 Cell::VisitGridObjects(me, searcher, 10.0f);
679
680 if (creatures.empty())
681 return;
682
683 for (Creature* creature : creatures)
684 {
685 creature->AI()->SetGUID(me->GetGUID(), DATA_GUID);
686 _minionGuids.push_back(creature->GetGUID());
687 }
688
690 });
691 }
692
693 void ScheduleVisualChannel(bool evading)
694 {
695 _scheduler.Schedule(evading ? 5s : 1s, [this](TaskContext visual)
696 {
698 if (Unit* minion = ObjectAccessor::GetUnit(*me, guid))
699 minion->CastSpell(nullptr, SPELL_BLOOD_ORB_VISUAL);
700 visual.Repeat(_isLongRepeat ? 21s : 3s);
702 });
703 }
704
706 {
707 for (GuidVector::iterator itr = _minionGuids.begin(); itr != _minionGuids.end();)
708 {
709 if (Unit* minion = ObjectAccessor::GetUnit(*me, (*itr)))
710 {
711 if (!minion->IsAlive())
712 {
713 itr = _minionGuids.erase(itr);
714 continue;
715 }
716
717 ++itr;
718 }
719 // Is not in world anymore
720 else
721 itr = _minionGuids.erase(itr);
722 }
723 }
724
725 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
726 {
727 if (spellInfo->Id == SPELL_ORB_CONTROLLER_ACTIVE)
729 orb->AI()->SetGUID(caster->GetGUID(), DATA_GUID);
730 }
731
732 void SetGUID(ObjectGuid const& guid, int32 id) override
733 {
734 if (id != ACTION_COMBAT || _isInCombat)
735 return;
736
737 Creature* darkfallen = ObjectAccessor::GetCreature(*me, guid);
738 if (!darkfallen)
739 return;
740
741 _isInCombat = true;
743 if (_minionGuids.empty())
744 return;
745
746 for (ObjectGuid guid : _minionGuids)
747 {
748 if (Creature* minion = ObjectAccessor::GetCreature(*me, guid))
749 if (minion->IsAIEnabled() && !minion->IsInCombat())
750 minion->AI()->DoZoneInCombat(darkfallen);
751 }
752
754 minion->CastSpell(nullptr, SPELL_SIPHON_ESSENCE);
755 }
756
757 void DoAction(int32 action) override
758 {
759 if (action == ACTION_EVADE && _isInCombat)
760 {
761 _isInCombat = false;
765 orb->SetFlag(GO_FLAG_NOT_SELECTABLE);
766 }
767 }
768
769 void UpdateAI(uint32 diff) override
770 {
771 _scheduler.Update(diff);
772 }
773
774private:
779};
780
782{
783 DarkFallenAI(Creature* creature) : ScriptedAI(creature), IsDoingEmotes(true), AttackSpellId(0) { }
784
785 virtual void ScheduleSpells() = 0;
786
787 void Reset() override
788 {
789 IsDoingEmotes = me->GetWaypointPath() ? false : true;
792 {
794 })
795 .Schedule(1s, 10s, [this](TaskContext emote)
796 {
797 if (!IsDoingEmotes)
798 return;
799
800 if (roll_chance_i(20))
801 {
802 std::vector<Creature*> creatures;
803 ICCOrbControllerMinionSearch check(me, true);
805 Cell::VisitGridObjects(me, searcher, 10.0f);
806 if (!creatures.empty())
807 {
809 DoCast(friendly, SPELL_POLYMORPH_ALLY);
810 }
811 }
812 Scheduler.Schedule(1s, [this](TaskContext /*emote*/)
813 {
815 });
816 emote.Repeat(15s, 30s);
817 });
818 }
819
820 void JustEngagedWith(Unit* /*who*/) override
821 {
822 IsDoingEmotes = false;
825 if (Unit* trigger = ObjectAccessor::GetUnit(*me, TriggerGuid))
826 trigger->GetAI()->SetGUID(me->GetGUID(), ACTION_COMBAT);
827 }
828
829 void DoAction(int32 action) override
830 {
831 if (action == ACTION_SIPHON_INTERRUPTED)
833 orb->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
834 }
835
836 void SetGUID(ObjectGuid const& guid, int32 id) override
837 {
838 if (id == DATA_GUID)
839 TriggerGuid = guid;
840 }
841
842 void EnterEvadeMode(EvadeReason why) override
843 {
845 if (Unit* trigger = ObjectAccessor::GetUnit(*me, TriggerGuid))
846 trigger->GetAI()->DoAction(ACTION_EVADE);
847 }
848
849 void UpdateAI(uint32 diff) override
850 {
851 if (!UpdateVictim() && !IsDoingEmotes)
852 return;
853
854 Scheduler.Update(diff);
855
856 if (AttackSpellId)
858 else
860 }
861
862protected:
867};
868
869// 37595 - Darkfallen Blood Knight
871{
873
874 void ScheduleSpells() override
875 {
876 Scheduler.Schedule(500ms, [this](TaskContext /*context*/)
877 {
879 })
880 .Schedule(8s, [this](TaskContext unholyStrike)
881 {
883 unholyStrike.Repeat(8s, 9s);
884 })
885 .Schedule(6s, [this](TaskContext bloodMirror)
886 {
888 bloodMirror.Repeat(34s);
889 });
890 }
891};
892
893// 37663 - Darkfallen Noble
895{
896 npc_darkfallen_noble(Creature* creature) : DarkFallenAI(creature) { }
897
898 void ScheduleSpells() override
899 {
901 Scheduler.Schedule(500ms, [this](TaskContext /*context*/)
902 {
903 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false, -SPELL_CHAINS_OF_SHADOW))
905 })
906 .Schedule(11s, [this](TaskContext summonVampiric)
907 {
908 // Vampiric should be summoned by 70647 but i have no idea what is miscB of summon effect
909 if (Unit* target = me->GetVictim())
910 if (Creature* vampiric = me->SummonCreature(NPC_VAMPIRIC_FIEND, target->GetPosition(), TEMPSUMMON_CORPSE_DESPAWN))
911 vampiric->AI()->AttackStart(target);
912 summonVampiric.Repeat(30s);
913 });
914 }
915};
916
917// 37901 - Vampiric Fiend
919{
920 npc_vampiric_fiend(Creature* creature) : ScriptedAI(creature) { }
921
922 void JustEngagedWith(Unit* /*who*/) override
923 {
925 _scheduler.Schedule(9s, [this](TaskContext /*leechingRoot*/)
926 {
928 })
929 .Schedule(38s, [this](TaskContext /*leechingRoot*/)
930 {
932 });
933 }
934
935 void EnterEvadeMode(EvadeReason /*why*/) override
936 {
939 }
940
941 void UpdateAI(uint32 diff) override
942 {
943 if (!UpdateVictim())
944 return;
945
946 _scheduler.Update(diff);
947
949 }
950
951private:
953};
954
955// 37664 - Darkfallen Archmage
957{
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
1122 }
1123
1124private:
1126};
1127
1128// 201741 - Empowering Blood Orb
1130{
1132
1133 void Reset() override
1134 {
1136 _triggerGuid = trigger->GetGUID();
1137 }
1138
1139 bool OnGossipHello(Player* player) override
1140 {
1141 me->CastSpell(player, SPELL_EMPOWERED_BLOOD, true);
1143 return true;
1144 }
1145
1147 {
1149 me->SetGoAnimProgress(255);
1152 trigger->DespawnOrUnsummon();
1153 _scheduler.Schedule(3s, [this](TaskContext /*context*/)
1154 {
1155 me->Delete();
1156 });
1157 }
1158
1159 void SetGUID(ObjectGuid const& guid, int32 id) override
1160 {
1161 if (id == DATA_GUID)
1162 {
1163 if (Unit* target = ObjectAccessor::GetUnit(*me, guid))
1164 me->CastSpell(target, SPELL_EMPOWERED_BLOOD_3, true);
1166 }
1167 }
1168
1169 void UpdateAI(uint32 diff) override
1170 {
1171 _scheduler.Update(diff);
1172 }
1173
1174private:
1177};
1178
1179// 70227 - Empowered Blood
1205
1206// 70304 - Empowered Blood
1232
1233// 70299 - Siphon Essence
1249
1250// 70450 - Blood Mirror
1252{
1254
1255 bool Validate(SpellInfo const* /*spell*/) override
1256 {
1258 }
1259
1260 void FilterTargets(std::list<WorldObject*>& targets)
1261 {
1262 targets.remove_if([](WorldObject* target)
1263 {
1264 return target->GetTypeId() != TYPEID_PLAYER;
1265 });
1266
1267 if (targets.size() < 2)
1268 return;
1269
1270 _targets = targets;
1272 }
1273
1274 void HandleMirror(SpellEffIndex /*effIndex*/)
1275 {
1276 if (_targets.empty())
1277 return;
1278
1279 Unit* caster = GetCaster();
1280 WorldObject* target = _targets.front();
1281 WorldObject* mirror = _targets.back();
1282
1283 caster->CastSpell(target, SPELL_BLOOD_MIRROR_2, true);
1284 target->CastSpell(mirror, SPELL_BLOOD_MIRROR_DAMAGE_SHARE, true);
1285 }
1286
1292
1293private:
1294 std::list<WorldObject*> _targets;
1295};
1296
1297// 72131 - Remove Empowered Blood
1298// 70939 - Blood Queen Lana'thel - Clear all Status Ailments
1318
1319// 70733 - Stoneform
1321{
1323
1324 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1325 {
1326 if (Creature* target = GetTarget()->ToCreature())
1327 {
1328 target->SetReactState(REACT_PASSIVE);
1329 target->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
1330 target->SetImmuneToPC(true);
1331 target->SetEmoteState(EMOTE_STATE_CUSTOM_SPELL_02);
1332 }
1333 }
1334
1335 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1336 {
1337 if (Creature* target = GetTarget()->ToCreature())
1338 {
1339 target->SetReactState(REACT_AGGRESSIVE);
1340 target->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
1341 target->SetImmuneToPC(false);
1342 target->SetEmoteState(EMOTE_ONESHOT_NONE);
1343 }
1344 }
1345
1351};
1352
1353// 70536, 70545, 70546, 70547 - Spirit Alarm
1355{
1357
1359 {
1360 PreventHitDefaultEffect(effIndex);
1361 uint32 trapId = 0;
1362 switch (GetEffectInfo().MiscValue)
1363 {
1365 trapId = GO_SPIRIT_ALARM_1;
1366 break;
1368 trapId = GO_SPIRIT_ALARM_2;
1369 break;
1371 trapId = GO_SPIRIT_ALARM_3;
1372 break;
1374 trapId = GO_SPIRIT_ALARM_4;
1375 break;
1376 default:
1377 return;
1378 }
1379
1380 if (GameObject* trap = GetGObjCaster()->FindNearestGameObject(trapId, 5.0f))
1381 trap->SetRespawnTime(trap->GetGOInfo()->GetAutoCloseTime() / IN_MILLISECONDS);
1382
1383 std::list<Creature*> wards;
1386 for (std::list<Creature*>::iterator itr = wards.begin(); itr != wards.end(); ++itr)
1387 {
1388 if ((*itr)->IsAlive() && (*itr)->HasAura(SPELL_STONEFORM))
1389 {
1390 (*itr)->AI()->Talk(SAY_TRAP_ACTIVATE);
1391 (*itr)->RemoveAurasDueToSpell(SPELL_STONEFORM);
1392 if (Unit* target = (*itr)->SelectNearestTarget(150.0f))
1393 (*itr)->AI()->AttackStart(target);
1394 break;
1395 }
1396 }
1397 }
1398
1403};
1404
1405// 72864 - Death Plague
1407{
1409
1410 bool Validate(SpellInfo const* /*spell*/) override
1411 {
1413 }
1414
1415 // Damage Effect count
1416 void CountTargets(std::list<WorldObject*>& targets)
1417 {
1418 _sharedList = targets;
1419 _failed = targets.empty();
1420 }
1421
1422 // Filter targets to jump
1423 void FilterTargets(std::list<WorldObject*>& targets)
1424 {
1425 targets = _sharedList;
1426 targets.remove_if([](WorldObject* obj) -> bool
1427 {
1428 Unit* object = obj->ToUnit();
1429
1430 if (!object || object->GetTypeId() != TYPEID_PLAYER)
1431 return true;
1432
1434 return true;
1435
1436 return false;
1437 });
1438 }
1439
1441 {
1442 PreventHitDefaultEffect(effIndex);
1443 Unit* caster = GetCaster();
1444 caster->CastSpell(GetHitUnit(), SPELL_DEATH_PLAGUE, true);
1445 caster->CastSpell(caster, SPELL_RECENTLY_INFECTED, true);
1446 }
1447
1449 {
1450 if (_failed)
1451 {
1452 Unit* caster = GetCaster();
1453 caster->CastSpell(caster, SPELL_DEATH_PLAGUE_KILL, true);
1454 }
1455 }
1456
1464
1465private:
1466 bool _failed = false;
1467 std::list<WorldObject*> _sharedList;
1468};
1469
1470// 72155, 72162 - Harvest Blight Specimen
1492
1493// 72585 - Soul Missile
1495{
1497
1499 {
1500 static Position const offset = { 0.0f, 0.0f, 200.0f, 0.0f };
1501 dest.RelocateOffset(offset);
1502 }
1503
1508};
1509
1511 : SpellScript(), _triggerId(triggerId), _triggerFlags(triggerFlags)
1512{
1513}
1514
1516{
1517 return ValidateSpellInfo({ _triggerId });
1518}
1519
1524
1529
1531{
1532 public:
1533 at_icc_saurfang_portal() : AreaTriggerScript("at_icc_saurfang_portal") { }
1534
1535 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1536 {
1537 InstanceScript* instance = player->GetInstanceScript();
1538 if (!instance || instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE)
1539 return true;
1540
1541 player->TeleportTo(631, 4126.35f, 2769.23f, 350.963f, 0.0f);
1542
1543 if (instance->GetData(DATA_COLDFLAME_JETS) == NOT_STARTED)
1544 {
1545 // Process relocation now, to preload the grid and initialize traps
1546 player->GetMap()->PlayerRelocation(player, 4126.35f, 2769.23f, 350.963f, 0.0f);
1547
1549 std::list<Creature*> traps;
1551 traps.sort(Trinity::ObjectDistanceOrderPred(player));
1552 bool instant = false;
1553 for (std::list<Creature*>::iterator itr = traps.begin(); itr != traps.end(); ++itr)
1554 {
1555 (*itr)->AI()->DoAction(instant ? 1000 : 11000);
1556 instant = !instant;
1557 }
1558 }
1559
1560 return true;
1561 }
1562};
1563
1565{
1566 public:
1567 at_icc_shutdown_traps() : AreaTriggerScript("at_icc_shutdown_traps") { }
1568
1569 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1570 {
1571 if (InstanceScript* instance = player->GetInstanceScript())
1572 instance->SetData(DATA_UPPERSPIRE_TELE_ACT, DONE);
1573
1574 return true;
1575 }
1576};
1577
1579{
1580 public:
1581 at_icc_start_blood_quickening() : AreaTriggerScript("at_icc_start_blood_quickening") { }
1582
1583 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1584 {
1585 if (InstanceScript* instance = player->GetInstanceScript())
1586 if (instance->GetData(DATA_BLOOD_QUICKENING_STATE) == NOT_STARTED)
1587 instance->SetData(DATA_BLOOD_QUICKENING_STATE, IN_PROGRESS);
1588 return true;
1589 }
1590};
1591
1593{
1594 public:
1595 at_icc_nerubar_broodkeeper() : OnlyOnceAreaTriggerScript("at_icc_nerubar_broodkeeper") { }
1596
1597 bool TryHandleOnce(Player* player, AreaTriggerEntry const* areaTrigger) override
1598 {
1599 if (InstanceScript* instance = player->GetInstanceScript())
1600 {
1601 if (player->IsGameMaster())
1602 return false;
1603
1604 instance->SetData(DATA_NERUBAR_BROODKEEPER_EVENT, areaTrigger->ID);
1605 }
1606 return true;
1607 }
1608};
1609
1611{
1612 // Creatures
1627
1628 // GameObjects
1630
1631 // Spells
1642
1643 // AreaTriggers
1648}
@ IN_MILLISECONDS
Definition Common.h:35
int32_t int32
Definition Define.h:129
uint16_t uint16
Definition Define.h:134
uint32_t uint32
Definition Define.h:133
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:39
std::vector< ObjectGuid > GuidVector
Definition ObjectGuid.h:262
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:1157
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ EFFECT_2
@ 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
@ AURA_REMOVE_BY_CANCEL
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_MOD_ROOT
TriggerCastFlags
#define sSpellMgr
Definition SpellMgr.h:738
#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)
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_FLAG_UNINTERACTIBLE
@ UNIT_STATE_CASTING
Definition Unit.h:235
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
Unit * GetTarget() const
HookList< EffectApplyHandler > OnEffectRemove
HookList< EffectApplyHandler > OnEffectApply
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:293
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition Creature.h:295
uint32 GetWaypointPath() const
Definition Creature.h:303
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetImmuneToAll(bool apply) override
Definition Creature.h:126
bool operator()(Unit *unit) const
void Update(uint32 time)
Definition EventMap.h:67
bool Empty() const
Definition EventMap.h:95
void Repeat(Milliseconds time)
Definition EventMap.cpp:63
EventId ExecuteEvent()
Definition EventMap.cpp:73
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
void Reset()
Definition EventMap.cpp:21
GameObject *const me
void SetGoState(GOState state)
void Delete()
void SetGoAnimProgress(uint8 animprogress)
Definition GameObject.h:184
void SetFlag(GameObjectFlags flags)
Definition GameObject.h:171
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:1081
void MoveLand(uint32 id, Position const &pos, Optional< float > velocity={})
void Clear()
Definition ObjectGuid.h:150
static Unit * ToUnit(Object *o)
Definition Object.h:192
TypeID GetTypeId() const
Definition Object.h:93
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
bool IsGameMaster() const
Definition Player.h:998
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options=0)
Definition Player.cpp:1524
uint32 Id
Definition SpellInfo.h:289
HookList< CastHandler > AfterCast
Unit * GetCaster() const
HookList< HitHandler > AfterHit
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
int32 GetEffectValue() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
HookList< EffectHandler > OnEffectLaunch
GameObject * GetGObjCaster() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
virtual void DoAction(int32)
Definition UnitAI.h:154
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:166
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:96
bool DoSpellAttackIfReady(uint32 spell)
Definition UnitAI.cpp:78
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:243
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
Definition Unit.cpp:3108
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
bool IsAlive() const
Definition Unit.h:1234
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
UnitAI * GetAI() const
Definition Unit.h:800
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13286
void SetEmoteState(Emote emote)
Definition Unit.h:967
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
Unit * GetVictim() const
Definition Unit.h:859
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void HandleEmoteCommand(Emote emoteId)
Definition Unit.cpp:1568
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition Object.cpp:2121
Map * GetMap() const
Definition Object.h:449
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1087
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition Object.cpp:3153
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition Object.cpp:1992
void setActive(bool isActiveObject)
Definition Object.cpp:991
float GetFloorZ() const
Definition Object.cpp:3586
void SetFarVisible(bool on)
Definition Object.cpp:1014
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2099
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1123
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:55
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:56
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool TryHandleOnce(Player *player, AreaTriggerEntry const *areaTrigger) override
bool OnTrigger(Player *player, AreaTriggerEntry const *) 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)
PrepareSpellScript(spell_darkfallen_blood_mirror)
std::list< WorldObject * > _targets
void CountTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_frost_giant_death_plague)
std::list< WorldObject * > _sharedList
void FilterTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_generic_remove_empowered_blood)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_icc_empowered_blood_3)
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)
PrepareAuraScript(spell_icc_empowered_blood)
void HandleScript(SpellEffIndex effIndex)
PrepareSpellScript(spell_icc_harvest_blight_specimen)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_icc_siphon_essence)
void RelocateDest(SpellDestination &dest)
PrepareSpellScript(spell_icc_soul_missile)
PrepareSpellScript(spell_icc_sprit_alarm)
void HandleEvent(SpellEffIndex effIndex)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_icc_stoneform)
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_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_BLOOD_QUICKENING_STATE
@ 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:108
void RandomResize(C &container, std::size_t requestedSize)
Definition Containers.h:66
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
Definition CellImpl.h:168
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:109
float GetOrientation() const
Definition Position.h:82
void GetPosition(float &x, float &y) const
Definition Position.h:84
void SetCombatMovement(bool allowMovement)
Unit * DoSelectLowestHpFriendly(float range, uint32 minHPDiff=1)
void RelocateOffset(Position const &offset)
Definition Spell.cpp:110
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