TrinityCore
Loading...
Searching...
No Matches
zone_durotar.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 "CreatureAIImpl.h"
19#include "GameObject.h"
20#include "MotionMaster.h"
21#include "Player.h"
22#include "ScriptMgr.h"
23#include "ScriptedCreature.h"
24#include "Spell.h"
25#include "SpellAuraEffects.h"
26#include "SpellInfo.h"
27#include "SpellScript.h"
28#include "ScriptedGossip.h"
29#include "PassiveAI.h"
30#include "ObjectAccessor.h"
31
33{
34namespace Spells
35{
36 // All Aboard!
37 static constexpr uint32 PhasePlayer = 130750;
38
39 // Into the Mists
40 static constexpr uint32 TeleportTimer = 132034;
41 static constexpr uint32 TeleportPlayerToCrashSite = 102930;
42}
43
44/*######
45## Quest 37446: Lazy Peons
46## npc_lazy_peon
47######*/
48
53
61
63{
64public:
65 npc_lazy_peon() : CreatureScript("npc_lazy_peon") { }
66
67 CreatureAI* GetAI(Creature* creature) const override
68 {
69 return new npc_lazy_peonAI(creature);
70 }
71
73 {
74 npc_lazy_peonAI(Creature* creature) : ScriptedAI(creature)
75 {
76 Initialize();
77 }
78
80 {
81 RebuffTimer = 0;
82 work = false;
83 }
84
86 bool work;
87
88 void Reset() override
89 {
90 Initialize();
91 }
92
93 void MovementInform(uint32 /*type*/, uint32 id) override
94 {
95 if (id == 1)
96 work = true;
97 }
98
99 void SpellHit(WorldObject* caster, SpellInfo const* spell) override
100 {
101 if (spell->Id != SPELL_AWAKEN_PEON)
102 return;
103
104 Player* player = caster->ToPlayer();
106 {
107 player->KilledMonsterCredit(me->GetEntry(), me->GetGUID());
108 Talk(SAY_SPELL_HIT, caster);
110 if (GameObject* Lumberpile = me->FindNearestGameObject(GO_LUMBERPILE, 20))
111 me->GetMotionMaster()->MovePoint(1, Lumberpile->GetPositionX()-1, Lumberpile->GetPositionY(), Lumberpile->GetPositionZ());
112 }
113 }
114
115 void UpdateAI(uint32 diff) override
116 {
117 if (work == true)
119 if (RebuffTimer <= diff)
120 {
122 RebuffTimer = 300000; //Rebuff agian in 5 minutes
123 }
124 else
125 RebuffTimer -= diff;
126 if (!UpdateVictim())
127 return;
128 }
129 };
130};
131
133{
134 SPELL_BREW = 16712, // Special Brew
135 SPELL_GHOSTLY = 16713, // Ghostly
136 SPELL_HEX1 = 16707, // Hex
137 SPELL_HEX2 = 16708, // Hex
138 SPELL_HEX3 = 16709, // Hex
139 SPELL_GROW = 16711, // Grow
140 SPELL_LAUNCH = 16716, // Launch (Whee!)
141};
142
143// 17009 - Voodoo
145{
146 bool Validate(SpellInfo const* /*spellInfo*/) override
147 {
149 }
150
151 void HandleDummy(SpellEffIndex /*effIndex*/)
152 {
154 if (Unit* target = GetHitUnit())
155 GetCaster()->CastSpell(target, spellid, false);
156 }
157
162};
163
170
172{
173 npc_mithaka(Creature* creature) : ScriptedAI(creature), _shipInPort(false) { }
174
175 void SetData(uint32 /*type*/, uint32 data) override
176 {
177 if (data == DATA_SHIP_DOCKED)
178 _shipInPort = true;
179 else
180 _shipInPort = false;
181 }
182
183 bool OnGossipHello(Player* player) override
184 {
186 if (!_shipInPort)
189 return true;
190 }
191private:
193};
194
195// Echo Isles
196// 91404 - Summon Zuni (Lvl 1)
198{
200 {
201 dest.Relocate({ -1173.4531f, -5266.401f, 0.85905945f, 0.0f });
202 }
203
208};
209
218
220
222{
223 npc_durotar_tiki_target(Creature* creature) : ScriptedAI(creature), _credited(false) { }
224
231
232 void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
233 {
234 if (me->GetHealth() <= damage)
235 {
236 damage = 0;
237 me->SetHealth(1);
238
239 if (!_credited)
240 {
241 _credited = true;
242
244
245 if (Player* player = attacker->ToPlayer())
246 player->KilledMonsterCredit(me->GetEntry());
247
248 me->DespawnOrUnsummon(2s, 13s);
249 }
250 }
251 }
252
253private:
255};
256
283
284// 39062 - Darkspear Jailor
286{
288
289 void JustAppeared() override
290 {
292
293 if (me->HasStringId("darkspear_jailor_one"))
294 {
297 }
298 else if (me->HasStringId("darkspear_jailor_two"))
299 {
302 }
303 }
304
305 void DoAction(int32 param) override
306 {
307 if (param == ACTION_EVENT_COMPLETE)
308 {
309 _eventInProgress = false;
311 }
312 }
313
314 void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override
315 {
316 if (pathId == _pathCage)
317 {
321 }
322 }
323
324 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
325 {
326 CloseGossipMenuFor(player);
328 Talk(SAY_GET_IN_THE_PIT, player);
329 _eventInProgress = true;
332 return true;
333 }
334
335 void UpdateAI(uint32 diff) override
336 {
337 _events.Update(diff);
338
339 while (uint32 eventId = _events.ExecuteEvent())
340 {
341 switch (eventId)
342 {
345 break;
348 scout->AI()->DoAction(ACTION_MOVE_TO_PRISONER);
350 break;
351 default:
352 break;
353 }
354 }
355
356 if (!UpdateVictim())
357 return;
358 }
359private:
364};
365
379
380Position const PrisonerPositionOne = { -1142.49f, -5415.59f, 10.597655f };
381Position const PrisonerPositionTwo = { -1149.03f, -5526.18f, 8.1045685f };
382
383// 38142 - Captive Spitescale Scout
385{
387
388 void JustAppeared() override
389 {
391 }
392
393 void JustDied(Unit* /*killer*/) override
394 {
395 me->SetImmuneToPC(true);
396 me->DespawnOrUnsummon(10s, 7s);
397 }
398
399 void EnterEvadeMode(EvadeReason /*why*/) override
400 {
401 me->DespawnOrUnsummon(0s, 2s);
402 }
403
409
410 void DoAction(int32 param) override
411 {
412 if (param == ACTION_MOVE_TO_PRISONER)
413 {
414 me->SetWalk(true);
415
416 if (me->HasStringId("captive_spitescale_scout_one"))
418 else if (me->HasStringId("captive_spitescale_scout_two"))
420 }
421 }
422
423 void MovementInform(uint32 type, uint32 id) override
424 {
425 if (type == POINT_MOTION_TYPE && id == POINT_PRISONER_POSITION)
426 {
429 }
430 }
431
432 void UpdateAI(uint32 diff) override
433 {
434 _events.Update(diff);
435
436 while (uint32 eventId = _events.ExecuteEvent())
437 {
438 switch (eventId)
439 {
441 if (Creature* jailer = me->FindNearestCreature(NPC_DARKSPEAR_JAILOR, 25.0f, true))
442 jailer->AI()->DoAction(ACTION_EVENT_COMPLETE);
443 break;
446 me->SetImmuneToPC(false);
447 break;
449 me->DespawnOrUnsummon(0s, 2s);
450 break;
453 break;
454 default:
455 break;
456 }
457 }
458
459 if (!UpdateVictim())
460 return;
461 }
462
463private:
466};
467
506
507// Path point to proving pit fo trainers
509{
510 { -1158.99f, -5421.14f, 13.218976f, 0.2094395f }, // Nortet Pit
511 { -1137.0f, -5528.23f, 11.979752f, 3.1764990f }, // Tunari Pit
512 { -1145.95f, -5543.13f, 12.48863f, 1.7278759f }, // Seratha Pit
513 { -1146.67f, -5430.05f, 13.596256f, 1.4835298f }, // Legati Pit
514 { -1152.22f, -5407.6f, 13.263395f, 4.904375f }, // Nekali Pit
515 { -1136.46f, -5525.13f, 11.99673f, 3.3161256f }, // Ertezza Pit
516 { -1158.81f, -5533.08f, 11.939185f, 0.3141593f }, // Zentabra Pit
517 { -1149.92f, -5407.46f, 13.235063f, 4.956735f }, // Voldreka Pit
518 { -1151.54f, -5429.86f, 13.29182f, 1.256637f } // Zabrax Pit
519};
520
521template<uint8 PitPos, uint32 QuestID>
523{
525
526 void JustAppeared() override
527 {
529 }
530
531 void MovementInform(uint32 type, uint32 id) override
532 {
533 if (type == POINT_MOTION_TYPE && id == POINT_INITIAL_HOME)
534 _canMoveToPit = true;
535 }
536
537 void OnQuestAccept(Player* /*player*/, Quest const* quest) override
538 {
539 if (quest->GetQuestId() == QuestID)
540 {
541 if (_canMoveToPit)
542 {
544 _canMoveToPit = false;
545 }
546 }
547 }
548
549 void OnQuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override
550 {
551 if (quest->GetQuestId() == QuestID)
553 }
554
555 bool OnGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
556 {
557 // Use by Mage
558 if (menuId == GOSSIP_MENU_ARCANE_MOMENTUN)
559 {
560 CloseGossipMenuFor(player);
561
562 switch (gossipListId)
563 {
565 player->CastSpell(player, SPELL_LEARN_ARCANE_MOMENTUM);
566 break;
569 break;
570 default:
571 break;
572 }
573 return true;
574 }
575 return false;
576 }
577
578 void UpdateAI(uint32 diff) override
579 {
580 _events.Update(diff);
581
582 while (uint32 eventId = _events.ExecuteEvent())
583 {
584 switch (eventId)
585 {
587 me->SetWalk(true);
588 me->GetMotionMaster()->MovePoint(0, EchoIslandTrainersPitPoints[PitPos], true, EchoIslandTrainersPitPoints[PitPos].GetOrientation());
590 break;
591 case EVENT_MOVE_HOME:
592 me->SetWalk(true);
594 break;
595 default:
596 break;
597 }
598 }
599
600 if (!UpdateVictim())
601 return;
602 }
603
604private:
608};
609
610// 24639 - The Basics: Hitting Things (Warrior)
611// 24783 - The Basics: Hitting Things (Priest)
612// 24751 - The Basics: Hitting Things (Mage)
613// 24771 - The Basics: Hitting Things (Rogue)
614// 24759 - The Basics: Hitting Things (Shaman)
615// 24777 - The Basics: Hitting Things (Hunter)
616// 24765 - The Basics: Hitting Things (Druid)
617// 26273 - The Basics: Hitting Things (Warlock)
618// 31158 - The Basics: Hitting Things (Monk)
619template<uint32 TrainerEntry>
621{
622public:
623 quest_the_basics_hitting_things(char const* scriptName) : QuestScript(scriptName) { }
624
625 void OnQuestStatusChange(Player* player, Quest const* /*quest*/, QuestStatus /*oldStatus*/, QuestStatus newStatus) override
626 {
627 if (newStatus == QUEST_STATUS_COMPLETE)
628 {
629 if (Creature* creature = player->FindNearestCreature(TrainerEntry, 50.0f, true))
630 creature->AI()->Talk(SAY_NOT_BAD, player);
631 }
632 }
633};
634
635// 24642 - Proving Pit (Warrior)
636// 24786 - Proving Pit (Priest)
637// 24754 - Proving Pit (Mage)
638// 24774 - Proving Pit (Rogue)
639// 24762 - Proving Pit (Shaman)
640// 24780 - Proving Pit (Hunter)
641// 24768 - Proving Pit (Druid)
642// 26276 - Proving Pit (Warlock)
643// 31161 - Proving Pit (Monk)
644template<uint32 TrainerId>
646{
647public:
648 quest_proving_pit(char const* scriptName) : QuestScript(scriptName) { }
649
650 void OnQuestStatusChange(Player* player, Quest const* /*quest*/, QuestStatus /*oldStatus*/, QuestStatus newStatus) override
651 {
652 if (newStatus == QUEST_STATUS_COMPLETE)
653 {
654 if (Creature* creature = player->FindNearestCreature(TrainerId, 50.0f, true))
655 creature->AI()->Talk(SAY_WELL_DONE, player);
656 }
657 }
658};
659
661{
684
688
699
705
713
722
738
744};
745
746// 38966 - Vol'jin (specific script for guid 309032)
748{
750
751 void JustAppeared() override
752 {
754
755 Creature* garrosh = me->FindNearestCreatureWithOptions(10.0f, { .StringId = "vision_of_garrosh", .IgnorePhases = true });
756 Creature* voljin = me->FindNearestCreatureWithOptions(10.0f, { .StringId = "vision_of_voljin", .IgnorePhases = true });
757 Creature* bunny = me->FindNearestCreatureWithOptions(10.0f, { .StringId = "vision_brazier_bunny_garrosh", .IgnorePhases = true });
758 GameObject* brazier = me->FindNearestGameObjectWithOptions(10.0f, { .StringId = "vision_brazier_garrosh_voljin", .IgnorePhases = true });
759
760 if (!garrosh || !voljin || !bunny || !brazier)
761 return;
762
763 _garroshGUID = garrosh->GetGUID();
764 _voljinGUID = voljin->GetGUID();
765 _bunnyGUID = bunny->GetGUID();
766 _brazierGUID = brazier->GetGUID();
767 }
768
769 void OnQuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override
770 {
771 if (_scriptRunning)
772 return;
773
774 switch (quest->GetQuestId())
775 {
785 _scriptRunning = true;
787 break;
788 default:
789 break;
790 }
791 }
792
793 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
794 {
795 CloseGossipMenuFor(player);
797 _scriptRunning = true;
798 return false;
799 }
800
801 void UpdateAI(uint32 diff) override
802 {
803 if (!_scriptRunning)
804 return;
805
806 _events.Update(diff);
807
808 while (uint32 eventId = _events.ExecuteEvent())
809 {
810 switch (eventId)
811 {
813 {
816 break;
817 }
819 {
820 me->SetFacingTo(3.97935f);
823 break;
824 }
826 {
829 bunny->AI()->DoCastSelf(SPELL_VOLJINS_VISION_SMOKE);
831 brazier->SetGoState(GO_STATE_ACTIVE);
833 break;
834 }
836 {
838 {
839 garrosh->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_1);
840 garrosh->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_8);
841 }
842
844 break;
845 }
847 {
849 garrosh->AI()->Talk(SAY_GORROSH_VISION_SCRIPT_TEXT_0);
851 break;
852 }
854 {
856 {
857 voljin->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_1);
858 voljin->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_8);
859 }
861 break;
862 }
864 {
866 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_0);
868 break;
869 }
871 {
873 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_1);
875 break;
876 }
878 {
880 garrosh->AI()->Talk(SAY_GORROSH_VISION_SCRIPT_TEXT_1);
882 break;
883 }
885 {
887 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_2);
889 break;
890 }
892 {
894 garrosh->AI()->Talk(SAY_GORROSH_VISION_SCRIPT_TEXT_2);
896 break;
897 }
899 {
901 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_3);
903 break;
904 }
906 {
908 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_4);
910 break;
911 }
913 {
915 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_5);
917 break;
918 }
920 {
922 garrosh->AI()->Talk(SAY_GORROSH_VISION_SCRIPT_TEXT_3);
924 break;
925 }
927 {
929 garrosh->AI()->Talk(SAY_GORROSH_VISION_SCRIPT_TEXT_4);
931 break;
932 }
934 {
936 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_6);
938 break;
939 }
941 {
944 {
945 garrosh->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_8);
946 garrosh->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_1);
947 }
948
950 {
951 voljin->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_8);
952 voljin->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_1);
953 }
955 bunny->RemoveAura(SPELL_VOLJINS_VISION_SMOKE);
957 brazier->SetGoState(GO_STATE_READY);
959 break;
960 }
962 {
963 me->SetFacingTo(0.837758f);
966 break;
967 }
969 {
972 break;
973 }
975 {
978 break;
979 }
981 {
983 _scriptRunning = false;
984 break;
985 }
986 default:
987 break;
988 }
989 }
990 }
991
992private:
999};
1000
1001// 38966 - Vol'jin (specific script for guid 3000469)
1003{
1005
1006 void JustAppeared() override
1007 {
1009
1010 Creature* thrall = me->FindNearestCreatureWithOptions(10.0f, { .StringId = "vision_of_thrall", .IgnorePhases = true });
1011 Creature* bunny = me->FindNearestCreatureWithOptions(10.0f, { .StringId = "vision_brazier_bunny_thrall", .IgnorePhases = true });
1012 GameObject* brazier = me->FindNearestGameObjectWithOptions(10.0f, { .StringId = "vision_brazier_thrall", .IgnorePhases = true });
1013
1014 if (!thrall || !bunny || !brazier)
1015 return;
1016
1017 _thrallGUID = thrall->GetGUID();
1018 _bunnyGUID = bunny->GetGUID();
1019 _brazierGUID = brazier->GetGUID();
1020 }
1021
1022 void OnQuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override
1023 {
1024 if (_scriptRunning)
1025 return;
1026
1027 if (quest->GetQuestId() == QUEST_AN_ANCIENT_ENEMY)
1028 {
1029 _scriptRunning = true;
1031 }
1032 }
1033
1034 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
1035 {
1037 CloseGossipMenuFor(player);
1038 _scriptRunning = true;
1039 return false;
1040 }
1041
1042 void UpdateAI(uint32 diff) override
1043 {
1044 if (!_scriptRunning)
1045 return;
1046
1047 _events.Update(diff);
1048
1049 while (uint32 eventId = _events.ExecuteEvent())
1050 {
1051 switch (eventId)
1052 {
1054 {
1057 break;
1058 }
1060 {
1063 break;
1064 }
1066 {
1069 break;
1070 }
1072 {
1075 break;
1076 }
1078 {
1080 me->SetFacingTo(3.97935f);
1082 bunny->AI()->DoCastSelf(SPELL_VOLJINS_VISION_SMOKE);
1084 brazier->SetGoState(GO_STATE_ACTIVE);
1086 {
1087 thrall->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_2);
1088 thrall->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_8);
1089 }
1091 break;
1092 }
1094 {
1096 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_0);
1098 break;
1099 }
1101 {
1104 break;
1105 }
1107 {
1109 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_1);
1111 break;
1112 }
1114 {
1117 break;
1118 }
1120 {
1122 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_2);
1124 break;
1125 }
1127 {
1129 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_3);
1131 break;
1132 }
1134 {
1136 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_4);
1138 break;
1139 }
1141 {
1143 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_5);
1145 break;
1146 }
1148 {
1150 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_6);
1152 break;
1153 }
1155 {
1158 break;
1159 }
1161 {
1163 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_7);
1165 break;
1166 }
1168 {
1170 me->SetFacingTo(0.837758f);
1172 {
1173 thrall->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_8);
1174 thrall->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_2);
1175 }
1177 bunny->RemoveAura(SPELL_VOLJINS_VISION_SMOKE);
1179 brazier->SetGoState(GO_STATE_READY);
1182 break;
1183 }
1185 {
1188 break;
1189 }
1191 {
1194 break;
1195 }
1197 {
1200 break;
1201 }
1203 {
1206 break;
1207 }
1209 {
1211 _scriptRunning = false;
1212 break;
1213 }
1214 default:
1215 break;
1216 }
1217 }
1218 }
1219
1220private:
1226};
1227
1228// 8595 - Hellscream's Fist Gunship
1230{
1231public:
1232 at_hellscreams_fist_gunship() : AreaTriggerScript("at_hellscreams_fist_gunship") { }
1233
1234 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1235 {
1238 });
1239 return true;
1240 }
1241
1242 bool OnExit(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1243 {
1245 return true;
1246 }
1247};
1248
1249// 130810 - Teleport Prep
1251{
1252 bool Validate(SpellInfo const* /*spellInfo*/) override
1253 {
1254 return ValidateSpellInfo({
1256 });
1257 }
1258
1259 void HandleHitTarget(SpellEffIndex /*effIndex*/) const
1260 {
1261 Unit* hitUnit = GetHitUnit();
1262
1263 hitUnit->CancelMountAura();
1266 .TriggeringSpell = GetSpell()
1267 });
1268 }
1269
1274};
1275
1276// 132034 - Teleport Timer
1301}
1302
1304{
1305 using namespace Scripts::Kalimdor::Durotar;
1306
1307 new npc_lazy_peon();
1310
1311 // Echo Isles
1325 new quest_the_basics_hitting_things<NPC_TRAINER_NORTET>("quest_the_basics_hitting_things_warrior");
1326 new quest_the_basics_hitting_things<NPC_TRAINER_TUNARI>("quest_the_basics_hitting_things_priest");
1327 new quest_the_basics_hitting_things<NPC_TRAINER_SERATHA>("quest_the_basics_hitting_things_mage");
1328 new quest_the_basics_hitting_things<NPC_TRAINER_LEGATI>("quest_the_basics_hitting_things_rogue");
1329 new quest_the_basics_hitting_things<NPC_TRAINER_NEKALI>("quest_the_basics_hitting_things_shaman");
1330 new quest_the_basics_hitting_things<NPC_TRAINER_ERTEZZA>("quest_the_basics_hitting_things_hunter");
1331 new quest_the_basics_hitting_things<NPC_TRAINER_ZENTABRA>("quest_the_basics_hitting_things_druid");
1332 new quest_the_basics_hitting_things<NPC_TRAINER_VOLDREKA>("quest_the_basics_hitting_things_warlock");
1333 new quest_the_basics_hitting_things<NPC_TRAINER_ZABRAX>("quest_the_basics_hitting_things_monk");
1334 new quest_proving_pit<NPC_TRAINER_NORTET>("quest_proving_pit_warrior");
1335 new quest_proving_pit<NPC_TRAINER_TUNARI>("quest_proving_pit_priest");
1336 new quest_proving_pit<NPC_TRAINER_SERATHA>("quest_proving_pit_mage");
1337 new quest_proving_pit<NPC_TRAINER_LEGATI>("quest_proving_pit_rogue");
1338 new quest_proving_pit<NPC_TRAINER_NEKALI>("quest_proving_pit_shaman");
1339 new quest_proving_pit<NPC_TRAINER_ERTEZZA>("quest_proving_pit_hunter");
1340 new quest_proving_pit<NPC_TRAINER_ZENTABRA>("quest_proving_pit_druid");
1341 new quest_proving_pit<NPC_TRAINER_VOLDREKA>("quest_proving_pit_warlock");
1342 new quest_proving_pit<NPC_TRAINER_ZABRAX>("quest_proving_pit_monk");
1345
1346 // AreaTriggers
1348
1349 // Spells
1352}
First const & RAND(First const &first, Second const &second, Rest const &... rest)
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
LootItemType
@ POINT_MOTION_TYPE
Spells
Definition PlayerAI.cpp:32
QuestStatus
Definition QuestDef.h:146
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:150
@ QUEST_STATUS_COMPLETE
Definition QuestDef.h:148
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
#define RegisterCreatureAI(ai_name)
Definition ScriptMgr.h:1392
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
void AddGossipItemFor(Player *player, GossipOptionNpc optionNpc, std::string text, uint32 sender, uint32 action)
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const &guid)
void InitGossipMenuFor(Player *player, uint32 menuId)
void CloseGossipMenuFor(Player *player)
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
SpellEffIndex
@ EFFECT_0
@ TARGET_DEST_NEARBY_ENTRY
@ EMOTE_ONESHOT_WORK_CHOPWOOD
@ EMOTE_ONESHOT_USE_STANDING
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_APPLY_AURA
@ GO_STATE_READY
@ GO_STATE_ACTIVE
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_DUMMY
@ TRIGGERED_IGNORE_CAST_IN_PROGRESS
Will not check if a current cast is in progress.
@ TRIGGERED_DONT_REPORT_CAST_ERROR
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
#define SpellEffectFn(F, I, N)
#define SpellDestinationTargetSelectFn(F, I, N)
#define AuraEffectRemoveFn(F, I, N, M)
EvadeReason
@ REACT_PASSIVE
DamageEffectType
HookList< EffectApplyHandler > AfterEffectRemove
Unit * GetTarget() const
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void SetImmuneToPC(bool apply) override
Definition Creature.h:184
void SetReactState(ReactStates st)
Definition Creature.h:174
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool HasStringId(std::string_view id) const
void SetGossipMenuId(uint32 gossipMenuId)
uint32 ExecuteEvent()
Definition EventMap.cpp:77
void Update(uint32 time)
Definition EventMap.h:61
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
void CancelEvent(uint32 eventId)
Definition EventMap.cpp:135
void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:56
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MovePath(uint32 pathId, bool repeatable, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, Optional< bool > exactSplinePath={}, bool generatePath=true, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
Player * ToPlayer()
Definition Object.h:126
uint32 GetEntry() const
Definition Object.h:89
void KilledMonsterCredit(uint32 entry, ObjectGuid guid=ObjectGuid::Empty)
Definition Player.cpp:16679
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15962
uint32 GetQuestId() const
Definition QuestDef.h:637
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
bool OnExit(Player *player, AreaTriggerEntry const *) override
CreatureAI * GetAI(Creature *creature) const override
void OnQuestStatusChange(Player *player, Quest const *, QuestStatus, QuestStatus newStatus) override
void OnQuestStatusChange(Player *player, Quest const *, QuestStatus, QuestStatus newStatus) override
void HandleAfterEffectRemove(AuraEffect const *, AuraEffectHandleModes) const
bool Validate(SpellInfo const *) override
uint32 const Id
Definition SpellInfo.h:328
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Unit * GetCaster() const
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Spell * GetSpell() const
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
void SetHealth(uint64 val)
Definition Unit.cpp:9973
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3828
void CancelTravelShapeshiftForm(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, bool force=false)
Definition Unit.h:1507
MotionMaster * GetMotionMaster()
Definition Unit.h:1723
void CancelMountAura(bool force=false)
Definition Unit.cpp:8350
uint64 GetHealth() const
Definition Unit.h:788
bool SetWalk(bool enable)
Definition Unit.cpp:13343
void SetFacingTo(float const ori, bool force=true)
Definition Unit.cpp:13289
void RemoveAllAuras()
Definition Unit.cpp:4382
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition Unit.cpp:1657
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3974
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition Object.cpp:1539
Creature * FindNearestCreatureWithOptions(float range, FindCreatureOptions const &options) const
Definition Object.cpp:1526
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2217
GameObject * FindNearestGameObjectWithOptions(float range, FindGameObjectOptions const &options) const
Definition Object.cpp:1548
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:1517
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
static constexpr uint32 TeleportPlayerToCrashSite
static constexpr uint32 TeleportTimer
static constexpr uint32 PhasePlayer
Position const PrisonerPositionTwo
Position const EchoIslandTrainersPitPoints[9]
Position const PrisonerPositionOne
TriggerCastFlags TriggerFlags
constexpr void GetPosition(float &x, float &y) const
Definition Position.h:92
constexpr float GetOrientation() const
Definition Position.h:90
void MovementInform(uint32 type, uint32 id) override
bool OnGossipSelect(Player *player, uint32, uint32) override
void WaypointPathEnded(uint32, uint32 pathId) override
void DamageTaken(Unit *attacker, uint32 &damage, DamageEffectType, SpellInfo const *) override
void OnQuestReward(Player *, Quest const *quest, LootItemType, uint32) override
bool OnGossipSelect(Player *player, uint32 menuId, uint32 gossipListId) override
void OnQuestAccept(Player *, Quest const *quest) override
void MovementInform(uint32 type, uint32 id) override
void SpellHit(WorldObject *caster, SpellInfo const *spell) override
bool OnGossipHello(Player *player) override
void SetData(uint32, uint32 data) override
bool OnGossipSelect(Player *player, uint32, uint32) override
void OnQuestReward(Player *, Quest const *quest, LootItemType, uint32) override
bool OnGossipSelect(Player *player, uint32, uint32) override
void OnQuestReward(Player *, Quest const *quest, LootItemType, uint32) override
void Relocate(Position const &pos)
Definition Spell.cpp:82
void AddSC_durotar()