TrinityCore
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 "SpellInfo.h"
25#include "SpellScript.h"
26#include "ScriptedGossip.h"
27#include "PassiveAI.h"
28#include "ObjectAccessor.h"
29
30/*######
31## Quest 37446: Lazy Peons
32## npc_lazy_peon
33######*/
34
36{
38};
39
41{
43 GO_LUMBERPILE = 175784,
45 SPELL_AWAKEN_PEON = 19938
46};
47
49{
50public:
51 npc_lazy_peon() : CreatureScript("npc_lazy_peon") { }
52
53 CreatureAI* GetAI(Creature* creature) const override
54 {
55 return new npc_lazy_peonAI(creature);
56 }
57
59 {
60 npc_lazy_peonAI(Creature* creature) : ScriptedAI(creature)
61 {
62 Initialize();
63 }
64
66 {
67 RebuffTimer = 0;
68 work = false;
69 }
70
72 bool work;
73
74 void Reset() override
75 {
76 Initialize();
77 }
78
79 void MovementInform(uint32 /*type*/, uint32 id) override
80 {
81 if (id == 1)
82 work = true;
83 }
84
85 void SpellHit(WorldObject* caster, SpellInfo const* spell) override
86 {
87 if (spell->Id != SPELL_AWAKEN_PEON)
88 return;
89
90 Player* player = caster->ToPlayer();
92 {
94 Talk(SAY_SPELL_HIT, caster);
96 if (GameObject* Lumberpile = me->FindNearestGameObject(GO_LUMBERPILE, 20))
97 me->GetMotionMaster()->MovePoint(1, Lumberpile->GetPositionX()-1, Lumberpile->GetPositionY(), Lumberpile->GetPositionZ());
98 }
99 }
100
101 void UpdateAI(uint32 diff) override
102 {
103 if (work == true)
105 if (RebuffTimer <= diff)
106 {
108 RebuffTimer = 300000; //Rebuff agian in 5 minutes
109 }
110 else
111 RebuffTimer -= diff;
112 if (!UpdateVictim())
113 return;
114 }
115 };
116};
117
119{
120 SPELL_BREW = 16712, // Special Brew
121 SPELL_GHOSTLY = 16713, // Ghostly
122 SPELL_HEX1 = 16707, // Hex
123 SPELL_HEX2 = 16708, // Hex
124 SPELL_HEX3 = 16709, // Hex
125 SPELL_GROW = 16711, // Grow
126 SPELL_LAUNCH = 16716, // Launch (Whee!)
127};
128
129// 17009 - Voodoo
131{
132 bool Validate(SpellInfo const* /*spellInfo*/) override
133 {
135 }
136
137 void HandleDummy(SpellEffIndex /*effIndex*/)
138 {
140 if (Unit* target = GetHitUnit())
141 GetCaster()->CastSpell(target, spellid, false);
142 }
143
144 void Register() override
145 {
147 }
148};
149
151{
154 GOSSIP_TEXT_MITHAKA = 35969
156
158{
159 npc_mithaka(Creature* creature) : ScriptedAI(creature), _shipInPort(false) { }
160
161 void SetData(uint32 /*type*/, uint32 data) override
162 {
163 if (data == DATA_SHIP_DOCKED)
164 _shipInPort = true;
165 else
166 _shipInPort = false;
167 }
168
169 bool OnGossipHello(Player* player) override
170 {
172 if (!_shipInPort)
175 return true;
176 }
177private:
179};
180
181// Echo Isles
182// 91404 - Summon Zuni (Lvl 1)
184{
186 {
187 dest.Relocate({ -1173.4531f, -5266.401f, 0.85905945f, 0.0f });
188 }
189
190 void Register() override
191 {
193 }
194};
195
197{
204
206
208{
209 npc_durotar_tiki_target(Creature* creature) : ScriptedAI(creature), _credited(false) { }
210
211 void JustAppeared() override
212 {
216 }
217
218 void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
219 {
220 if (me->GetHealth() <= damage)
221 {
222 damage = 0;
223 me->SetHealth(1);
224
225 if (!_credited)
226 {
227 _credited = true;
228
230
231 if (Player* player = attacker->ToPlayer())
232 player->KilledMonsterCredit(me->GetEntry());
233
234 me->DespawnOrUnsummon(2s, 13s);
235 }
236 }
237 }
238
239private:
241};
242
244{
247
250
253
256
259
260 PATH_CAGE_ONE = 30915500,
261 PATH_HOME_ONE = 30915501,
262 PATH_CAGE_TWO = 30908200,
263 PATH_HOME_TWO = 30908201,
264
266
268};
269
270// 39062 - Darkspear Jailor
272{
274
275 void JustAppeared() override
276 {
278
279 if (me->HasStringId("darkspear_jailor_one"))
280 {
283 }
284 else if (me->HasStringId("darkspear_jailor_two"))
285 {
288 }
289 }
290
291 void DoAction(int32 param) override
292 {
293 if (param == ACTION_EVENT_COMPLETE)
294 {
295 _eventInProgress = false;
297 }
298 }
299
300 void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override
301 {
302 if (pathId == _pathCage)
303 {
307 }
308 }
309
310 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
311 {
312 CloseGossipMenuFor(player);
314 Talk(SAY_GET_IN_THE_PIT, player);
315 _eventInProgress = true;
318 return true;
319 }
320
321 void UpdateAI(uint32 diff) override
322 {
323 _events.Update(diff);
324
325 while (uint32 eventId = _events.ExecuteEvent())
326 {
327 switch (eventId)
328 {
331 break;
334 scout->AI()->DoAction(ACTION_MOVE_TO_PRISONER);
336 break;
337 default:
338 break;
339 }
340 }
341
342 if (!UpdateVictim())
343 return;
344 }
345private:
350};
351
353{
358
360
362
363 SPELL_FROST_SHOCK = 15089
365
366Position const PrisonerPositionOne = { -1142.49f, -5415.59f, 10.597655f };
367Position const PrisonerPositionTwo = { -1149.03f, -5526.18f, 8.1045685f };
368
369// 38142 - Captive Spitescale Scout
371{
373
374 void JustAppeared() override
375 {
377 }
378
379 void JustDied(Unit* /*killer*/) override
380 {
381 me->SetImmuneToPC(true);
382 me->DespawnOrUnsummon(10s, 7s);
383 }
384
385 void EnterEvadeMode(EvadeReason /*why*/) override
386 {
387 me->DespawnOrUnsummon(0s, 2s);
388 }
389
390 void JustEngagedWith(Unit* /*who*/) override
391 {
394 }
395
396 void DoAction(int32 param) override
397 {
398 if (param == ACTION_MOVE_TO_PRISONER)
399 {
400 me->SetWalk(true);
401
402 if (me->HasStringId("captive_spitescale_scout_one"))
404 else if (me->HasStringId("captive_spitescale_scout_two"))
406 }
407 }
408
409 void MovementInform(uint32 type, uint32 id) override
410 {
411 if (type == POINT_MOTION_TYPE && id == POINT_PRISONER_POSITION)
412 {
415 }
416 }
417
418 void UpdateAI(uint32 diff) override
419 {
420 _events.Update(diff);
421
422 while (uint32 eventId = _events.ExecuteEvent())
423 {
424 switch (eventId)
425 {
427 if (Creature* jailer = me->FindNearestCreature(NPC_DARKSPEAR_JAILOR, 25.0f, true))
428 jailer->AI()->DoAction(ACTION_EVENT_COMPLETE);
429 break;
432 me->SetImmuneToPC(false);
433 break;
435 me->DespawnOrUnsummon(0s, 2s);
436 break;
439 break;
440 default:
441 break;
442 }
443 }
444
445 if (!UpdateVictim())
446 return;
447 }
448
449private:
452};
453
455{
458
460
463
464 NPC_TRAINER_NORTET = 38037, // Warrior Trainer
465 NPC_TRAINER_TUNARI = 38245, // Priest Trainer
466 NPC_TRAINER_SERATHA = 38246, // Mage Trainer
467 NPC_TRAINER_LEGATI = 38244, // Rogue Trainer
468 NPC_TRAINER_NEKALI = 38242, // Shaman Trainer
469 NPC_TRAINER_ERTEZZA = 38247, // Hunter Trainer
470 NPC_TRAINER_ZENTABRA = 38243, // Druid Trainer
471 NPC_TRAINER_VOLDREKA = 42618, // Warlock Trainer
472 NPC_TRAINER_ZABRAX = 63310, // Monk Trainer
473
483
486
489
491};
492
493// Path point to proving pit fo trainers
495{
496 { -1158.99f, -5421.14f, 13.218976f, 0.2094395f }, // Nortet Pit
497 { -1137.0f, -5528.23f, 11.979752f, 3.1764990f }, // Tunari Pit
498 { -1145.95f, -5543.13f, 12.48863f, 1.7278759f }, // Seratha Pit
499 { -1146.67f, -5430.05f, 13.596256f, 1.4835298f }, // Legati Pit
500 { -1152.22f, -5407.6f, 13.263395f, 4.904375f }, // Nekali Pit
501 { -1136.46f, -5525.13f, 11.99673f, 3.3161256f }, // Ertezza Pit
502 { -1158.81f, -5533.08f, 11.939185f, 0.3141593f }, // Zentabra Pit
503 { -1149.92f, -5407.46f, 13.235063f, 4.956735f }, // Voldreka Pit
504 { -1151.54f, -5429.86f, 13.29182f, 1.256637f } // Zabrax Pit
505};
506
507template<uint8 PitPos, uint32 QuestID>
509{
511
512 void JustAppeared() override
513 {
515 }
516
517 void MovementInform(uint32 type, uint32 id) override
518 {
519 if (type == POINT_MOTION_TYPE && id == POINT_INITIAL_HOME)
520 _canMoveToPit = true;
521 }
522
523 void OnQuestAccept(Player* /*player*/, Quest const* quest) override
524 {
525 if (quest->GetQuestId() == QuestID)
526 {
527 if (_canMoveToPit)
528 {
530 _canMoveToPit = false;
531 }
532 }
533 }
534
535 void OnQuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override
536 {
537 if (quest->GetQuestId() == QuestID)
539 }
540
541 bool OnGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
542 {
543 // Use by Mage
544 if (menuId == GOSSIP_MENU_ARCANE_MOMENTUN)
545 {
546 CloseGossipMenuFor(player);
547
548 switch (gossipListId)
549 {
551 player->CastSpell(player, SPELL_LEARN_ARCANE_MOMENTUM);
552 break;
555 break;
556 default:
557 break;
558 }
559 return true;
560 }
561 return false;
562 }
563
564 void UpdateAI(uint32 diff) override
565 {
566 _events.Update(diff);
567
568 while (uint32 eventId = _events.ExecuteEvent())
569 {
570 switch (eventId)
571 {
573 me->SetWalk(true);
574 me->GetMotionMaster()->MovePoint(0, EchoIslandTrainersPitPoints[PitPos], true, EchoIslandTrainersPitPoints[PitPos].GetOrientation());
576 break;
577 case EVENT_MOVE_HOME:
578 me->SetWalk(true);
580 break;
581 default:
582 break;
583 }
584 }
585
586 if (!UpdateVictim())
587 return;
588 }
589
590private:
594};
595
596// 24639 - The Basics: Hitting Things (Warrior)
597// 24783 - The Basics: Hitting Things (Priest)
598// 24751 - The Basics: Hitting Things (Mage)
599// 24771 - The Basics: Hitting Things (Rogue)
600// 24759 - The Basics: Hitting Things (Shaman)
601// 24777 - The Basics: Hitting Things (Hunter)
602// 24765 - The Basics: Hitting Things (Druid)
603// 26273 - The Basics: Hitting Things (Warlock)
604// 31158 - The Basics: Hitting Things (Monk)
605template<uint32 TrainerEntry>
607{
608public:
609 quest_the_basics_hitting_things(char const* scriptName) : QuestScript(scriptName) { }
610
611 void OnQuestStatusChange(Player* player, Quest const* /*quest*/, QuestStatus /*oldStatus*/, QuestStatus newStatus) override
612 {
613 if (newStatus == QUEST_STATUS_COMPLETE)
614 {
615 if (Creature* creature = player->FindNearestCreature(TrainerEntry, 50.0f, true))
616 creature->AI()->Talk(SAY_NOT_BAD, player);
617 }
618 }
619};
620
621// 24642 - Proving Pit (Warrior)
622// 24786 - Proving Pit (Priest)
623// 24754 - Proving Pit (Mage)
624// 24774 - Proving Pit (Rogue)
625// 24762 - Proving Pit (Shaman)
626// 24780 - Proving Pit (Hunter)
627// 24768 - Proving Pit (Druid)
628// 26276 - Proving Pit (Warlock)
629// 31161 - Proving Pit (Monk)
630template<uint32 TrainerId>
632{
633public:
634 quest_proving_pit(char const* scriptName) : QuestScript(scriptName) { }
635
636 void OnQuestStatusChange(Player* player, Quest const* /*quest*/, QuestStatus /*oldStatus*/, QuestStatus newStatus) override
637 {
638 if (newStatus == QUEST_STATUS_COMPLETE)
639 {
640 if (Creature* creature = player->FindNearestCreature(TrainerId, 50.0f, true))
641 creature->AI()->Talk(SAY_WELL_DONE, player);
642 }
643 }
644};
645
647{
670
674
685
691
699
708
724
730};
731
732// 38966 - Vol'jin (specific script for guid 309032)
734{
736
737 void JustAppeared() override
738 {
740
741 Creature* garrosh = me->FindNearestCreatureWithOptions(10.0f, { .StringId = "vision_of_garrosh", .IgnorePhases = true });
742 Creature* voljin = me->FindNearestCreatureWithOptions(10.0f, { .StringId = "vision_of_voljin", .IgnorePhases = true });
743 Creature* bunny = me->FindNearestCreatureWithOptions(10.0f, { .StringId = "vision_brazier_bunny_garrosh", .IgnorePhases = true });
744 GameObject* brazier = me->FindNearestGameObjectWithOptions(10.0f, { .StringId = "vision_brazier_garrosh_voljin", .IgnorePhases = true });
745
746 if (!garrosh || !voljin || !bunny || !brazier)
747 return;
748
749 _garroshGUID = garrosh->GetGUID();
750 _voljinGUID = voljin->GetGUID();
751 _bunnyGUID = bunny->GetGUID();
752 _brazierGUID = brazier->GetGUID();
753 }
754
755 void OnQuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override
756 {
757 if (_scriptRunning)
758 return;
759
760 switch (quest->GetQuestId())
761 {
771 _scriptRunning = true;
773 break;
774 default:
775 break;
776 }
777 }
778
779 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
780 {
781 CloseGossipMenuFor(player);
783 _scriptRunning = true;
784 return false;
785 }
786
787 void UpdateAI(uint32 diff) override
788 {
789 if (!_scriptRunning)
790 return;
791
792 _events.Update(diff);
793
794 while (uint32 eventId = _events.ExecuteEvent())
795 {
796 switch (eventId)
797 {
799 {
802 break;
803 }
805 {
806 me->SetFacingTo(3.97935f);
809 break;
810 }
812 {
815 bunny->AI()->DoCastSelf(SPELL_VOLJINS_VISION_SMOKE);
817 brazier->SetGoState(GO_STATE_ACTIVE);
819 break;
820 }
822 {
824 {
825 garrosh->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_1);
826 garrosh->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_8);
827 }
828
830 break;
831 }
833 {
835 garrosh->AI()->Talk(SAY_GORROSH_VISION_SCRIPT_TEXT_0);
837 break;
838 }
840 {
842 {
843 voljin->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_1);
844 voljin->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_8);
845 }
847 break;
848 }
850 {
852 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_0);
854 break;
855 }
857 {
859 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_1);
861 break;
862 }
864 {
866 garrosh->AI()->Talk(SAY_GORROSH_VISION_SCRIPT_TEXT_1);
868 break;
869 }
871 {
873 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_2);
875 break;
876 }
878 {
880 garrosh->AI()->Talk(SAY_GORROSH_VISION_SCRIPT_TEXT_2);
882 break;
883 }
885 {
887 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_3);
889 break;
890 }
892 {
894 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_4);
896 break;
897 }
899 {
901 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_5);
903 break;
904 }
906 {
908 garrosh->AI()->Talk(SAY_GORROSH_VISION_SCRIPT_TEXT_3);
910 break;
911 }
913 {
915 garrosh->AI()->Talk(SAY_GORROSH_VISION_SCRIPT_TEXT_4);
917 break;
918 }
920 {
922 voljin->AI()->Talk(SAY_VOLJIN_VISION_SCRIPT_TEXT_6);
924 break;
925 }
927 {
930 {
931 garrosh->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_8);
932 garrosh->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_1);
933 }
934
936 {
937 voljin->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_8);
938 voljin->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_1);
939 }
941 bunny->RemoveAura(SPELL_VOLJINS_VISION_SMOKE);
943 brazier->SetGoState(GO_STATE_READY);
945 break;
946 }
948 {
949 me->SetFacingTo(0.837758f);
952 break;
953 }
955 {
958 break;
959 }
961 {
964 break;
965 }
967 {
969 _scriptRunning = false;
970 break;
971 }
972 default:
973 break;
974 }
975 }
976 }
977
978private:
985};
986
987// 38966 - Vol'jin (specific script for guid 3000469)
989{
991
992 void JustAppeared() override
993 {
995
996 Creature* thrall = me->FindNearestCreatureWithOptions(10.0f, { .StringId = "vision_of_thrall", .IgnorePhases = true });
997 Creature* bunny = me->FindNearestCreatureWithOptions(10.0f, { .StringId = "vision_brazier_bunny_thrall", .IgnorePhases = true });
998 GameObject* brazier = me->FindNearestGameObjectWithOptions(10.0f, { .StringId = "vision_brazier_thrall", .IgnorePhases = true });
999
1000 if (!thrall || !bunny || !brazier)
1001 return;
1002
1003 _thrallGUID = thrall->GetGUID();
1004 _bunnyGUID = bunny->GetGUID();
1005 _brazierGUID = brazier->GetGUID();
1006 }
1007
1008 void OnQuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override
1009 {
1010 if (_scriptRunning)
1011 return;
1012
1013 if (quest->GetQuestId() == QUEST_AN_ANCIENT_ENEMY)
1014 {
1015 _scriptRunning = true;
1017 }
1018 }
1019
1020 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
1021 {
1023 CloseGossipMenuFor(player);
1024 _scriptRunning = true;
1025 return false;
1026 }
1027
1028 void UpdateAI(uint32 diff) override
1029 {
1030 if (!_scriptRunning)
1031 return;
1032
1033 _events.Update(diff);
1034
1035 while (uint32 eventId = _events.ExecuteEvent())
1036 {
1037 switch (eventId)
1038 {
1040 {
1043 break;
1044 }
1046 {
1049 break;
1050 }
1052 {
1055 break;
1056 }
1058 {
1061 break;
1062 }
1064 {
1066 me->SetFacingTo(3.97935f);
1068 bunny->AI()->DoCastSelf(SPELL_VOLJINS_VISION_SMOKE);
1070 brazier->SetGoState(GO_STATE_ACTIVE);
1072 {
1073 thrall->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_2);
1074 thrall->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_8);
1075 }
1077 break;
1078 }
1080 {
1082 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_0);
1084 break;
1085 }
1087 {
1090 break;
1091 }
1093 {
1095 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_1);
1097 break;
1098 }
1100 {
1103 break;
1104 }
1106 {
1108 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_2);
1110 break;
1111 }
1113 {
1115 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_3);
1117 break;
1118 }
1120 {
1122 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_4);
1124 break;
1125 }
1127 {
1129 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_5);
1131 break;
1132 }
1134 {
1136 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_6);
1138 break;
1139 }
1141 {
1144 break;
1145 }
1147 {
1149 thrall->AI()->Talk(SAY_THRALL_VISION_SCRIPT_TEXT_7);
1151 break;
1152 }
1154 {
1156 me->SetFacingTo(0.837758f);
1158 {
1159 thrall->AI()->DoCastSelf(SPELL_GENERIC_QUEST_INVISIBILITY_8);
1160 thrall->RemoveAura(SPELL_GENERIC_QUEST_INVISIBILITY_2);
1161 }
1163 bunny->RemoveAura(SPELL_VOLJINS_VISION_SMOKE);
1165 brazier->SetGoState(GO_STATE_READY);
1168 break;
1169 }
1171 {
1174 break;
1175 }
1177 {
1180 break;
1181 }
1183 {
1186 break;
1187 }
1189 {
1192 break;
1193 }
1195 {
1197 _scriptRunning = false;
1198 break;
1199 }
1200 default:
1201 break;
1202 }
1203 }
1204 }
1205
1206private:
1212};
1213
1215{
1216 new npc_lazy_peon();
1219
1220 // Echo Isles
1234 new quest_the_basics_hitting_things<NPC_TRAINER_NORTET>("quest_the_basics_hitting_things_warrior");
1235 new quest_the_basics_hitting_things<NPC_TRAINER_TUNARI>("quest_the_basics_hitting_things_priest");
1236 new quest_the_basics_hitting_things<NPC_TRAINER_SERATHA>("quest_the_basics_hitting_things_mage");
1237 new quest_the_basics_hitting_things<NPC_TRAINER_LEGATI>("quest_the_basics_hitting_things_rogue");
1238 new quest_the_basics_hitting_things<NPC_TRAINER_NEKALI>("quest_the_basics_hitting_things_shaman");
1239 new quest_the_basics_hitting_things<NPC_TRAINER_ERTEZZA>("quest_the_basics_hitting_things_hunter");
1240 new quest_the_basics_hitting_things<NPC_TRAINER_ZENTABRA>("quest_the_basics_hitting_things_druid");
1241 new quest_the_basics_hitting_things<NPC_TRAINER_VOLDREKA>("quest_the_basics_hitting_things_warlock");
1242 new quest_the_basics_hitting_things<NPC_TRAINER_ZABRAX>("quest_the_basics_hitting_things_monk");
1243 new quest_proving_pit<NPC_TRAINER_NORTET>("quest_proving_pit_warrior");
1244 new quest_proving_pit<NPC_TRAINER_TUNARI>("quest_proving_pit_priest");
1245 new quest_proving_pit<NPC_TRAINER_SERATHA>("quest_proving_pit_mage");
1246 new quest_proving_pit<NPC_TRAINER_LEGATI>("quest_proving_pit_rogue");
1247 new quest_proving_pit<NPC_TRAINER_NEKALI>("quest_proving_pit_shaman");
1248 new quest_proving_pit<NPC_TRAINER_ERTEZZA>("quest_proving_pit_hunter");
1249 new quest_proving_pit<NPC_TRAINER_ZENTABRA>("quest_proving_pit_druid");
1250 new quest_proving_pit<NPC_TRAINER_VOLDREKA>("quest_proving_pit_warlock");
1251 new quest_proving_pit<NPC_TRAINER_ZABRAX>("quest_proving_pit_monk");
1254}
First const & RAND(First const &first, Second const &second, Rest const &... rest)
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
LootItemType
Definition: LootItemType.h:24
@ POINT_MOTION_TYPE
QuestStatus
Definition: QuestDef.h:141
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:145
@ QUEST_STATUS_COMPLETE
Definition: QuestDef.h:143
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
#define RegisterCreatureAI(ai_name)
Definition: ScriptMgr.h:1380
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
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
Definition: SharedDefines.h:29
@ EFFECT_0
Definition: SharedDefines.h:30
@ TARGET_DEST_NEARBY_ENTRY
@ EMOTE_ONESHOT_WORK_CHOPWOOD
@ EMOTE_ONESHOT_USE_STANDING
@ SPELL_EFFECT_DUMMY
@ GO_STATE_READY
@ GO_STATE_ACTIVE
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define SpellDestinationTargetSelectFn(F, I, N)
Definition: SpellScript.h:874
EvadeReason
Definition: UnitAICommon.h:30
@ REACT_PASSIVE
Definition: UnitDefines.h:506
DamageEffectType
Definition: UnitDefines.h:131
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
void SetImmuneToPC(bool apply) override
Definition: Creature.h:170
void SetReactState(ReactStates st)
Definition: Creature.h:160
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
bool HasStringId(std::string_view id) const
Definition: Creature.cpp:3165
void SetGossipMenuId(uint32 gossipMenuId)
Definition: Creature.cpp:3690
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:131
void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:52
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={}, bool generatePath=true)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
static Player * ToPlayer(Object *o)
Definition: Object.h:213
void KilledMonsterCredit(uint32 entry, ObjectGuid guid=ObjectGuid::Empty)
Definition: Player.cpp:16680
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: Player.cpp:16050
uint32 GetQuestId() const
Definition: QuestDef.h:587
uint32 const Id
Definition: SpellInfo.h:325
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
Unit * GetCaster() const
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
Definition: SpellScript.h:873
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:159
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void SetHealth(uint64 val)
Definition: Unit.cpp:9346
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3685
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
uint64 GetHealth() const
Definition: Unit.h:776
bool SetWalk(bool enable)
Definition: Unit.cpp:12707
void SetFacingTo(float const ori, bool force=true)
Definition: Unit.cpp:12653
void RemoveAllAuras()
Definition: Unit.cpp:4242
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition: Unit.cpp:1598
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition: Object.cpp:2170
Creature * FindNearestCreatureWithOptions(float range, FindCreatureOptions const &options) const
Definition: Object.cpp:2157
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
GameObject * FindNearestGameObjectWithOptions(float range, FindGameObjectOptions const &options) const
Definition: Object.cpp:2179
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2148
CreatureAI * GetAI(Creature *creature) const override
quest_proving_pit(char const *scriptName)
void OnQuestStatusChange(Player *player, Quest const *, QuestStatus, QuestStatus newStatus) override
quest_the_basics_hitting_things(char const *scriptName)
void OnQuestStatusChange(Player *player, Quest const *, QuestStatus, QuestStatus newStatus) override
void SetDest(SpellDestination &dest)
void Register() override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
constexpr void GetPosition(float &x, float &y) const
Definition: Position.h:81
constexpr float GetOrientation() const
Definition: Position.h:79
void Relocate(Position const &pos)
Definition: Spell.cpp:111
void JustEngagedWith(Unit *) override
void EnterEvadeMode(EvadeReason) override
void JustDied(Unit *) override
void DoAction(int32 param) override
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
npc_captive_spitescale_scout(Creature *creature)
void DoAction(int32 param) override
void UpdateAI(uint32 diff) override
void JustAppeared() override
void WaypointPathEnded(uint32, uint32 pathId) override
npc_darkspear_jailor(Creature *creature)
bool OnGossipSelect(Player *player, uint32, uint32) override
void JustAppeared() override
npc_durotar_tiki_target(Creature *creature)
void DamageTaken(Unit *attacker, uint32 &damage, DamageEffectType, SpellInfo const *) override
npc_echo_isles_class_trainer(Creature *creature)
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 UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
npc_lazy_peonAI(Creature *creature)
void MovementInform(uint32, uint32 id) override
void SpellHit(WorldObject *caster, SpellInfo const *spell) override
void UpdateAI(uint32 diff) override
npc_mithaka(Creature *creature)
bool OnGossipHello(Player *player) override
void SetData(uint32, uint32 data) override
void OnQuestReward(Player *, Quest const *quest, LootItemType, uint32) override
void UpdateAI(uint32 diff) override
npc_voljin_garrosh_vision(Creature *creature)
bool OnGossipSelect(Player *player, uint32, uint32) override
void JustAppeared() override
bool OnGossipSelect(Player *player, uint32, uint32) override
npc_voljin_thrall_vision(Creature *creature)
void JustAppeared() override
void OnQuestReward(Player *, Quest const *quest, LootItemType, uint32) override
void UpdateAI(uint32 diff) override
Position const PrisonerPositionOne
DarkspearJailorData
@ PATH_HOME_ONE
@ PATH_CAGE_ONE
@ ACTION_EVENT_COMPLETE
@ NPC_DARKSPEAR_JAILOR
@ TEXT_GOSSIP_EVENT_IN_PROGRESS
@ PATH_CAGE_TWO
@ PATH_HOME_TWO
@ EVENT_PLAYER_ACCEPT_CHALLENGE
@ NPC_CAPTIVE_SPITESCALE_SCOUT
@ SPELL_ACTIVATE_DNT
@ SAY_GET_IN_THE_PIT
@ EVENT_WALK_BACK_TO_HOME
@ GOSSIP_EVENT_IN_PROGRESS_ID
@ GOSSIP_JAILOR_EVENT_NOT_READY
@ GOSSIP_JAILOR_EVENT_READY
@ ACTION_MOVE_TO_PRISONER
VoljinVisionData
@ SAY_VOLJIN_SCRIPT_TEXT_13
@ EVENT_VOLJIN_VISION_SCRIPT_1
@ SAY_GORROSH_VISION_SCRIPT_TEXT_0
@ SAY_VOLJIN_SCRIPT_TEXT_5
@ SPELL_RITES_OF_VISION
@ EVENT_VOLJIN_VISION_SCRIPT_5
@ GOSSIP_MENU_VISION_IN_PROGRESS
@ SAY_VOLJIN_VISION_SCRIPT_TEXT_6
@ SAY_THRALL_VISION_SCRIPT_TEXT_1
@ QUEST_AN_ANCIENT_ENEMY
@ SPELL_GENERIC_QUEST_INVISIBILITY_1
@ EVENT_VOLJIN_VISION_SCRIPT_7
@ EVENT_VOLJIN_VISION_SCRIPT_18
@ SPELL_VOLJINS_VISION_SMOKE
@ EVENT_VOLJIN_VISION_SCRIPT_15
@ SAY_THRALL_VISION_SCRIPT_TEXT_7
@ SPELL_GENERIC_QUEST_INVISIBILITY_8
@ SAY_VOLJIN_SCRIPT_TEXT_7
@ SAY_GORROSH_VISION_SCRIPT_TEXT_2
@ EVENT_VOLJIN_VISION_SCRIPT_19
@ GOSSIP_MENU_GARROSH_VISION
@ EVENT_VOLJIN_VISION_SCRIPT_14
@ SAY_VOLJIN_VISION_SCRIPT_TEXT_0
@ SAY_VOLJIN_VISION_SCRIPT_TEXT_5
@ SAY_GORROSH_VISION_SCRIPT_TEXT_4
@ QUEST_MORE_THAN_EXPECTED_ROGUE
@ SAY_VOLJIN_VISION_SCRIPT_TEXT_3
@ EVENT_VOLJIN_VISION_SCRIPT_17
@ SAY_GORROSH_VISION_SCRIPT_TEXT_3
@ SAY_VOLJIN_VISION_SCRIPT_TEXT_4
@ SAY_VOLJIN_SCRIPT_TEXT_8
@ EVENT_VOLJIN_VISION_SCRIPT_9
@ SAY_GORROSH_VISION_SCRIPT_TEXT_1
@ SAY_VOLJIN_SCRIPT_TEXT_2
@ SAY_VOLJIN_SCRIPT_TEXT_9
@ QUEST_MORE_THAN_EXPECTED_WARRIOR
@ QUEST_MORE_THAN_EXPECTED_HUNTER
@ EVENT_VOLJIN_VISION_SCRIPT_16
@ QUEST_MORE_THAN_EXPECTED_WARLOCK
@ EVENT_VOLJIN_VISION_SCRIPT_3
@ SAY_VOLJIN_SCRIPT_TEXT_0
@ EVENT_VOLJIN_VISION_SCRIPT_13
@ SAY_VOLJIN_SCRIPT_TEXT_12
@ SAY_THRALL_VISION_SCRIPT_TEXT_0
@ QUEST_MORE_THAN_EXPECTED_PRIEST
@ QUEST_MORE_THAN_EXPECTED_DRUID
@ GOSSIP_MENU_THRALL_VISION
@ SAY_VOLJIN_SCRIPT_TEXT_1
@ EVENT_VOLJIN_VISION_SCRIPT_2
@ SAY_VOLJIN_SCRIPT_TEXT_3
@ QUEST_MORE_THAN_EXPECTED_MONK
@ EVENT_VOLJIN_VISION_SCRIPT_4
@ SAY_VOLJIN_VISION_SCRIPT_TEXT_2
@ SAY_VOLJIN_SCRIPT_TEXT_6
@ QUEST_MORE_THAN_EXPECTED_MAGE
@ SAY_THRALL_VISION_SCRIPT_TEXT_2
@ EVENT_VOLJIN_VISION_SCRIPT_21
@ SAY_THRALL_VISION_SCRIPT_TEXT_4
@ SAY_VOLJIN_SCRIPT_TEXT_4
@ SAY_VOLJIN_SCRIPT_TEXT_14
@ SAY_THRALL_VISION_SCRIPT_TEXT_3
@ SAY_THRALL_VISION_SCRIPT_TEXT_5
@ EVENT_VOLJIN_VISION_SCRIPT_11
@ EVENT_VOLJIN_VISION_SCRIPT_20
@ EVENT_VOLJIN_VISION_SCRIPT_22
@ QUEST_MORE_THAN_EXPECTED_SHAMAN
@ SAY_THRALL_VISION_SCRIPT_TEXT_6
@ SAY_VOLJIN_VISION_SCRIPT_TEXT_1
@ SAY_VOLJIN_SCRIPT_TEXT_11
@ SPELL_GENERIC_QUEST_INVISIBILITY_2
@ EVENT_VOLJIN_VISION_SCRIPT_10
@ SAY_VOLJIN_SCRIPT_TEXT_10
@ EVENT_VOLJIN_VISION_SCRIPT_8
@ EVENT_VOLJIN_VISION_SCRIPT_12
@ EVENT_VOLJIN_VISION_SCRIPT_6
void AddSC_durotar()
LazyPeonYells
@ SAY_SPELL_HIT
LazyPeon
@ GO_LUMBERPILE
@ SPELL_AWAKEN_PEON
@ SPELL_BUFF_SLEEP
@ QUEST_LAZY_PEONS
TikiTargetData
@ SPELL_TIKI_TARGET_VISUAL_3
@ SPELL_TIKI_TARGET_DEATH
@ SPELL_TIKI_TARGET_VISUAL_2
@ SPELL_ARCANE_MISSILES_TRAINER
@ SPELL_TIKI_TARGET_VISUAL_1
uint32 const TiKiTargetMask[3]
Position const EchoIslandTrainersPitPoints[9]
ProvingPitData
@ NPC_TRAINER_NEKALI
@ NPC_TRAINER_ZABRAX
@ NPC_TRAINER_ERTEZZA
@ SAY_NOT_BAD
@ QUEST_PROVING_PIT_WARRIOR
@ NPC_TRAINER_SERATHA
@ EVENT_MOVE_TO_PIT
@ SPELL_UNLEARN_ARCANE_MOMENTUM
@ SAY_WELL_DONE
@ QUEST_PROVING_PIT_MAGE
@ GOSSIP_OPTION_UNTRAIN_MOMENTUM
@ NPC_TRAINER_LEGATI
@ EVENT_MOVE_HOME
@ SPELL_LEARN_ARCANE_MOMENTUM
@ POINT_INITIAL_HOME
@ QUEST_PROVING_PIT_MONK
@ NPC_TRAINER_VOLDREKA
@ GOSSIP_MENU_ARCANE_MOMENTUN
@ QUEST_PROVING_PIT_ROGUE
@ QUEST_PROVING_PIT_SHAMAN
@ QUEST_PROVING_PIT_DRUID
@ QUEST_PROVING_PIT_PRIEST
@ NPC_TRAINER_TUNARI
@ QUEST_PROVING_PIT_HUNTER
@ NPC_TRAINER_ZENTABRA
@ GOSSIP_OPTION_TRAIN_MOMENTUM
@ NPC_TRAINER_NORTET
@ QUEST_PROVING_PIT_WARLOCK
Position const PrisonerPositionTwo
Mithaka
@ GOSSIP_MENU_MITHAKA
@ GOSSIP_TEXT_MITHAKA
@ DATA_SHIP_DOCKED
VoodooSpells
@ SPELL_HEX3
@ SPELL_LAUNCH
@ SPELL_GHOSTLY
@ SPELL_HEX1
@ SPELL_BREW
@ SPELL_HEX2
@ SPELL_GROW
CaptiveSpitescaleScoutData
@ EVENT_CAST_FROSTSHOCK
@ SPELL_FROST_SHOCK
@ EVENT_DESPAWN_OUT_OF_COMBAT
@ EVENT_TALK_TO_PLAYER
@ EVENT_UPDATE_JAILOR_GOSSIP
@ POINT_PRISONER_POSITION
@ SAY_SEND_YOU_TO_YOUR_DEATH