Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
zone_durotar.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#include "ScriptMgr.h"
7#include "ScriptedCreature.h"
8#include "ScriptedGossip.h"
9#include "SpellScript.h"
10#include "Player.h"
11
13{
14public:
15 npc_zuni_bridge() : CreatureScript("npc_zuni_bridge") { }
16
18 {
19 return new npc_zuni_bridgeAI(creature);
20 }
22 {
23 bool talk1 = false;
24 bool talk2 = false;
31 npc_zuni_bridgeAI(Creature* creature) : ScriptedAI(creature) { }
32
34 {
35 if (type == FOLLOW_MOTION_TYPE)
36 {
37 if (talk1 == false)
38 {
39 talk1 = true;
40 events.ScheduleEvent(EVENT_ZUNI_TALK_1, 5000);
41 }
42 if (me->FindNearestCreature(37969, 30.0f, true))
43 me->GetMotionMaster()->MovePoint(1, -1553.0f, -5297.35f, 9.1979f);
44 }
45 }
46
48 {
49 events.Update(diff);
50 while (uint32 eventId = events.ExecuteEvent())
51 {
52 switch (eventId)
53 {
55 {
56 me->MonsterSay("You finished with ya trainin' too? Glad you make it through, mon!", Language::LANG_UNIVERSAL, me);
57 me->SendPlaySound(21370, false);
58 if (talk2 == false)
59 {
60 talk2 = true;
61 events.ScheduleEvent(EVENT_ZUNI_TALK_2, 5000);
62 }
63 break;
64 }
66 {
67 me->MonsterSay("I know dis is prolly busy work, but I don't mind. Dese baby raptors are cute lil devils.", Language::LANG_UNIVERSAL, me);
68 me->SendPlaySound(21371, false);
69 break;
70 }
71 }
72 }
73 }
74 };
75};
76
78{
79public:
80 npc_voljin_darkspear_hold() : CreatureScript("npc_voljin_darkspear_hold") { }
81
83 {
84 return new npc_voljin_darkspear_holdAI(creature);
85 }
86
87 bool OnQuestReward(Player* /*player*/, Creature* creature, Quest const* quest, uint32 /*opt*/) OVERRIDE
88 {
89 if (quest->GetQuestId() == 24643 || quest->GetQuestId() == 24755 ||
90 quest->GetQuestId() == 24763 || quest->GetQuestId() == 24769 ||
91 quest->GetQuestId() == 24775 || quest->GetQuestId() == 24781 ||
92 quest->GetQuestId() == 24787 || quest->GetQuestId() == 31163)
93 {
94 creature->GetMotionMaster()->MovePoint(0, creature->GetHomePosition());
95 return true;
96 }
97 return false;
98 }
99
101 {
122
124 {
125 if (type == POINT_MOTION_TYPE && id == 0)
126 {
127 events.ScheduleEvent(EVENT_VOLJIN_INTRO, 1000);
128 }
129 }
130
132 {
133 events.Update(diff);
134 while (uint32 eventId = events.ExecuteEvent())
135 {
136 switch (eventId)
137 {
139 {
140 //clear visions.
141 if (Creature* voljinVision = me->FindNearestCreature(38953, 15.0f))
142 voljinVision->DespawnOrUnsummon(1000);
143 if (Creature* garroshVision = me->FindNearestCreature(38938, 15.0f))
144 garroshVision->DespawnOrUnsummon(1000);
145
146 //TODO: Let him cast spell here
147 me->MonsterSay("I have sometin' to show ya. It be easier to understand if ya see it yourself.", Language::LANG_UNIVERSAL, me);
148 me->SendPlaySound(20097, false);
149 events.ScheduleEvent(EVENT_GARROSH_VISION1, 8000);
150 break;
151 }
153 {
154 if (Creature* garroshVision = me->SummonCreature(38938, -1321.64f, -5610.25f, 25.4541f, 2.46091, TempSummonType::TEMPSUMMON_TIMED_DESPAWN, 130000))
155 {
156 garroshVision->MonsterSay("Don't talk back to me, troll. You know who was left in charge here. Haven't you stopped to ask yourself why Thrall chose me instead of you?", Language::LANG_UNIVERSAL, garroshVision);
157 me->SendPlaySound(20508, false);
158 }
159 events.ScheduleEvent(EVENT_VOLJIN_VISION1, 12000);
160 break;
161 }
163 {
164 if (Creature* voljinVision = me->SummonCreature(38953, -1323.86f, -5608.56f, 25.4523f, 5.48033f, TempSummonType::TEMPSUMMON_TIMED_DESPAWN, 130000))
165 {
166 voljinVision->MonsterSay("Dere be no question why, Garrosh. He gave ya tha title because ya be Grom's son and because tha people be wantin' a war hero.", Language::LANG_UNIVERSAL, voljinVision);
167 me->SendPlaySound(20098, false);
168 }
169 events.ScheduleEvent(EVENT_VOLJIN_VISION2, 13000);
170 break;
171 }
173 {
174 if (Creature* voljinVision = me->FindNearestCreature(38953, 15.0f))
175 {
176 voljinVision->MonsterSay("I think ya be even more like ya father den ya thought, even witout da demon blood.", Language::LANG_UNIVERSAL, voljinVision);
177 me->SendPlaySound(20099, false);
178 }
179
180 events.ScheduleEvent(EVENT_GARROSH_VISION2, 7500);
181 break;
182 }
184 {
185 if (Creature* garroshVision = me->FindNearestCreature(38938, 15.0f))
186 {
187 garroshVision->MonsterSay("You are lucky that i don't gut you right here, whelp. You are foolish to think that you can speak to your Warchief in such ways.", Language::LANG_UNIVERSAL, garroshVision);
188 me->SendPlaySound(20512, false);
189 }
190
191 events.ScheduleEvent(EVENT_VOLJIN_VISION3, 11000);
192 break;
193 }
195 {
196 if (Creature* voljinVision = me->FindNearestCreature(38953, 15.0f))
197 {
198 voljinVision->MonsterSay("Ya be no Warchief of mine. Ya not earned my respect and I'll not be seein' tha Horde destroyed by ya foolish thirst for War.", Language::LANG_UNIVERSAL, voljinVision);
199 me->SendPlaySound(20100, false);
200 }
201 events.ScheduleEvent(EVENT_GARROSH_VISION3, 12000);
202 break;
203 }
205 {
206 if (Creature* garroshVision = me->FindNearestCreature(38938, 15.0f))
207 {
208 garroshVision->MonsterSay("And what exactly do you think that you are going to do about it? Your threats are hollow. Go slink away with the rest of your kind to the slums, I will endure your filth in my throne room no longer.", Language::LANG_UNIVERSAL, garroshVision);
209 me->SendPlaySound(20509, false);
210 }
211
212 events.ScheduleEvent(EVENT_VOLJIN_VISION4, 15000);
213 break;
214 }
216 {
217 if (Creature* voljinVision = me->FindNearestCreature(38953, 15.0f))
218 {
219 voljinVision->MonsterSay("I know exactly what I'll be doin' about it, son of Hellscream. I'll watch and wait as ya people slowly become aware of ya ineptitude. I'll laugh as dey grow ta despise ya as I do.", Language::LANG_UNIVERSAL, voljinVision);
220 me->SendPlaySound(20101, false);
221 }
222
223 events.ScheduleEvent(EVENT_VOLJIN_VISION5, 15000);
224 break;
225 }
227 {
228 if (Creature* voljinVision = me->FindNearestCreature(38953, 15.0f))
229 {
230 voljinVision->MonsterSay("And when tha time commes dat ya failure is complete and ya \"power\" is meaningless, I will be dere to end ya rule swiftly and silently.", Language::LANG_UNIVERSAL, voljinVision);
231 me->SendPlaySound(20102, false);
232 }
233 events.ScheduleEvent(EVENT_VOLJIN_VISION6, 15000);
234 break;
235 }
237 {
238 if (Creature* voljinVision = me->FindNearestCreature(38953, 15.0f))
239 {
240 voljinVision->MonsterSay("Ya will spend ya reign glancin' over ya shoulda and fearin' tha shadows, for when tha time comes and ya blood be slowly drainin' out, ya will know exactly who fired tha arrow dat pierced ya black heart.", Language::LANG_UNIVERSAL, voljinVision);
241 me->SendPlaySound(20103, false);
242 }
243 events.ScheduleEvent(EVENT_GARROSH_VISION4, 18000);
244 break;
245 }
247 {
248 if (Creature* garroshVision = me->FindNearestCreature(38938, 15.0f))
249 {
250 garroshVision->MonsterSay("You have sealed your fate, troll.", Language::LANG_UNIVERSAL, garroshVision);
251 me->SendPlaySound(20510, false);
252 }
253 events.ScheduleEvent(EVENT_VOLJIN_VISION7, 5000);
254 break;
255 }
257 {
258 if (Creature* voljinVision = me->FindNearestCreature(38953, 15.0f))
259 {
260 voljinVision->MonsterSay("And you yours, \"Warchief.\"", Language::LANG_UNIVERSAL, voljinVision);
261 me->SendPlaySound(20104, false);
262 }
263
264 events.ScheduleEvent(EVENT_VOLJIN_TALK1, 10000);
265 break;
266 }
268 {
269 if (Creature* voljinVision = me->FindNearestCreature(38953, 15.0f))
270 voljinVision->DespawnOrUnsummon(1000);
271 if (Creature* garroshVision = me->FindNearestCreature(38938, 15.0f))
272 garroshVision->DespawnOrUnsummon(1000);
273
274 me->MonsterSay("The Darkspear are 'ere because I led dem here. Orgrimmar be no home as long as it be under Hellscream's hand.", Language::LANG_UNIVERSAL, me);
275 me->SendPlaySound(20105, false);
276 events.ScheduleEvent(EVENT_VOLJIN_TALK2, 8000);
277 break;
278 }
280 {
281 me->MonsterSay("Still. I fear I was lettin' my temper drive me ta bein'rash. Threall devoted himself to makin' the Horde what it is, so I've no eagerness to be leavin' it on a whim. Dis will be needin' much more thought.", Language::LANG_UNIVERSAL, me);
282 me->SendPlaySound(20106, false);
283 events.ScheduleEvent(EVENT_VOLJIN_OUTRO, 16000);
284 break;
285 }
287 {
288 me->MonsterSay("But dese be worries for older minds. Ya still have much to learn. Go help tha people of tha Darkspear. I am sure we'll be speakin' again real soon.", Language::LANG_UNIVERSAL, me);
289 me->SendPlaySound(20107, false);
290 break;
291 }
292 default:
293 break;
294 }
295 }
296 }
297
298 };
299};
300
301
303{
304 NPC_ZUNI = 37988
305};
306Position const ZuniStartPos = { -1173.345f, -5267.1723f, 0.909172f, 0 };
307Position const ZuniMovePos1 = { -1172.816f, -5299.0522f, 5.1754074f, 0 };
308Position const ZuniMovePos2 = { -1176.1216f, -5326.733f, 13.596682f, 0 };
309Position const ZuniMovePos3 = { -1172.816f, -5344.54f, 15.331013f, 0 };
310Position const ZuniMovePos4 = { -1164.625f, -5369.5225f, 14.166052f, 0 };
311Position const ZuniMovePos5 = { -1162.0435f, -5391.7466f, 12.003188f };
312/*####
313# npc_zuni
314####*/
316{
317public:
318 npc_zuni() : CreatureScript("npc_zuni") { }
319
321 {
322 return new npc_zuniAI(creature);
323 }
324
325 struct npc_zuniAI : public ScriptedAI
326 {
327 bool wp1 = false;
328 bool wp2 = false;
329 bool wp3 = false;
330 bool wp4 = false;
331 bool wp5 = false;
332 bool wp6 = false;
334
335 npc_zuniAI(Creature* creature) : ScriptedAI(creature) { }
336
338 {
339 if (type == POINT_MOTION_TYPE)
340 {
341 if (id == 0)
342 wp1 = true;
343
344 if (id == 1)
345 wp2 = true;
346
347 if (id == 2)
348 wp3 = true;
349
350 if (id == 3)
351 wp4 = true;
352
353 if (id == 4)
354 wp5 = true;
355
356 if (id == 5)
357 wp6 = true;
358 }
359 else
360 return;
361 }
362
364 {
365 if (wp1 == true)
366 {
367 if (MoveTimer <= diff)
368 {
369 me->GetMotionMaster()->MovePoint(1, ZuniMovePos1);
370 wp1 = false;
371 MoveTimer = 5000;
372 }
373 else MoveTimer -= diff;
374 }
375
376 if (wp2 == true)
377 {
378 me->GetMotionMaster()->MovePoint(2, ZuniMovePos2);
379 wp2 = false;
380 }
381
382 if (wp3 == true)
383 {
384 me->GetMotionMaster()->MovePoint(3, ZuniMovePos3);
385 wp3 = false;
386 }
387
388 if (wp4 == true)
389 {
390 me->GetMotionMaster()->MovePoint(4, ZuniMovePos4);
391 wp4 = false;
392 }
393
394 if (wp5 == true)
395 {
396 me->GetMotionMaster()->MovePoint(5, ZuniMovePos5);
397 wp5 = false;
398 }
399
400 if (wp6 == true)
401 {
402 me->MonsterSay("Ya trainer should be somewhere in the grounds'ere. I'll catch you lata mon.", Language::LANG_UNIVERSAL, me);
403 me->SendPlaySound(21367, true);
404 me->DespawnOrUnsummon(10000);
405 wp6 = false;
406 }
407 }
408 };
409};
410
411/*####
412# npc_jinthala
413####*/
415{
416public:
417 npc_jinthala() : CreatureScript("npc_jinthala") { }
418
420 {
421 return new npc_jinthalaAI(creature);
422 }
423
424 bool OnQuestAccept(Player* player, Creature* creature, Quest const* /*quest*/) OVERRIDE
425 {
426 creature->MonsterSay("$n. Zuni. Ya'll find ya trainer in the trainin' grounds to the east. Bring pride to the Darkspear.", Language::LANG_UNIVERSAL, player);
427
428 if (Creature* zuni = player->FindNearestCreature(NPC_ZUNI, 10.0f, true))
429 {
430 zuni->MonsterSay("Ya. mon. Let's crack some tiki target skulls! ", Language::LANG_UNIVERSAL, player);
431 zuni->SendPlaySound(21366, true);
432 zuni->GetMotionMaster()->MovePoint(0, ZuniStartPos);
433 return true;
434 }
435 return false;
436 }
437
439 {
440 npc_jinthalaAI(Creature* creature) : ScriptedAI(creature) { }
441 };
442};
443
444/*######
445## Quest: Proving Pit: 24642, 24754, 24762, 24768, 24774, 24780, 24786, 26276, 31161
446## npc_darkspear_jailor
447######*/
448
449Position DarkSpearJailorPos = { -1153.53f, -5519.42f, 11.98f, 6.27f };
450Position DarkSpearJailorPos2 = { -1135.68f, -5417.78f, 13.26f, 1.47f };
451Position NagaPos = { -1149.90f, -5527.76f, 8.10f, 4.76f };
452Position NagaPos2 = { -1141.74f, -5414.54f, 10.59f, 3.42f };
453
455{
456public:
457 npc_darkspear_jailor() : CreatureScript("npc_darkspear_jailor") { }
458
460 {
461 return new npc_darkspear_jailorAI(creature);
462 }
463
465 {
473 npc_darkspear_jailorAI(Creature* creature) : ScriptedAI(creature) { }
474
476 {
477 events.Reset();
478 }
479
481 {
482 if (type != POINT_MOTION_TYPE)
483 return;
484
485 switch (id)
486 {
487 case 0:
488 {
489 events.ScheduleEvent(EVENT_JAILOR_OPENING, 1000);
490 break;
491 }
492 default:
493 break;
494 }
495 }
496
498 {
499 events.Update(diff);
500 while (uint32 eventId = events.ExecuteEvent())
501 {
502 switch (eventId)
503 {
505 {
506 me->HandleEmoteCommand(EMOTE_ONESHOT_USE_STANDING);
507 events.ScheduleEvent(EVENT_JAILOR_OPEN_CAGE, 1000);
508 break;
509 }
511 {
512 if (GameObject* cage = me->FindNearestGameObject(201968, 5.0f))
513 cage->UseDoorOrButton(120);
514
515 if (Creature* monk = me->FindNearestCreature(63310, 25.0f))
516 {
517 if (Creature* Naga = me->FindNearestCreature(38142, 5.0f))
518 {
519 Naga->setFaction(14);
521 Naga->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
522 Naga->GetMotionMaster()->MovePoint(0, NagaPos2);
523 Naga->MonsterSay("I sshal ssslaughter you, Darksspear runt!", Language::LANG_UNIVERSAL, 0);
524 }
525 }
526 else
527 {
528 if (Creature* Naga2 = me->FindNearestCreature(38142, 5.0f))
529 {
530 Naga2->setFaction(14);
531 Naga2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
532 Naga2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
533 Naga2->GetMotionMaster()->MovePoint(0, NagaPos);
534 Naga2->MonsterSay("I sshal ssslaughter you, Darksspear runt!", Language::LANG_UNIVERSAL, 0);
535 }
536 }
537
538 events.ScheduleEvent(EVENT_JAILOR_RESET, 120000);
539 break;
540 }
542 {
543 me->GetMotionMaster()->MovePoint(1, me->GetHomePosition());
544 Reset();
545 break;
546 }
547 default:
548 break;
549 }
550 }
551 }
552 };
553
554 bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
555 {
556 player->PlayerTalkClass->ClearMenus();
557 if (action == GOSSIP_ACTION_INFO_DEF)
558 {
559 player->CLOSE_GOSSIP_MENU();
560 if (Creature* monk = creature->FindNearestCreature(63310, 25.0f))
561 {
562 creature->GetMotionMaster()->MovePoint(0, DarkSpearJailorPos2);
563 }
564 else
565 {
566 creature->GetMotionMaster()->MovePoint(0, DarkSpearJailorPos);
567 }
568 const char* text = player->getGender() == GENDER_MALE ? "Get in the pit and show us your stuff, boy." : "Get in the pit and show us your stuff, girl.";
569 creature->MonsterSay(text, Language::LANG_UNIVERSAL, creature);
570 player->KilledMonsterCredit(39062);
571 }
572 return true;
573 }
574
575 bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
576 {
577 player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'm ready to face my challenge.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
578
579 player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
580 return true;
581 }
582};
583
584
585
586/*######
587## Quest 25134: Lazy Peons
588## npc_lazy_peon
589######*/
590
595
603
605{
606public:
607 npc_lazy_peon() : CreatureScript("npc_lazy_peon") { }
608
610 {
611 return new npc_lazy_peonAI(creature);
612 }
613
615 {
616 npc_lazy_peonAI(Creature* creature) : ScriptedAI(creature) { }
617
619
621 bool work;
622
624 {
625 PlayerGUID = 0;
626 RebuffTimer = 0;
627 work = false;
628 }
629
631 {
632 if (id == 1)
633 work = true;
634 }
635
636 void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
637 {
638 if (spell->Id != SPELL_AWAKEN_PEON)
639 return;
640
641 Player* player = caster->ToPlayer();
643 {
644 player->KilledMonsterCredit(me->GetEntry(), me->GetGUID());
645 Talk(SAY_SPELL_HIT, caster);
646 me->RemoveAllAuras();
647 if (GameObject* Lumberpile = me->FindNearestGameObject(GO_LUMBERPILE, 20))
648 me->GetMotionMaster()->MovePoint(1, Lumberpile->GetPositionX()-1, Lumberpile->GetPositionY(), Lumberpile->GetPositionZ());
649 }
650 }
651
653 {
654 if (work == true)
655 me->HandleEmoteCommand(EMOTE_ONESHOT_WORK_CHOPWOOD);
656 if (RebuffTimer <= diff)
657 {
659 RebuffTimer = 300000; //Rebuff agian in 5 minutes
660 }
661 else
662 RebuffTimer -= diff;
663 if (!UpdateVictim())
664 return;
666 }
667 };
668};
669
671{
672 SPELL_BREW = 16712, // Special Brew
673 SPELL_GHOSTLY = 16713, // Ghostly
674 SPELL_HEX1 = 16707, // Hex
675 SPELL_HEX2 = 16708, // Hex
676 SPELL_HEX3 = 16709, // Hex
677 SPELL_GROW = 16711, // Grow
678 SPELL_LAUNCH = 16716, // Launch (Whee!)
679};
680
681// 17009
683{
684 public:
685 spell_voodoo() : SpellScriptLoader("spell_voodoo") { }
686
688 {
690
691 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
692 {
693 if (!sSpellMgr->GetSpellInfo(SPELL_BREW) || !sSpellMgr->GetSpellInfo(SPELL_GHOSTLY) ||
694 !sSpellMgr->GetSpellInfo(SPELL_HEX1) || !sSpellMgr->GetSpellInfo(SPELL_HEX2) ||
695 !sSpellMgr->GetSpellInfo(SPELL_HEX3) || !sSpellMgr->GetSpellInfo(SPELL_GROW) ||
696 !sSpellMgr->GetSpellInfo(SPELL_LAUNCH))
697 return false;
698 return true;
699 }
700
701 void HandleDummy(SpellEffIndex /*effIndex*/)
702 {
704 if (Unit* target = GetHitUnit())
705 GetCaster()->CastSpell(target, spellid, false);
706 }
707
712 };
713
715 {
716 return new spell_voodoo_SpellScript();
717 }
718};
719
720// 3125
722{
723
724public:
725 npc_clattering_scorpid() : CreatureScript("npc_clattering_scorpid") { }
726
727
729 {
730 return new npc_clattering_scorpidAI(creature);
731 }
732
734 {
742
744 {
745 events.Reset();
746 }
747
748 void EnterCombat(Unit* /*who*/) OVERRIDE
749 {
750 events.ScheduleEvent(EVENT_CAST_VENOM, 2000);
751 }
752
754 {
755 if (!UpdateVictim())
756 return;
757
758 events.Update(diff);
759
760 while (uint32 eventId = events.ExecuteEvent())
761 {
762 switch (eventId)
763 {
764 case EVENT_CAST_VENOM:
765 {
766 if (!me->FindNearestCreature(39236, 5.0f))
767 Talk(0, me);
768
769 me->CastSpell(me->GetVictim(), 73672);
770 events.ScheduleEvent(EVENT_KC_TOTEM, 2500);
771 events.ScheduleEvent(EVENT_CAST_VENOM, 7500);
772 break;
773 }
774 case EVENT_KC_TOTEM:
775 {
776 if (Creature* totem = me->FindNearestCreature(39236, 5.0f))
777 totem->GetOwner()->ToPlayer()->KilledMonsterCredit(39236);
778 break;
779 }
780 default:
781 break;
782 }
783 }
784
786 }
787 };
788};
789
790// 73705 - Injured Razor Hill Grunt - Cancel Feign Death
807
820
821// 39270 - Injured Razor Hill Grunt
823{
825
827 {
828 me->setRegeneratingHealth(false);
829 me->SetHealth(me->CountPctFromMaxHealth(10));
831 }
832
833 void OnSpellClick(Unit* clicker, bool& /*result*/) OVERRIDE
834 {
835 if (Player* player = clicker->ToPlayer())
836 {
837 _player = player;
840 me->GetMotionMaster()->MoveFollow(player, 0.f, 0.f);
841 player->KilledMonsterCredit(me->GetEntry());
842 _events.ScheduleEvent(EVENT_AFTER_HELP, 2 * IN_MILLISECONDS);
843
844 if (Quest const* quest = sObjectMgr->GetQuestTemplate(QUEST_LOSS_REDUCTION))
845 if (player->GetQuestStatus(quest->GetQuestId()) == QUEST_STATUS_NONE)
846 {
847 player->PlayerTalkClass->SendQuestGiverQuestDetails(quest, me->GetGUID(), true);
848 player->AddQuest(quest, NULL);
849 }
850 }
851 }
852
854 {
855 _events.Update(diff);
856
857 while (uint32 eventId = _events.ExecuteEvent())
858 {
859 switch (eventId)
860 {
862 {
865 break;
866 }
867 case EVENT_AFTER_HELP:
868 {
870 _events.CancelEvent(EVENT_TEXT_BEFORE_HELP);
871 _events.ScheduleEvent(EVENT_DESPAWN, 60 * IN_MILLISECONDS, 80 * IN_MILLISECONDS);
872 break;
873 }
874 case EVENT_DESPAWN:
875 {
877 me->GetMotionMaster()->MovementExpired(true);
878 me->DespawnOrUnsummon(3 * IN_MILLISECONDS);
879 break;
880 }
881 default:
882 break;
883 }
884 }
885 }
886
887private:
890};
891
@ IN_MILLISECONDS
Definition Common.h:125
const T & RAND(const T &v1, const T &v2)
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
std::uint64_t uint64
Definition Define.h:76
@ GOSSIP_ICON_CHAT
Definition GossipDef.h:46
@ POINT_MOTION_TYPE
@ FOLLOW_MOTION_TYPE
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:70
#define sObjectMgr
Definition ObjectMgr.h:1617
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:89
@ QUEST_STATUS_NONE
Definition QuestDef.h:86
#define RegisterCreatureAI(ai_name)
Definition ScriptMgr.h:1019
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:991
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
SpellEffIndex
@ EFFECT_0
@ EMOTE_ONESHOT_WORK_CHOPWOOD
@ EMOTE_ONESHOT_USE_STANDING
@ SPELL_EFFECT_DUMMY
@ GENDER_MALE
#define sSpellMgr
Definition SpellMgr.h:744
#define SpellEffectFn(F, I, N)
@ UNIT_NPC_FLAG_QUESTGIVER
Definition Unit.h:688
@ UNIT_NPC_FLAG_SPELLCLICK
Definition Unit.h:711
@ UNIT_STAND_STATE_DEAD
Definition Unit.h:169
@ UNIT_STAND_STATE_STAND
Definition Unit.h:162
@ UNIT_FLAG_NOT_SELECTABLE
Definition Unit.h:650
@ UNIT_FLAG_IMMUNE_TO_PC
Definition Unit.h:633
@ UNIT_FIELD_NPC_FLAGS
@ UNIT_FIELD_FLAGS
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
CreatureScript(const char *name)
Player * ToPlayer()
Definition Object.h:204
void KilledMonsterCredit(uint32 entry, uint64 guid=0)
QuestStatus GetQuestStatus(uint32 quest_id) const
HookList< EffectHandler > OnEffectHitTarget
Unit * GetHitUnit()
Unit * GetCaster()
SpellScriptLoader(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
Definition Unit.h:1367
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2801
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool OnGossipHello(Player *player, Creature *creature) OVERRIDE
bool OnGossipSelect(Player *player, Creature *creature, uint32, uint32 action) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool OnQuestAccept(Player *player, Creature *creature, Quest const *) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool OnQuestReward(Player *, Creature *creature, Quest const *quest, uint32) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
PrepareSpellScript(spell_injured_razor_hill_grunt_cancel_feign_death)
PrepareSpellScript(spell_voodoo_SpellScript)
bool Validate(SpellInfo const *) OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void MovementInform(uint32 type, uint32 id) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void OnSpellClick(Unit *clicker, bool &) OVERRIDE
npc_injured_razor_hill_grunt(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_jinthalaAI(Creature *creature)
void SpellHit(Unit *caster, const SpellInfo *spell) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_lazy_peonAI(Creature *creature)
void MovementInform(uint32, uint32 id) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void MovementInform(uint32 type, uint32 id) OVERRIDE
void MovementInform(uint32 type, uint32 id) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_zuniAI(Creature *creature)
npc_zuni_bridgeAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void MovementInform(uint32 type, uint32 id) OVERRIDE
Position const ZuniMovePos1
Position const ZuniMovePos4
Position const ZuniMovePos2
void AddSC_durotar()
LazyPeonYells
@ SAY_SPELL_HIT
LazyPeon
@ GO_LUMBERPILE
@ SPELL_AWAKEN_PEON
@ SPELL_BUFF_SLEEP
@ QUEST_LAZY_PEONS
Position const ZuniMovePos5
Position NagaPos
NpcInjuredRazorHillGruntUtilities
@ TEXT_BEFORE_HELP
@ TEXT_DESPAWN
@ EVENT_DESPAWN
@ EVENT_TEXT_BEFORE_HELP
@ QUEST_LOSS_REDUCTION
@ TEXT_AFTER_HELP
@ EVENT_AFTER_HELP
darkspearshore
@ NPC_ZUNI
Position DarkSpearJailorPos
Position const ZuniMovePos3
Position const ZuniStartPos
Position NagaPos2
VoodooSpells
@ SPELL_HEX3
@ SPELL_LAUNCH
@ SPELL_GHOSTLY
@ SPELL_HEX1
@ SPELL_BREW
@ SPELL_HEX2
@ SPELL_GROW
Position DarkSpearJailorPos2