TrinityCore
Loading...
Searching...
No Matches
zone_shadowmoon_valley.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/* ScriptData
19SDName: Shadowmoon_Valley
20SD%Complete: 100
21SDComment: Quest support: 10804, 10854, 10458, 10481, 10480, 10781, 10451.
22SDCategory: Shadowmoon Valley
23EndScriptData */
24
25/* ContentData
26npc_invis_infernal_caster
27npc_infernal_attacker
28npc_mature_netherwing_drake
29npc_enslaved_netherwing_drake
30npc_earthmender_wilda
31npc_torloth_the_magnificent
32npc_illidari_spawn
33npc_lord_illidan_stormrage
34go_crystal_prison
35npc_enraged_spirit
36EndContentData */
37
38#include "ScriptMgr.h"
39#include "GameObject.h"
40#include "GameObjectAI.h"
41#include "Group.h"
42#include "MotionMaster.h"
43#include "ObjectAccessor.h"
44#include "Player.h"
45#include "ScriptedEscortAI.h"
46#include "ScriptedGossip.h"
47#include "SpellInfo.h"
48#include "SpellScript.h"
49#include "TemporarySummon.h"
50
51/*#####
52# npc_invis_infernal_caster
53#####*/
54
67
69{
70public:
71 npc_invis_infernal_caster() : CreatureScript("npc_invis_infernal_caster") { }
72
74 {
76 {
77 ground = 0.f;
78 }
79
87
88 void SetData(uint32 id, uint32 data) override
89 {
90 if (id == TYPE_INFERNAL && data == DATA_DIED)
92 }
93
95 {
97 infernalGUID = infernal->GetGUID();
98 else
100 }
101
102 void UpdateAI(uint32 diff) override
103 {
104 events.Update(diff);
105
106 while (uint32 eventId = events.ExecuteEvent())
107 {
108 switch (eventId)
109 {
111 {
112 if (Unit* infernal = ObjectAccessor::GetUnit(*me, infernalGUID))
113 if (infernal->GetDisplayId() == MODEL_INVISIBLE)
114 me->CastSpell(infernal, SPELL_SUMMON_INFERNAL, true);
116 break;
117 }
118 default:
119 break;
120 }
121 }
122 }
123
124 private:
127 float ground;
128 };
129
130 CreatureAI* GetAI(Creature* creature) const override
131 {
132 return new npc_invis_infernal_casterAI(creature);
133 }
134};
135
136/*#####
137# npc_infernal_attacker
138#####*/
139
141{
142public:
143 npc_infernal_attacker() : CreatureScript("npc_infernal_attacker") { }
144
146 {
147 npc_infernal_attackerAI(Creature* creature) : ScriptedAI(creature) { }
148
149 void Reset() override
150 {
152 me->GetMotionMaster()->MoveRandom(5.0f);
153 }
154
155 void IsSummonedBy(WorldObject* summoner) override
156 {
157 if (summoner->ToCreature())
158 casterGUID = summoner->ToCreature()->GetGUID();
160 }
161
162 void JustDied(Unit* /*killer*/) override
163 {
165 caster->AI()->SetData(TYPE_INFERNAL, DATA_DIED);
166 }
167
168 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
169 {
170 if (spellInfo->Id == SPELL_SUMMON_INFERNAL)
171 {
173 me->SetImmuneToPC(false);
175 // handle by the spell below when such auras will be not removed after evade
177 // DoCastSelf(SPELL_TRANSFORM_INFERNAL);
178 }
179 }
180
181 void UpdateAI(uint32 /*diff*/) override
182 {
183 if (!UpdateVictim())
184 return;
185
187 }
188
189 private:
191 };
192
193 CreatureAI* GetAI(Creature* creature) const override
194 {
195 return new npc_infernal_attackerAI(creature);
196 }
197};
198
199/*#####
200# npc_mature_netherwing_drake
201#####*/
202
217
219{
220public:
221 npc_mature_netherwing_drake() : CreatureScript("npc_mature_netherwing_drake") { }
222
223 CreatureAI* GetAI(Creature* creature) const override
224 {
225 return new npc_mature_netherwing_drakeAI(creature);
226 }
227
229 {
231 {
232 Initialize();
233 }
234
236 {
238
239 bCanEat = false;
240 bIsEating = false;
241
242 EatTimer = 5000;
243 CastTimer = 5000;
244 }
245
247
250
253
254 void Reset() override
255 {
256 Initialize();
257 }
258
259 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
260 {
261 if (bCanEat || bIsEating)
262 return;
263
264 if (caster->GetTypeId() == TYPEID_PLAYER && spellInfo->Id == SPELL_PLACE_CARCASS && !me->HasAura(SPELL_JUST_EATEN))
265 {
266 uiPlayerGUID = caster->GetGUID();
267 bCanEat = true;
268 }
269 }
270
271 void MovementInform(uint32 type, uint32 id) override
272 {
273 if (type != POINT_MOTION_TYPE)
274 return;
275
276 if (id == POINT_ID)
277 {
278 bIsEating = true;
279 EatTimer = 7000;
281 }
282 }
283
284 void UpdateAI(uint32 diff) override
285 {
286 if (bCanEat || bIsEating)
287 {
288 if (EatTimer <= diff)
289 {
290 if (bCanEat && !bIsEating)
291 {
293 {
294 if (GameObject* go = unit->FindNearestGameObject(GO_CARCASS, 10))
295 {
297 me->StopMoving();
298
299 me->GetMotionMaster()->MovePoint(POINT_ID, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ());
300 }
301 }
302 bCanEat = false;
303 }
304 else if (bIsEating)
305 {
308
310 {
311 player->KilledMonsterCredit(NPC_EVENT_PINGER);
312
313 if (GameObject* go = player->FindNearestGameObject(GO_CARCASS, 10))
314 go->Delete();
315 }
316
317 Reset();
319 }
320 }
321 else
322 EatTimer -= diff;
323
324 return;
325 }
326
327 if (!UpdateVictim())
328 return;
329
330 if (CastTimer <= diff)
331 {
333 CastTimer = 5000;
334 }
335 else
336 CastTimer -= diff;
337
339 }
340 };
341};
342
343/*###
344# npc_enslaved_netherwing_drake
345####*/
346
348{
349 // Spells
352
353 // Creatures
356
357 // Quests
359
360 // Movement
361 POINT_MOVE_UP = 1
363
365{
366public:
367 npc_enslaved_netherwing_drake() : CreatureScript("npc_enslaved_netherwing_drake") { }
368
370 {
372 {
373 Tapped = false;
375 }
376
377 void Reset() override
378 {
379 if (!Tapped)
381
382 me->SetDisableGravity(false);
383 }
384
385 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
386 {
387 Player* playerCaster = caster->ToPlayer();
388 if (!playerCaster)
389 return;
390
391 if (spellInfo->Id == SPELL_HIT_FORCE_OF_NELTHARAKU && !Tapped)
392 {
393 Tapped = true;
394 PlayerGUID = playerCaster->GetGUID();
395
397
399 if (Dragonmaw)
400 {
401 AddThreat(Dragonmaw, 100000.0f);
402 AttackStart(Dragonmaw);
403 }
404
406 me->GetThreatManager().ClearThreat(playerCaster);
407 }
408 }
409
410 void MovementInform(uint32 type, uint32 id) override
411 {
412 if (type != POINT_MOTION_TYPE)
413 return;
414
415 if (id == 1)
416 {
417 if (!PlayerGUID.IsEmpty())
419
420 me->DespawnOrUnsummon(1ms);
421 }
422 }
423
424 void UpdateAI(uint32 diff) override
425 {
426 if (!UpdateVictim())
427 {
428 if (Tapped)
429 {
430 if (FlyTimer <= diff)
431 {
432 Tapped = false;
433 if (!PlayerGUID.IsEmpty())
434 {
437 {
438 DoCast(player, SPELL_FORCE_OF_NELTHARAKU, true);
439
440 Position pos;
441 if (Unit* EscapeDummy = me->FindNearestCreature(NPC_ESCAPE_DUMMY, 30))
442 pos = EscapeDummy->GetPosition();
443 else
444 {
445 pos = me->GetRandomNearPosition(20);
446 pos.m_positionZ += 25;
447 }
448
449 me->SetCanFly(true);
450 me->SetDisableGravity(true);
452 }
453 }
454 } else FlyTimer -= diff;
455 }
456 return;
457 }
458
460 }
461
462 private:
465 bool Tapped;
466 };
467
468 CreatureAI* GetAI(Creature* creature) const override
469 {
470 return new npc_enslaved_netherwing_drakeAI(creature);
471 }
472};
473
474/*####
475# npc_earthmender_wilda
476####*/
477
498
500{
501public:
502 npc_earthmender_wilda() : CreatureScript("npc_earthmender_wilda") { }
503
505 {
507 {
508 Initialize();
509 }
510
512 {
514 }
515
517
518 void Reset() override
519 {
520 Initialize();
521 }
522
523 void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
524 {
525 Player* player = GetPlayerForEscort();
526 if (!player)
527 return;
528
529 switch (waypointId)
530 {
531 case 13:
532 Talk(SAY_WIL_PROGRESS1, player);
534 break;
535 case 14:
537 break;
538 case 15:
539 Talk(SAY_WIL_FIND_EXIT, player);
540 break;
541 case 19:
542 DoRandomSay();
543 break;
544 case 20:
546 break;
547 case 26:
548 DoRandomSay();
549 break;
550 case 27:
552 break;
553 case 33:
554 DoRandomSay();
555 break;
556 case 34:
558 break;
559 case 37:
560 DoRandomSay();
561 break;
562 case 38:
564 break;
565 case 39:
566 Talk(SAY_WIL_JUST_AHEAD, player);
567 break;
568 case 43:
569 DoRandomSay();
570 break;
571 case 44:
573 break;
574 case 50:
575 Talk(SAY_WIL_END, player);
577 break;
578 }
579 }
580
581 void JustSummoned(Creature* summoned) override
582 {
583 if (summoned->GetEntry() == NPC_COILSKAR_ASSASSIN)
584 summoned->AI()->AttackStart(me);
585 }
586
587 //this is very unclear, random say without no real relevance to script/event
589 {
591 }
592
594 {
595 //unknown where they actually appear
597 }
598
599 void JustEngagedWith(Unit* who) override
600 {
601 //don't always use
602 if (rand32() % 5)
603 return;
604
605 //only aggro text if not player
606 if (who->GetTypeId() != TYPEID_PLAYER)
607 {
608 //appears to be random
609 if (urand(0, 1))
611 }
612 }
613
614 void UpdateAI(uint32 uiDiff) override
615 {
616 EscortAI::UpdateAI(uiDiff);
617
618 if (!UpdateVictim())
619 return;
620
622 if (!HealthAbovePct(30))
623 {
624 if (m_uiHealingTimer <= uiDiff)
625 {
627 m_uiHealingTimer = 15000;
628 }
629 else
630 m_uiHealingTimer -= uiDiff;
631 }
632 }
633
634 void OnQuestAccept(Player* player, Quest const* quest) override
635 {
636 if (quest->GetQuestId() == QUEST_ESCAPE_COILSCAR)
637 {
638 Talk(SAY_WIL_START, player);
640
642 Start(false, player->GetGUID(), quest);
643 }
644 }
645 };
646
647 CreatureAI* GetAI(Creature* creature) const override
648 {
649 return new npc_earthmender_wildaAI(creature);
650 }
651
652};
653
654/*#####
655# Quest: Battle of the crimson watch
656#####*/
657
658/* ContentData
659Battle of the crimson watch - creatures, gameobjects and defines
660npc_illidari_spawn : Adds that are summoned in the Crimson Watch battle.
661npc_torloth_the_magnificent : Final Creature that players have to face before quest is completed
662npc_lord_illidan_stormrage : Creature that controls the event.
663go_crystal_prison : GameObject that begins the event and hands out quest
664EndContentData */
665
666#define QUEST_BATTLE_OF_THE_CRIMSON_WATCH 10781
667#define EVENT_AREA_RADIUS 65 //65yds
668#define EVENT_COOLDOWN 30000 //in ms. appear after event completed or failed (should be = Adds despawn time)
669
674
675// Creature 0 - Torloth, 1 - Illidan
677{
678 {0, 2000},
679 {1, 7000},
680 {0, 3000},
681 {0, 2000}, // Torloth stand
682 {0, 1000},
683 {0, 3000},
684 {0, 0}
685};
686
687//Cordinates for Spawns
689{
690 //Cords used for:
691 {-4615.8556f, 1342.2532f, 139.9f, 1.612f}, //Illidari Soldier
692 {-4598.9365f, 1377.3182f, 139.9f, 3.917f}, //Illidari Soldier
693 {-4598.4697f, 1360.8999f, 139.9f, 2.427f}, //Illidari Soldier
694 {-4589.3599f, 1369.1061f, 139.9f, 3.165f}, //Illidari Soldier
695 {-4608.3477f, 1386.0076f, 139.9f, 4.108f}, //Illidari Soldier
696 {-4633.1889f, 1359.8033f, 139.9f, 0.949f}, //Illidari Soldier
697 {-4623.5791f, 1351.4574f, 139.9f, 0.971f}, //Illidari Soldier
698 {-4607.2988f, 1351.6099f, 139.9f, 2.416f}, //Illidari Soldier
699 {-4633.7764f, 1376.0417f, 139.9f, 5.608f}, //Illidari Soldier
700 {-4600.2461f, 1369.1240f, 139.9f, 3.056f}, //Illidari Mind Breaker
701 {-4631.7808f, 1367.9459f, 139.9f, 0.020f}, //Illidari Mind Breaker
702 {-4600.2461f, 1369.1240f, 139.9f, 3.056f}, //Illidari Highlord
703 {-4631.7808f, 1367.9459f, 139.9f, 0.020f}, //Illidari Highlord
704 {-4615.5586f, 1353.0031f, 139.9f, 1.540f}, //Illidari Highlord
705 {-4616.4736f, 1384.2170f, 139.9f, 4.971f}, //Illidari Highlord
706 {-4627.1240f, 1378.8752f, 139.9f, 2.544f} //Torloth The Magnificent
707};
708
709struct WaveData
710{
713};
714
716{
717 {9, 0, 22075, 10000, 7000}, //Illidari Soldier
718 {2, 9, 22074, 10000, 7000}, //Illidari Mind Breaker
719 {4, 11, 19797, 10000, 7000}, //Illidari Highlord
720 {1, 15, 22076, 10000, 7000} //Torloth The Magnificent
721};
722
723struct SpawnSpells
724{
726};
727
729{
730 {10000, 15000, 35871}, // Illidari Soldier Cast - Spellbreaker
731 {10000, 10000, 38985}, // Illidari Mind Breake Cast - Focused Bursts
732 {35000, 35000, 22884}, // Illidari Mind Breake Cast - Psychic Scream
733 {20000, 20000, 17194}, // Illidari Mind Breake Cast - Mind Blast
734 {8000, 15000, 38010}, // Illidari Highlord Cast - Curse of Flames
735 {12000, 20000, 16102}, // Illidari Highlord Cast - Flamestrike
736 {10000, 15000, 15284}, // Torloth the Magnificent Cast - Cleave
737 {18000, 20000, 39082}, // Torloth the Magnificent Cast - Shadowfury
738 {25000, 28000, 33961} // Torloth the Magnificent Cast - Spell Reflection
739};
740
741/*######
742# npc_torloth_the_magnificent
743#####*/
744
746{
747public:
748 npc_torloth_the_magnificent() : CreatureScript("npc_torloth_the_magnificent") { }
749
750 CreatureAI* GetAI(Creature* c) const override
751 {
752 return new npc_torloth_the_magnificentAI(c);
753 }
754
756 {
758 {
759 Initialize();
760 SpellTimer1 = 0;
761 SpellTimer2 = 0;
762 SpellTimer3 = 0;
763 }
764
766 {
767 AnimationTimer = 4000;
768 AnimationCount = 0;
771 Timers = false;
772 }
773
775
777
780
781 bool Timers;
782
791
792 void JustEngagedWith(Unit* /*who*/) override { }
793
795 {
796 Creature* creature = me;
797
798 if (TorlothAnim[AnimationCount].creature == 1)
799 {
801
802 if (!creature)
803 return;
804 }
805
807
808 switch (AnimationCount)
809 {
810 case 0:
812 break;
813 case 3:
815 break;
816 case 5:
818 {
819 me->SetTarget(AggroTarget->GetGUID());
820 AddThreat(AggroTarget, 1);
822 }
823 break;
824 case 6:
826 {
829
830 float x, y, z;
831 AggroTarget->GetPosition(x, y, z);
832 me->GetMotionMaster()->MovePoint(0, x, y, z);
833 }
834 break;
835 }
837 }
838
839 void UpdateAI(uint32 diff) override
840 {
841 if (AnimationTimer)
842 {
843 if (AnimationTimer <= diff)
844 {
846 } else AnimationTimer -= diff;
847 }
848
849 if (AnimationCount < 6)
850 {
851 me->CombatStop();
852 } else if (!Timers)
853 {
857 Timers = true;
858 }
859
860 if (Timers)
861 {
862 if (SpellTimer1 <= diff)
863 {
864 DoCastVictim(SpawnCast[6].SpellId);//Cleave
865 SpellTimer1 = SpawnCast[6].Timer2 + (rand32() % 10 * 1000);
866 } else SpellTimer1 -= diff;
867
868 if (SpellTimer2 <= diff)
869 {
870 DoCastVictim(SpawnCast[7].SpellId);//Shadowfury
871 SpellTimer2 = SpawnCast[7].Timer2 + (rand32() % 5 * 1000);
872 } else SpellTimer2 -= diff;
873
874 if (SpellTimer3 <= diff)
875 {
876 DoCast(me, SpawnCast[8].SpellId);
877 SpellTimer3 = SpawnCast[8].Timer2 + (rand32() % 7 * 1000);//Spell Reflection
878 } else SpellTimer3 -= diff;
879 }
880
882 }
883
884 void JustDied(Unit* killer) override
885 {
886 if (!killer)
887 return;
888
889 switch (killer->GetTypeId())
890 {
891 case TYPEID_UNIT:
892 if (Unit* owner = killer->GetOwner())
893 if (Player* player = owner->ToPlayer())
894 player->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, me);
895 break;
896 case TYPEID_PLAYER:
897 if (Player* player = killer->ToPlayer())
898 player->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, me);
899 break;
900 default:
901 break;
902 }
903
905 LordIllidan->AI()->EnterEvadeMode();
906 }
907 };
908};
909
910/*#####
911# npc_lord_illidan_stormrage
912#####*/
913
915{
916public:
917 npc_lord_illidan_stormrage() : CreatureScript("npc_lord_illidan_stormrage") { }
918
919 CreatureAI* GetAI(Creature* c) const override
920 {
921 return new npc_lord_illidan_stormrageAI(c);
922 }
923
925 {
927 {
928 Initialize();
929 }
930
932 {
934
935 WaveTimer = 10000;
936 AnnounceTimer = 7000;
937 LiveCount = 0;
938 WaveCount = 0;
939
940 EventStarted = false;
941 Announced = false;
942 Failed = false;
943 }
944
946
949
952
955 bool Failed;
956
957 void Reset() override
958 {
959 Initialize();
960
961 me->SetVisible(false);
962 }
963
964 void JustEngagedWith(Unit* /*who*/) override { }
965 void MoveInLineOfSight(Unit* /*who*/) override { }
966
967 void AttackStart(Unit* /*who*/) override { }
968
969 void SummonNextWave();
970
972 {
974
975 if (!player)
976 return;
977
978 if (Group* EventGroup = player->GetGroup())
979 {
980 uint8 GroupMemberCount = 0;
981 uint8 DeadMemberCount = 0;
982 uint8 FailedMemberCount = 0;
983
984 Group::MemberSlotList const& members = EventGroup->GetMemberSlots();
985
986 for (Group::member_citerator itr = members.begin(); itr!= members.end(); ++itr)
987 {
988 Player* GroupMember = ObjectAccessor::GetPlayer(*me, itr->guid);
989 if (!GroupMember)
990 continue;
992 {
994 ++FailedMemberCount;
995 }
996 ++GroupMemberCount;
997
998 if (GroupMember->isDead())
999 ++DeadMemberCount;
1000 }
1001
1002 if (GroupMemberCount == FailedMemberCount)
1003 {
1004 Failed = true;
1005 }
1006
1007 if (GroupMemberCount == DeadMemberCount)
1008 {
1009 for (Group::member_citerator itr = members.begin(); itr!= members.end(); ++itr)
1010 {
1011 if (Player* groupMember = ObjectAccessor::GetPlayer(*me, itr->guid))
1012 if (groupMember->GetQuestStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) == QUEST_STATUS_INCOMPLETE)
1013 groupMember->FailQuest(QUEST_BATTLE_OF_THE_CRIMSON_WATCH);
1014 }
1015 Failed = true;
1016 }
1017 } else if (player->isDead() || !player->IsWithinDistInMap(me, EVENT_AREA_RADIUS))
1018 {
1020 Failed = true;
1021 }
1022 }
1023
1025 {
1026 --LiveCount;
1027 if (!LiveCount)
1028 Announced = false;
1029 }
1030
1031 void UpdateAI(uint32 diff) override
1032 {
1033 if (!PlayerGUID || !EventStarted)
1034 return;
1035
1036 if (!LiveCount && WaveCount < 4)
1037 {
1038 if (!Announced && AnnounceTimer <= diff)
1039 {
1040 Announced = true;
1041 }
1042 else
1043 AnnounceTimer -= diff;
1044
1045 if (WaveTimer <= diff)
1046 {
1048 }
1049 else
1050 WaveTimer -= diff;
1051 }
1053
1054 if (Failed)
1056 }
1057 };
1058};
1059
1060/*######
1061# npc_illidari_spawn
1062######*/
1063
1065{
1066public:
1067 npc_illidari_spawn() : CreatureScript("npc_illidari_spawn") { }
1068
1069 CreatureAI* GetAI(Creature* c) const override
1070 {
1071 return new npc_illidari_spawnAI(c);
1072 }
1073
1075 {
1077 {
1078 Initialize();
1079 SpellTimer1 = 0;
1080 SpellTimer2 = 0;
1081 SpellTimer3 = 0;
1082 }
1083
1085 {
1087 Timers = false;
1088 }
1089
1093
1094 void Reset() override
1095 {
1096 Initialize();
1097 }
1098
1099 void JustEngagedWith(Unit* /*who*/) override { }
1100
1101 void JustDied(Unit* /*killer*/) override
1102 {
1106 }
1107
1108 void UpdateAI(uint32 diff) override
1109 {
1110 if (!UpdateVictim())
1111 return;
1112
1113 if (!Timers)
1114 {
1115 if (me->GetEntry() == 22075)//Illidari Soldier
1116 {
1117 SpellTimer1 = SpawnCast[0].Timer1 + (rand32() % 4 * 1000);
1118 }
1119 if (me->GetEntry() == 22074)//Illidari Mind Breaker
1120 {
1121 SpellTimer1 = SpawnCast[1].Timer1 + (rand32() % 10 * 1000);
1122 SpellTimer2 = SpawnCast[2].Timer1 + (rand32() % 4 * 1000);
1123 SpellTimer3 = SpawnCast[3].Timer1 + (rand32() % 4 * 1000);
1124 }
1125 if (me->GetEntry() == 19797)// Illidari Highlord
1126 {
1127 SpellTimer1 = SpawnCast[4].Timer1 + (rand32() % 4 * 1000);
1128 SpellTimer2 = SpawnCast[5].Timer1 + (rand32() % 4 * 1000);
1129 }
1130 Timers = true;
1131 }
1132 //Illidari Soldier
1133 if (me->GetEntry() == 22075)
1134 {
1135 if (SpellTimer1 <= diff)
1136 {
1137 DoCastVictim(SpawnCast[0].SpellId);//Spellbreaker
1138 SpellTimer1 = SpawnCast[0].Timer2 + (rand32() % 5 * 1000);
1139 } else SpellTimer1 -= diff;
1140 }
1141 //Illidari Mind Breaker
1142 if (me->GetEntry() == 22074)
1143 {
1144 if (SpellTimer1 <= diff)
1145 {
1147 {
1148 if (target->GetTypeId() == TYPEID_PLAYER)
1149 {
1150 DoCast(target, SpawnCast[1].SpellId); //Focused Bursts
1151 SpellTimer1 = SpawnCast[1].Timer2 + (rand32() % 5 * 1000);
1152 } else SpellTimer1 = 2000;
1153 }
1154 } else SpellTimer1 -= diff;
1155
1156 if (SpellTimer2 <= diff)
1157 {
1158 DoCastVictim(SpawnCast[2].SpellId);//Psychic Scream
1159 SpellTimer2 = SpawnCast[2].Timer2 + (rand32() % 13 * 1000);
1160 } else SpellTimer2 -= diff;
1161
1162 if (SpellTimer3 <= diff)
1163 {
1164 DoCastVictim(SpawnCast[3].SpellId);//Mind Blast
1165 SpellTimer3 = SpawnCast[3].Timer2 + (rand32() % 8 * 1000);
1166 } else SpellTimer3 -= diff;
1167 }
1168 //Illidari Highlord
1169 if (me->GetEntry() == 19797)
1170 {
1171 if (SpellTimer1 <= diff)
1172 {
1173 DoCastVictim(SpawnCast[4].SpellId);//Curse Of Flames
1174 SpellTimer1 = SpawnCast[4].Timer2 + (rand32() % 10 * 1000);
1175 } else SpellTimer1 -= diff;
1176
1177 if (SpellTimer2 <= diff)
1178 {
1179 DoCastVictim(SpawnCast[5].SpellId);//Flamestrike
1180 SpellTimer2 = SpawnCast[5].Timer2 + (rand32() % 7 * 13000);
1181 } else SpellTimer2 -= diff;
1182 }
1183
1185 }
1186 };
1187};
1188
1190{
1193 uint8 FelguardCount = 0;
1194 uint8 DreadlordCount = 0;
1195
1196 for (uint8 i = 0; i < count; ++i)
1197 {
1199 ++LiveCount;
1200
1201 if (Spawn)
1202 {
1204
1205 if (WaveCount == 0)//1 Wave
1206 {
1207 if (rand32() % 3 == 1 && FelguardCount<2)
1208 {
1209 Spawn->SetDisplayId(18654);
1210 ++FelguardCount;
1211 }
1212 else if (DreadlordCount < 3)
1213 {
1214 Spawn->SetDisplayId(19991);
1215 ++DreadlordCount;
1216 }
1217 else if (FelguardCount<2)
1218 {
1219 Spawn->SetDisplayId(18654);
1220 ++FelguardCount;
1221 }
1222 }
1223
1224 if (WaveCount < 3)//1-3 Wave
1225 {
1226 if (!PlayerGUID.IsEmpty())
1227 {
1229 {
1230 float x, y, z;
1231 target->GetPosition(x, y, z);
1232 Spawn->GetMotionMaster()->MovePoint(0, x, y, z);
1233 }
1234 }
1236 }
1237
1238 if (WavesInfo[WaveCount].CreatureId == 22076) // Torloth
1239 {
1241 if (!PlayerGUID.IsEmpty())
1243 }
1244 }
1245 }
1246 ++WaveCount;
1247 if (WaveCount < 4)
1248 {
1251 }
1252}
1253
1254/*#####
1255# go_crystal_prison
1256######*/
1257
1259{
1260public:
1261 go_crystal_prison() : GameObjectScript("go_crystal_prison") { }
1262
1264 {
1266
1267 void OnQuestAccept(Player* player, Quest const* quest) override
1268 {
1270 {
1271 Creature* illidan = player->FindNearestCreature(22083, 50);
1272 if (illidan && !ENSURE_AI(npc_lord_illidan_stormrage::npc_lord_illidan_stormrageAI, illidan->AI())->EventStarted)
1273 {
1277 }
1278 }
1279 }
1280 };
1281
1282 GameObjectAI* GetAI(GameObject* go) const override
1283 {
1284 return new go_crystal_prisonAI(go);
1285 }
1286};
1287
1288/*####
1289# npc_enraged_spirits
1290####*/
1291
1293{
1294 // QUESTS
1298
1299 // Totem
1302
1303 // SPIRITS
1308
1309 // ENRAGED WATER SPIRIT SPELLS
1311
1312 // ENRAGED AIR SPIRIT SPELLS
1316
1317 // ENRAGED FIRE SPIRIT SPELLS - Will be using the enrage spell from Air Spirit
1319 SPELL_FEL_FIRE_AURA = 36006, // Earth spirit uses this one
1320
1321 // ENRAGED EARTH SPIRIT SPELLS
1324
1325 // SOULS
1329 NPC_ENRAGED_WATERY_SOUL = 21109, // wrong model
1330
1331 // SPELL KILLCREDIT - not working!?! - using KilledMonsterCredit
1336
1337 // KilledMonsterCredit Workaround
1342
1343 // Captured Spell / Buff
1344 SPELL_SOUL_CAPTURED = 36115
1346
1355
1357{
1358public:
1359 npc_enraged_spirit() : CreatureScript("npc_enraged_spirit") { }
1360
1361 CreatureAI* GetAI(Creature* creature) const override
1362 {
1363 return new npc_enraged_spiritAI(creature);
1364 }
1365
1367 {
1368 npc_enraged_spiritAI(Creature* creature) : ScriptedAI(creature) { }
1369
1370 void Reset() override { }
1371
1372 void JustEngagedWith(Unit* /*who*/) override
1373 {
1374 switch (me->GetEntry())
1375 {
1377 _events.ScheduleEvent(EVENT_ENRAGED_WATER_SPIRIT, 0s, Seconds(1));
1378 break;
1380 if (!me->GetAura(SPELL_FEL_FIRE_AURA))
1381 DoCastSelf(SPELL_FEL_FIRE_AURA);
1382 _events.ScheduleEvent(EVENT_ENRAGED_FIRE_SPIRIT, 2s, 10s);
1383 break;
1385 if (!me->GetAura(SPELL_FEL_FIRE_AURA))
1386 DoCastSelf(SPELL_FEL_FIRE_AURA);
1387 _events.ScheduleEvent(EVENT_ENRAGED_EARTH_SPIRIT, 3s, 4s);
1388 break;
1390 _events.ScheduleEvent(EVENT_ENRAGED_AIR_SPIRIT_CHAIN_LIGHTNING, 10s);
1391 break;
1392 default:
1393 break;
1394 }
1395 }
1396
1397 void UpdateAI(uint32 diff) override
1398 {
1399 if (!UpdateVictim())
1400 return;
1401 _events.Update(diff);
1402
1403 while (uint32 eventId = _events.ExecuteEvent())
1404 {
1405 switch (eventId)
1406 {
1408 if (UpdateVictim())
1409 DoCastVictim(SPELL_STORMBOLT);
1410 _events.Repeat(Seconds(17), Seconds(23));
1411 break;
1413 if (UpdateVictim())
1414 DoCastVictim(SPELL_FEL_FIREBALL);
1415 _events.Repeat(Seconds(6), Seconds(12));
1416 break;
1418 if (UpdateVictim())
1419 DoCastVictim(SPELL_FIERY_BOULDER);
1420 _events.Repeat(Seconds(6), Seconds(9));
1421 break;
1423 if (UpdateVictim())
1424 DoCastVictim(SPELL_CHAIN_LIGHTNING);
1425 _events.ScheduleEvent(EVENT_ENRAGED_AIR_SPIRIT_HURRICANE, 3s, 5s);
1426 break;
1428 if (UpdateVictim())
1429 DoCastVictim(SPELL_HURRICANE);
1430 _events.ScheduleEvent(EVENT_ENRAGED_AIR_SPIRIT_CHAIN_LIGHTNING, 15s, 20s);
1431 break;
1432 default:
1433 break;
1434 }
1435 }
1436
1437 if (me->GetEntry() == NPC_ENRAGED_FIRE_SPIRIT || me->GetEntry() == NPC_ENRAGED_AIR_SPIRIT)
1438 if (HealthBelowPct(35) && !me->GetAura(SPELL_ENRAGE))
1439 DoCastSelf(SPELL_ENRAGE);
1440
1441 DoMeleeAttackIfReady();
1442 }
1443
1444 void JustDied(Unit* /*killer*/) override
1445 {
1446 // always spawn spirit on death
1447 // if totem around
1448 // move spirit to totem and cast kill count
1449 uint32 entry = 0;
1450 uint32 credit = 0;
1451
1452 switch (me->GetEntry())
1453 {
1455 entry = NPC_FIERY_SOUL;
1456 //credit = SPELL_FIERY_SOUL_CAPTURED_CREDIT;
1457 credit = NPC_CREDIT_FIRE;
1458 break;
1460 entry = NPC_EARTHEN_SOUL;
1461 //credit = SPELL_EARTHEN_SOUL_CAPTURED_CREDIT;
1462 credit = NPC_CREDIT_EARTH;
1464 break;
1466 entry = NPC_ENRAGED_AIRY_SOUL;
1467 //credit = SPELL_AIRY_SOUL_CAPTURED_CREDIT;
1468 credit = NPC_CREDIT_AIR;
1469 break;
1472 //credit = SPELL_WATERY_SOUL_CAPTURED_CREDIT;
1473 credit = NPC_CREDIT_WATER;
1474 break;
1475 default:
1476 break;
1477 }
1478
1479 // Spawn Soul on Kill ALWAYS!
1480 Creature* Summoned = nullptr;
1481 Unit* totemOspirits = nullptr;
1482
1483 if (entry != 0)
1484 Summoned = DoSpawnCreature(entry, 0, 0, 1, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5s);
1485
1486 // FIND TOTEM, PROCESS QUEST
1487 if (Summoned)
1488 {
1490 if (totemOspirits)
1491 {
1492 Summoned->SetFaction(FACTION_FRIENDLY);
1493 Summoned->GetMotionMaster()->MovePoint(0, totemOspirits->GetPositionX(), totemOspirits->GetPositionY(), Summoned->GetPositionZ());
1494
1495 if (Unit* owner = totemOspirits->GetOwner())
1496 if (Player* player = owner->ToPlayer())
1497 player->KilledMonsterCredit(credit);
1498 DoCast(totemOspirits, SPELL_SOUL_CAPTURED);
1499 }
1500 }
1501 }
1502
1503 private:
1505 };
1506};
1507
1509{
1511};
1512
1513// 38790 - Unlocking Zuluhed's Chains
1515{
1516 public:
1517 spell_unlocking_zuluheds_chains() : SpellScriptLoader("spell_unlocking_zuluheds_chains") { }
1518
1520 {
1522
1524 {
1525 if (Player* caster = GetCaster()->ToPlayer())
1526 if (Creature* karynaku = caster->FindNearestCreature(NPC_KARYNAKU, 15.0f))
1527 caster->KilledMonsterCredit(NPC_KARYNAKU, karynaku->GetGUID());
1528 }
1529
1530 void Register() override
1531 {
1532 AfterHit += SpellHitFn(spell_unlocking_zuluheds_chains_SpellScript::HandleAfterHit);
1533 }
1534 };
1535
1536 SpellScript* GetSpellScript() const override
1537 {
1539 }
1540};
1541
1554
1556{
1557public:
1558 npc_shadowmoon_tuber_node() : CreatureScript("npc_shadowmoon_tuber_node") { }
1559
1561 {
1563
1564 void SetData(uint32 id, uint32 data) override
1565 {
1566 if (id == TYPE_BOAR && data == DATA_BOAR)
1567 {
1568 // Spawn chest GO
1569 DoCast(SPELL_SHADOWMOON_TUBER);
1570
1571 // Despawn the tuber
1573 {
1574 tuber->SetLootState(GO_JUST_DEACTIVATED);
1575 me->DespawnOrUnsummon();
1576 }
1577 }
1578 }
1579
1580 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
1581 {
1582 if (spellInfo->Id == SPELL_WHISTLE)
1583 {
1584 if (Creature* boar = me->FindNearestCreature(NPC_BOAR_ENTRY, 30.0f))
1585 {
1586 boar->SetWalk(false);
1587 boar->GetMotionMaster()->MovePoint(POINT_TUBER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
1588 }
1589 }
1590 }
1591 };
1592
1593 CreatureAI* GetAI(Creature* creature) const override
1594 {
1595 return new npc_shadowmoon_tuber_nodeAI(creature);
1596 }
1597};
1598
1599/*######
1600## Quest 10769, 10776: Dissension Amongst the Ranks...
1601######*/
1602
1609
1610// 38224 - Illidari Agent Illusion
1612{
1614
1615 bool Validate(SpellInfo const* /*spellInfo*/) override
1616 {
1617 return ValidateSpellInfo({ SPELL_ILLIDARI_DISGUISE_MALE, SPELL_ILLIDARI_DISGUISE_FEMALE });
1618 }
1619
1620 void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1621 {
1622 if (Player* target = GetTarget()->ToPlayer())
1623 target->CastSpell(target, target->GetNativeGender() == GENDER_MALE ?
1625 }
1626
1627 void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1628 {
1629 Unit* target = GetTarget();
1632 }
1633
1639};
1640
1641// 38223 - Quest Credit: Crazed Colossus
1643{
1645
1646 bool Validate(SpellInfo const* spellInfo) override
1647 {
1648 return ValidateSpellInfo(
1649 {
1650 uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()),
1652 });
1653 }
1654
1655 void HandleScript(SpellEffIndex /*effIndex*/)
1656 {
1657 Unit* target = GetHitUnit();
1658 if (target->HasAura(uint32(GetEffectValue())))
1660 }
1661
1666};
1667
1668/*######
1669## Quest 10637, 10688: A Necessary Distraction
1670######*/
1671
1676
1677// 37834 - Unbanish Azaloth
1679{
1681
1682 bool Validate(SpellInfo const* /*spellInfo*/) override
1683 {
1684 return ValidateSpellInfo({ SPELL_BANISH_AZALOTH });
1685 }
1686
1687 void HandleScript(SpellEffIndex /*effIndex*/)
1688 {
1689 GetHitUnit()->RemoveAurasDueToSpell(SPELL_BANISH_AZALOTH);
1690 }
1691
1696};
1697
1698/*######
1699## Quest 10672: Frankly, It Makes No Sense...
1700######*/
1701
1708
1709// 37867 - Arcano-Scorp Control
1710// 37892 - Arcano-Scorp Control
1711// 37894 - Arcano-Scorp Control
1713{
1715
1716 bool Validate(SpellInfo const* /*spellInfo*/) override
1717 {
1718 return ValidateSpellInfo({ _triggeredSpellId });
1719 }
1720
1721 void HandleDummy(SpellEffIndex /*effIndex*/)
1722 {
1723 GetHitUnit()->CastSpell(GetHitUnit(), _triggeredSpellId);
1724 }
1725
1730
1732
1733public:
1734 explicit spell_shadowmoon_arcano_scorp_control(uint32 triggeredSpellId) : _triggeredSpellId(triggeredSpellId) { }
1735};
1736
@ IN_MILLISECONDS
Definition Common.h:35
uint8_t uint8
Definition Define.h:135
int8_t int8
Definition Define.h:131
uint32_t uint32
Definition Define.h:133
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition Duration.h:27
@ GO_JUST_DEACTIVATED
Definition GameObject.h:79
@ POINT_MOTION_TYPE
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
@ TYPEID_UNIT
Definition ObjectGuid.h:38
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
@ SPELL_CHAIN_LIGHTNING
Definition PlayerAI.cpp:264
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:107
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
uint32 rand32()
Definition Random.cpp:70
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
Definition ScriptMgr.h:1127
SpellEffIndex
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ GENDER_MALE
@ EMOTE_ONESHOT_POINT
@ EMOTE_ONESHOT_ATTACK_UNARMED
@ FACTION_ORC_DRAGONMAW
@ FACTION_FLAYER_HUNTER
@ FACTION_FRIENDLY
@ FACTION_EARTHEN_RING
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_DUMMY
#define SpellEffectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define SpellHitFn(F)
#define ENSURE_AI(a, b)
Definition UnitAI.h:28
@ UNIT_STAND_STATE_KNEEL
Definition UnitDefines.h:42
@ UNIT_STAND_STATE_STAND
Definition UnitDefines.h:34
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_UNINTERACTIBLE
@ UNIT_STATE_ROOT
Definition Unit.h:230
@ SPELL_ENRAGE
@ SPELL_FEL_FIREBALL
@ SPELL_STORMBOLT
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
Creature * DoSummon(uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
bool LoadCreaturesAddon()
void SetDisplayId(uint32 modelId) override
void SetImmuneToPC(bool apply) override
Definition Creature.h:129
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetTarget(ObjectGuid guid) override
CreatureAI * AI() const
Definition Creature.h:154
void Update(uint32 time)
Definition EventMap.h:67
EventId ExecuteEvent()
Definition EventMap.cpp:73
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
Definition Group.h:165
std::list< MemberSlot > MemberSlotList
Definition Group.h:175
MemberSlotList::const_iterator member_citerator
Definition Group.h:176
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MoveTakeoff(uint32 id, Position const &pos, Optional< float > velocity={})
void MoveRandom(float wanderDistance=0.0f)
static ObjectGuid const Empty
Definition ObjectGuid.h:140
bool IsEmpty() const
Definition ObjectGuid.h:172
void Clear()
Definition ObjectGuid.h:150
static Creature * ToCreature(Object *o)
Definition Object.h:186
TypeID GetTypeId() const
Definition Object.h:93
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
static Player * ToPlayer(Object *o)
Definition Object.h:180
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Definition Player.cpp:16032
Group * GetGroup()
Definition Player.h:2171
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15642
void FailQuest(uint32 quest_id)
Definition Player.cpp:15040
uint32 GetQuestId() const
Definition QuestDef.h:229
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
uint32 Id
Definition SpellInfo.h:289
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:483
void ClearThreat(Unit *target)
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
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:30
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
void ClearUnitState(uint32 f)
Definition Unit.h:877
void SetVisible(bool x)
Definition Unit.cpp:8513
ThreatManager & GetThreatManager()
Definition Unit.h:1155
void SetFaction(uint32 faction) override
Definition Unit.h:974
void StopMoving(bool force=false)
Definition Unit.cpp:10312
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13286
void AddUnitState(uint32 f)
Definition Unit.h:875
bool SetCanFly(bool enable, bool packetOnly=false)
Definition Unit.cpp:13374
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
void HandleEmoteCommand(Emote emoteId)
Definition Unit.cpp:1568
void SetStandState(UnitStandStateType state)
Definition Unit.cpp:10363
void CombatStop(bool includingCast=false, bool mutualPvP=true)
Definition Unit.cpp:5691
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:954
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:955
bool isDead() const
Definition Unit.h:1236
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition Object.cpp:2121
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
Unit * GetOwner() const
Definition Object.cpp:2180
Position GetRandomNearPosition(float radius)
Definition Object.cpp:3264
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2099
void UpdateGroundPositionZ(float x, float y, float &z) const
Definition Object.cpp:1405
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition Object.cpp:1192
GameObjectAI * GetAI(GameObject *go) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *c) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *c) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *c) const override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_shadowmoon_arcano_scorp_control)
spell_shadowmoon_arcano_scorp_control(uint32 triggeredSpellId)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_shadowmoon_illidari_agent_illusion)
PrepareSpellScript(spell_shadowmoon_quest_credit_crazed_colossus)
bool Validate(SpellInfo const *spellInfo) override
PrepareSpellScript(spell_shadowmoon_unbanish_azaloth)
bool Validate(SpellInfo const *) override
SpellScript * GetSpellScript() const override
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
void Start(bool isActiveAttacker=true, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false)
void LoadPath(uint32 pathId)
Player * GetPlayerForEscort()
void UpdateAI(uint32 diff) override
float m_positionZ
Definition Position.h:58
float GetPositionZ() const
Definition Position.h:81
float GetPositionX() const
Definition Position.h:79
void GetPosition(float &x, float &y) const
Definition Position.h:84
float GetPositionY() const
Definition Position.h:80
void AttackStart(Unit *) override
bool HealthAbovePct(uint32 pct) const
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
uint32 CreatureId
uint8 UsedSpawnPoint
uint32 SpawnTimer
uint32 YellTimer
void OnQuestAccept(Player *player, Quest const *quest) override
void WaypointReached(uint32 waypointId, uint32) override
void OnQuestAccept(Player *player, Quest const *quest) override
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
void IsSummonedBy(WorldObject *summoner) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
@ SPELL_ARCANO_SCORP_CONTROL_03
@ SPELL_ARCANO_SCORP_CONTROL_01
@ SPELL_ARCANO_SCORP_CONTROL_02
static WaveData WavesInfo[]
static SpawnSpells SpawnCast[]
@ GO_SHADOWMOON_TUBER_MOUND
#define QUEST_BATTLE_OF_THE_CRIMSON_WATCH
static Position SpawnLocation[]
void AddSC_shadowmoon_valley()
@ EVENT_ENRAGED_AIR_SPIRIT_CHAIN_LIGHTNING
@ EVENT_ENRAGED_AIR_SPIRIT_HURRICANE
@ EVENT_ENRAGED_EARTH_SPIRIT
@ EVENT_ENRAGED_WATER_SPIRIT
@ EVENT_ENRAGED_FIRE_SPIRIT
static TorlothCinematic TorlothAnim[]
@ QUEST_ENRAGED_SPIRITS_FIRE_EARTH
@ SPELL_EARTHEN_SOUL_CAPTURED_CREDIT
@ SPELL_AIR_SPIRIT_CHAIN_LIGHTNING
@ NPC_ENRAGED_WATER_SPIRIT
@ NPC_ENRAGED_EARTH_SPIRIT
@ RADIUS_TOTEM_OF_SPIRITS
@ NPC_ENRAGED_WATERY_SOUL
@ SPELL_WATERY_SOUL_CAPTURED_CREDIT
@ SPELL_AIRY_SOUL_CAPTURED_CREDIT
@ QUEST_ENRAGED_SPIRITS_AIR
@ SPELL_FIERY_SOUL_CAPTURED_CREDIT
@ QUEST_ENRAGED_SPIRITS_WATER
@ NPC_ENRAGED_FIRE_SPIRIT
@ SPELL_SUMMON_ENRAGED_EARTH_SHARD
@ SPELL_ILLIDARI_DISGUISE_MALE
@ SPELL_ILLIDARI_DISGUISE_FEMALE
@ SPELL_KILL_CREDIT_CRAZED_COLOSSUS
#define EVENT_AREA_RADIUS
@ NPC_COILSKAR_ASSASSIN
@ QUEST_ESCAPE_COILSCAR
@ SPELL_EARTHBING_TOTEM
@ SPELL_CHAIN_LIGHTNING
@ NPC_DRAGONMAW_SUBJUGATOR
@ SPELL_HIT_FORCE_OF_NELTHARAKU
@ QUEST_THE_FORCE_OF_NELTHARAKU
@ SPELL_FORCE_OF_NELTHARAKU
@ SPELL_SPAWN_AND_PACIFY
@ SPELL_TRANSFORM_INFERNAL
@ EVENT_CAST_SUMMON_INFERNAL
@ SPELL_SUMMON_INFERNAL
@ NPC_INFERNAL_ATTACKER