Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_headless_horseman.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/* ScriptData
7SDName: Boss_Headless_Horseman
8SD%Complete:
9SDComment:
10SDCategory: Scarlet Monastery
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15#include "SpellMgr.h"
16#include "scarlet_monastery.h"
17#include "LFGMgr.h"
18#include "Player.h"
19#include "Group.h"
20#include "SpellInfo.h"
21
22//this texts are already used by 3975 and 3976
34
35uint32 RandomLaugh[] = {11965, 11975, 11976};
36
38{
39 HH_MOUNTED = 23682,
41 HEAD = 23775,
44 HELPER = 23686,
45 WISP_INVIS = 24034
46};
47
49{
50 SPELL_CLEAVE = 42587,
51 SPELL_CONFLAGRATION = 42380, //Phase 2, can't find real spell(Dim Fire?)
52 // SPELL_CONFL_SPEED = 22587, //8% increase speed, value 22587 from SPELL_CONFLAGRATION mains that spell?
54
56 SPELL_IMMUNE = 42556,
59
60 SPELL_FLYING_HEAD = 42399, //visual flying head
61 SPELL_HEAD = 42413, //visual buff, "head"
62 SPELL_HEAD_IS_DEAD = 42428, //at killing head, Phase 3
63
69
70 //Effects
72 // SPELL_RHYME_SMALL = 42910,
77 // SPELL_ENRAGE_VISUAL = 42438, // he uses this spell?
80 // SPELL_WISP_INVIS = 42823,
81 SPELL_SMOKE = 42355,
82 SPELL_DEATH = 42566 //not correct spell
83};
84
86{
87 float x, y, z;
88};
89
91{
92 {1754.00f, 1346.00f, 17.50f},
93 {1765.00f, 1347.00f, 19.00f},
94 {1784.00f, 1346.80f, 25.40f},
95 {1803.30f, 1347.60f, 33.00f},
96 {1824.00f, 1350.00f, 42.60f},
97 {1838.80f, 1353.20f, 49.80f},
98 {1852.00f, 1357.60f, 55.70f},
99 {1861.30f, 1364.00f, 59.40f},
100 {1866.30f, 1374.80f, 61.70f},
101 {1864.00f, 1387.30f, 63.20f},
102 {1854.80f, 1399.40f, 64.10f},
103 {1844.00f, 1406.90f, 64.10f},
104 {1824.30f, 1411.40f, 63.30f},
105 {1801.00f, 1412.30f, 60.40f},
106 {1782.00f, 1410.10f, 55.50f},
107 {1770.50f, 1405.20f, 50.30f},
108 {1765.20f, 1400.70f, 46.60f},
109 {1761.40f, 1393.40f, 41.70f},
110 {1759.10f, 1386.70f, 36.60f},
111 {1757.80f, 1378.20f, 29.00f},
112 {1758.00f, 1367.00f, 19.51f}
113};
114
116{
117 {1776.27f, 1348.74f, 19.20f}, //spawn point for pumpkin shrine mob
118 {1765.28f, 1347.46f, 17.55f} //spawn point for smoke
119};
120
121static char const* Text[]=
122{
123 "Horseman rise...",
124 "Your time is nigh...",
125 "You felt death once...",
126 "Now, know demise!"
127};
128
129#define EMOTE_LAUGHS "Headless Horseman laughs" // needs assigned to db.
130
132{
133public:
134 npc_wisp_invis() : CreatureScript("npc_wisp_invis") { }
135
137 {
138 return new npc_wisp_invisAI(creature);
139 }
140
142 {
143 npc_wisp_invisAI(Creature* creature) : ScriptedAI(creature)
144 {
145 Creaturetype = delay = spell = spell2 = 0;
146 }
147
152 void Reset() OVERRIDE { }
153 void EnterCombat(Unit* /*who*/) OVERRIDE { }
154 void SetType(uint32 _type)
155 {
156 switch (Creaturetype = _type)
157 {
158 case 1:
160 break;
161 case 2:
162 delay = 15000;
165 break;
166 case 3:
167 delay = 15000;
169 break;
170 case 4:
171 delay = 7000;
173 break;
174 }
175 if (spell)
176 DoCast(me, spell);
177 }
178
179 void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
180 {
181 if (spell->Id == SPELL_WISP_FLIGHT_PORT && Creaturetype == 4)
182 me->SetDisplayId(2027);
183 }
184
186
187 {
188 if (!who || Creaturetype != 1 || !who->isTargetableForAttack())
189 return;
190
191 if (me->IsWithinDist(who, 0.1f, false) && !who->HasAura(SPELL_SQUASH_SOUL))
193 }
194
196 {
197 if (delay)
198 {
199 if (delay <= diff)
200 {
201 me->RemoveAurasDueToSpell(SPELL_SMOKE);
202 if (spell2)
203 DoCast(me, spell2);
204 delay = 0;
205 } else delay -= diff;
206 }
207 }
208 };
209};
210
212{
213public:
214 npc_head() : CreatureScript("npc_head") { }
215
217 {
218 return new npc_headAI(creature);
219 }
220
221 struct npc_headAI : public ScriptedAI
222 {
223 npc_headAI(Creature* creature) : ScriptedAI(creature) { }
224
226
230
232 bool die;
233
235 {
236 Phase = 0;
237 bodyGUID = 0;
238 die = false;
239 withbody = true;
240 wait = 1000;
241 laugh = urand(15000, 30000);
242 }
243
244 void EnterCombat(Unit* /*who*/) OVERRIDE { }
245
246 void SaySound(uint8 textEntry, Unit* target = 0)
247 {
248 if (target)
249 Talk(textEntry, target);
250 else
251 Talk(textEntry);
252
253 //DoCast(me, SPELL_HEAD_SPEAKS, true);
254 if (Creature* speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000))
255 speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false);
256 laugh += 3000;
257 }
258
259 void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
260 {
261 if (withbody)
262 return;
263
264 switch (Phase)
265 {
266 case 1:
267 if (me->HealthBelowPctDamaged(67, damage))
268 Disappear();
269 break;
270 case 2:
271 if (me->HealthBelowPctDamaged(34, damage))
272 Disappear();
273 break;
274 case 3:
275 if (damage >= me->GetHealth())
276 {
277 die = true;
278 withbody = true;
279 wait = 300;
280 damage = me->GetHealth() - me->CountPctFromMaxHealth(1);
282 me->StopMoving();
283 //me->GetMotionMaster()->MoveIdle();
285 }
286 break;
287 }
288 }
289
290 void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
291 {
292 if (!withbody)
293 return;
294
295 if (spell->Id == SPELL_FLYING_HEAD)
296 {
297 if (Phase < 3)
298 ++Phase;
299 else
300 Phase = 3;
301
302 withbody = false;
303 if (!bodyGUID)
304 bodyGUID = caster->GetGUID();
305 me->RemoveAllAuras();
307 DoCast(me, SPELL_HEAD_LANDS, true);
308 DoCast(me, SPELL_HEAD, false);
310 me->GetMotionMaster()->Clear(false);
311 me->GetMotionMaster()->MoveFleeing(caster->GetVictim());
312 }
313 }
314
315 void Disappear();
317 {
318 if (!withbody)
319 {
320 if (wait <= diff)
321 {
322 wait = 1000;
323 if (!me->GetVictim())
324 return;
325 me->GetMotionMaster()->Clear(false);
326 me->GetMotionMaster()->MoveFleeing(me->GetVictim());
327 }
328 else wait -= diff;
329
330 if (laugh <= diff)
331 {
332 laugh = urand(15000, 30000);
333 DoPlaySoundToSet(me, RandomLaugh[urand(0, 2)]);
334 //DoCast(me, SPELL_HEAD_SPEAKS, true); //this spell remove buff "head"
335 Creature* speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000);
336 if (speaker)
337 speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false);
338 me->MonsterTextEmote(EMOTE_LAUGHS, 0);
339 }
340 else laugh -= diff;
341 }
342 else
343 {
344 if (die)
345 {
346 if (wait <= diff)
347 {
348 die = false;
349 if (Unit* body = Unit::GetUnit(*me, bodyGUID))
350 body->Kill(body);
351 me->Kill(me);
352 }
353 else wait -= diff;
354 }
355 }
356 }
357 };
358};
359
361{
362public:
363 boss_headless_horseman() : CreatureScript("boss_headless_horseman") { }
364
366 {
367 return new boss_headless_horsemanAI(creature);
368 }
369
371 {
373 {
374 instance = creature->GetInstanceScript();
375 }
376
378
381
386
394
399 bool burned;
400
402 {
403 Phase = 1;
404 conflagrate = 15000;
405 summonadds = 15000;
406 laugh = urand(16000, 20000);
407 cleave = 2000;
408 regen = 1000;
409 burn = 6000;
410 count = 0;
411 say_timer = 3000;
412
413 withhead = true;
414 returned = true;
415 burned = false;
416 IsFlying = false;
418 if (headGUID)
419 {
420 if (Creature* Head = Unit::GetCreature((*me), headGUID))
421 Head->DisappearAndDie();
422
423 headGUID = 0;
424 }
425
427 //if (instance)
428 // instance->SetData(DATA_HORSEMAN_EVENT, NOT_STARTED);
429 }
430
431 void FlyMode()
432 {
433 me->SetVisible(false);
435 me->SetDisableGravity(true);
436 me->SetSpeed(MOVE_WALK, 5.0f, true);
437 wp_reached = false;
438 count = 0;
439 say_timer = 3000;
440 id = 0;
441 Phase = 0;
442 }
443
445 {
446 if (type != POINT_MOTION_TYPE || !IsFlying || i != id)
447 return;
448
449 wp_reached = true;
450
451 switch (id)
452 {
453 case 0:
454 me->SetVisible(true);
455 break;
456 case 1:
457 {
458 if (Creature* smoke = me->SummonCreature(HELPER, Spawn[1].x, Spawn[1].y, Spawn[1].z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
459 CAST_AI(npc_wisp_invis::npc_wisp_invisAI, smoke->AI())->SetType(3);
461 break;
462 }
463 case 6:
464 if (instance)
465 instance->SetData(GAMEOBJECT_PUMPKIN_SHRINE, 0); //hide gameobject
466 break;
467 case 19:
468 me->SetDisableGravity(false);
469 break;
470 case 20:
471 {
472 Phase = 1;
473 IsFlying = false;
474 wp_reached = false;
477 if (Unit* player = Unit::GetUnit(*me, PlayerGUID))
478 DoStartMovement(player);
479 break;
480 }
481 }
482 ++id;
483 }
484
485 void EnterCombat(Unit* /*who*/) OVERRIDE
486 {
487 if (instance)
490 }
491
493 {
495 }
496
498
499 {
500 if (withhead && Phase != 0)
502 }
503
505 {
506 if (player->GetTypeId() == TYPEID_PLAYER)
507 {
508 if (withhead)
510 //maybe possible when player dies from conflagration
511 else if (Creature* Head = Unit::GetCreature((*me), headGUID))
512 CAST_AI(npc_head::npc_headAI, Head->AI())->SaySound(SAY_PLAYER_DEATH);
513 }
514 }
515
516 void SaySound(uint8 textEntry, Unit* target = 0)
517 {
518 if (target)
519 Talk(textEntry, target);
520 else
521 Talk(textEntry);
522 laugh += 4000;
523 }
524
525 Player* SelectRandomPlayer(float range = 0.0f, bool checkLoS = true)
526 {
527 Map* map = me->GetMap();
528 if (!map->IsDungeon())
529 return NULL;
530
531 Map::PlayerList const &PlayerList = map->GetPlayers();
532 if (PlayerList.isEmpty())
533 return NULL;
534
535 std::list<Player*> temp;
536 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
537 if ((me->IsWithinLOSInMap(i->GetSource()) || !checkLoS) && me->GetVictim() != i->GetSource() &&
538 me->IsWithinDistInMap(i->GetSource(), range) && i->GetSource()->IsAlive())
539 temp.push_back(i->GetSource());
540
541 if (!temp.empty())
542 {
543 std::list<Player*>::const_iterator j = temp.begin();
544 advance(j, rand()%temp.size());
545 return (*j);
546 }
547 return NULL;
548 }
549
550 void SpellHitTarget(Unit* unit, const SpellInfo* spell) OVERRIDE
551 {
552 if (spell->Id == SPELL_CONFLAGRATION && unit->HasAura(SPELL_CONFLAGRATION))
554 }
555
556 void JustDied(Unit* /*killer*/) OVERRIDE
557 {
558 me->StopMoving();
559 //me->GetMotionMaster()->MoveIdle();
561 if (Creature* flame = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
562 flame->CastSpell(flame, SPELL_BODY_FLAME, false);
563 if (Creature* wisp = DoSpawnCreature(WISP_INVIS, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
564 CAST_AI(npc_wisp_invis::npc_wisp_invisAI, wisp->AI())->SetType(4);
565 if (instance)
567
568 Map::PlayerList const& players = me->GetMap()->GetPlayers();
569 if (!players.isEmpty())
570 {
571 if (Group* group = players.begin()->GetSource()->GetGroup())
572 if (group->isLFGGroup())
573 sLFGMgr->FinishDungeon(group->GetGUID(), 285);
574 }
575 }
576
577 void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
578 {
579 if (withhead)
580 return;
581
582 if (spell->Id == SPELL_FLYING_HEAD)
583 {
584 if (Phase < 3)
585 ++Phase;
586 else
587 Phase = 3;
588 withhead = true;
589 me->RemoveAllAuras();
590 me->SetName("Headless Horseman");
591 me->SetFullHealth();
594 caster->GetMotionMaster()->Clear(false);
595 caster->GetMotionMaster()->MoveFollow(me, 6, float(urand(0, 5)));
596 //DoResetThreat();//not sure if need
597 ThreatContainer::StorageType threatlist = caster->getThreatManager().getThreatList();
598 for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
599 {
600 Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
601 if (unit && unit->IsAlive() && unit != caster)
602 me->AddThreat(unit, caster->getThreatManager().getThreat(unit));
603 }
604 }
605 }
606
607 void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
608 {
609 if (damage >= me->GetHealth() && withhead)
610 {
611 withhead = false;
612 returned = false;
613 damage = me->GetHealth() - me->CountPctFromMaxHealth(1);
614 me->RemoveAllAuras();
615 me->SetName("Headless Horseman, Unhorsed");
616
617 if (!headGUID)
618 headGUID = DoSpawnCreature(HEAD, float(rand()%6), float(rand()%6), 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0)->GetGUID();
619
620 Unit* Head = Unit::GetUnit(*me, headGUID);
621 if (Head && Head->IsAlive())
622 {
624 //Head->CastSpell(Head, SPELL_HEAD_INVIS, false);
625 me->InterruptNonMeleeSpells(false);
626 DoCast(me, SPELL_IMMUNE, true);
627 DoCast(me, SPELL_BODY_REGEN, true);
628 DoCast(Head, SPELL_FLYING_HEAD, true);
629 DoCast(me, SPELL_CONFUSE, false); //test
630 whirlwind = urand(4000, 8000);
631 regen = 0;
632 }
633 }
634 }
635
637 {
638 if (withhead)
639 {
640 switch (Phase)
641 {
642 case 0:
643 {
644 if (!IsFlying)
645 {
646 if (say_timer <= diff)
647 {
648 say_timer = 3000;
649 Player* player = SelectRandomPlayer(100.0f, false);
650 if (count < 3)
651 {
652 if (player)
653 player->Say(Text[count], 0);
654 }
655 else
656 {
658 if (player)
659 {
660 player->Say(Text[count], 0);
662 }
663 wp_reached = true;
664 IsFlying = true;
665 count = 0;
666 break;
667 }
668 ++count;
669 }
670 else say_timer -= diff;
671 }
672 else
673 {
674 if (wp_reached)
675 {
676 wp_reached = false;
677 me->GetMotionMaster()->Clear(false);
678 me->GetMotionMaster()->MovePoint(id, FlightPoint[id].x, FlightPoint[id].y, FlightPoint[id].z);
679 }
680 }
681 }
682 break;
683 case 1:
684 if (burned)
685 break;
686 if (burn <= diff)
687 {
688 if (Creature* flame = me->SummonCreature(HELPER, Spawn[0].x, Spawn[0].y, Spawn[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 17000))
689 CAST_AI(npc_wisp_invis::npc_wisp_invisAI, flame->AI())->SetType(2);
690 burned = true;
691 }
692 else burn -= diff;
693 break;
694 case 2:
695 if (conflagrate <= diff)
696 {
697 if (Unit* player = SelectRandomPlayer(30.0f))
698 DoCast(player, SPELL_CONFLAGRATION, false);
699 conflagrate = urand(10000, 16000);
700 }
701 else conflagrate -= diff;
702 break;
703 case 3:
704 if (summonadds <= diff)
705 {
706 me->InterruptNonMeleeSpells(false);
709 summonadds = urand(25000, 35000);
710 }
711 else summonadds -= diff;
712 break;
713 }
714
715 if (laugh <= diff)
716 {
717 laugh = urand(11000, 22000);
718 me->MonsterTextEmote(EMOTE_LAUGHS, 0);
719 DoPlaySoundToSet(me, RandomLaugh[rand()%3]);
720 }
721 else laugh -= diff;
722
723 if (UpdateVictim())
724 {
726 if (cleave <= diff)
727 {
729 cleave = urand(2000, 6000); //1 cleave per 2.0f-6.0fsec
730 }
731 else cleave -= diff;
732 }
733 }
734 else
735 {
736 if (regen <= diff)
737 {
738 regen = 1000; //"body calls head"
739 if (me->IsFullHealth() && !returned)
740 {
741 if (Phase > 1)
742 --Phase;
743 else
744 Phase = 1;
746 if (Head && Head->IsAlive())
747 {
748 CAST_AI(npc_head::npc_headAI, Head->AI())->Phase = Phase;
749 CAST_AI(npc_head::npc_headAI, Head->AI())->Disappear();
750 }
751 return;
752 }
753 }
754 else regen -= diff;
755
756 if (whirlwind <= diff)
757 {
758 whirlwind = urand(4000, 8000);
759 if (urand(0, 1))
760 {
761 me->RemoveAurasDueToSpell(SPELL_CONFUSE);
762 DoCast(me, SPELL_WHIRLWIND, true);
764 }
765 else
766 me->RemoveAurasDueToSpell(SPELL_WHIRLWIND);
767 }
768 else whirlwind -= diff;
769 }
770 }
771 };
772};
773
775{
776public:
777 npc_pulsing_pumpkin() : CreatureScript("npc_pulsing_pumpkin") { }
778
780 {
781 return new npc_pulsing_pumpkinAI(creature);
782 }
783
785 {
786 npc_pulsing_pumpkinAI(Creature* creature) : ScriptedAI(creature) { }
787
790
792 {
793 float x, y, z;
794 me->GetPosition(x, y, z); //this visual aura some under ground
795 me->SetPosition(x, y, z + 0.35f, 0.0f);
796 Despawn();
798 if (debuff)
799 {
800 debuff->SetDisplayId(me->GetDisplayId());
801 debuff->CastSpell(debuff, SPELL_PUMPKIN_AURA_GREEN, false);
802 CAST_AI(npc_wisp_invis::npc_wisp_invisAI, debuff->AI())->SetType(1);
803 debuffGUID = debuff->GetGUID();
804 }
805 sprouted = false;
809 }
810
811 void EnterCombat(Unit* /*who*/) OVERRIDE { }
812
813 void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
814 {
815 if (spell->Id == SPELL_SPROUTING)
816 {
817 sprouted = true;
818 me->RemoveAllAuras();
821 me->UpdateEntry(PUMPKIN_FIEND);
822 DoStartMovement(me->GetVictim());
823 }
824 }
825
826 void Despawn()
827 {
828 if (!debuffGUID)
829 return;
830
831 Unit* debuff = Unit::GetUnit(*me, debuffGUID);
832 if (debuff)
833 {
834 debuff->SetVisible(false);
835 debuffGUID = 0;
836 }
837 }
838
839 void JustDied(Unit* /*killer*/) OVERRIDE
840 {
841 if (!sprouted)
842 Despawn();
843 }
844
846
847 {
848 if (!who || !me->IsValidAttackTarget(who) || me->GetVictim())
849 return;
850
851 me->AddThreat(who, 0.0f);
852 if (sprouted)
853 DoStartMovement(who);
854 }
855
856 void UpdateAI(uint32 /*diff*/) OVERRIDE
857 {
858 if (sprouted && UpdateVictim())
860 }
861 };
862};
863
865{
866public:
867 go_loosely_turned_soil() : GameObjectScript("go_loosely_turned_soil") { }
868
870 {
871 InstanceScript* instance = player->GetInstanceScript();
872 if (instance)
873 {
874 if (instance->GetData(DATA_HORSEMAN_EVENT) != NOT_STARTED)
875 return true;
877 }
878 /* if (soil->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER && player->getLevel() > 64)
879 {
880 player->PrepareQuestMenu(soil->GetGUID());
881 player->SendPreparedQuest(soil->GetGUID());
882 }
883 if (player->GetQuestStatus(11405) == QUEST_STATUS_INCOMPLETE && player->getLevel() > 64)
884 { */
885 player->AreaExploredOrEventHappens(11405);
886 if (Creature* horseman = soil->SummonCreature(HH_MOUNTED, FlightPoint[20].x, FlightPoint[20].y, FlightPoint[20].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 0))
887 {
888 CAST_AI(boss_headless_horseman::boss_headless_horsemanAI, horseman->AI())->PlayerGUID = player->GetGUID();
890 }
891 //}
892 return true;
893 }
894};
895
897{
898 if (withbody)
899 return;
900
901 if (bodyGUID)
902 {
904 if (body && body->IsAlive())
905 {
906 withbody = true;
907 me->RemoveAllAuras();
908 body->RemoveAurasDueToSpell(SPELL_IMMUNE);//hack, SpellHit doesn't calls if body has immune aura
910 me->SetFullHealth();
913 me->GetMotionMaster()->MoveIdle();
915 }
916 }
917}
918
920{
922 new npc_head();
924 new npc_wisp_invis();
926}
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
std::uint64_t uint64
Definition Define.h:76
static constexpr TempSummonType TEMPSUMMON_DEAD_DESPAWN
static constexpr TempSummonType TEMPSUMMON_MANUAL_DESPAWN
static constexpr TempSummonType TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN
static constexpr TempSummonType TEMPSUMMON_TIMED_DESPAWN
static constexpr TypeID TYPEID_PLAYER
@ IN_PROGRESS
@ DONE
@ NOT_STARTED
#define sLFGMgr
Definition LFGMgr.h:518
@ POINT_MOTION_TYPE
#define CAST_AI(a, b)
@ ANIM_EMOTE_SHOUT
@ MOVE_WALK
Definition Unit.h:555
@ UNIT_FLAG_STUNNED
Definition Unit.h:643
@ UNIT_FLAG_NON_ATTACKABLE
Definition Unit.h:626
@ UNIT_FLAG_NOT_SELECTABLE
Definition Unit.h:650
@ UNIT_FLAG_IMMUNE_TO_PC
Definition Unit.h:633
@ UNIT_FIELD_FLAGS
@ SPELL_CLEAVE
@ SPELL_WHIRLWIND
#define SAY_DEATH
#define EMOTE_LAUGHS
void AddSC_boss_headless_horseman()
@ SAY_SPROUTING_PUMPKINS
static Locations FlightPoint[]
@ SPELL_WISP_FLIGHT_PORT
@ SPELL_CONFLAGRATION
@ SPELL_PUMPKIN_AURA_GREEN
@ SPELL_SUMMON_PUMPKIN
static Locations Spawn[]
static char const * Text[]
uint32 RandomLaugh[]
@ SPELL_CONFLAGRATION
virtual void MoveInLineOfSight(Unit *)
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
void SetDisplayId(uint32 modelId) OVERRIDE
CreatureAI * AI() const
Definition Creature.h:483
CreatureScript(const char *name)
GameObjectScript(const char *name)
Definition Group.h:147
bool isEmpty() const
Definition LinkedList.h:86
Definition Map.h:238
bool IsDungeon() const
Definition Map.h:369
MapRefManager PlayerList
Definition Map.h:406
PlayerList const & GetPlayers() const
Definition Map.h:407
iterator end()
iterator begin()
LinkedListHead::Iterator< MapReference const > const_iterator
uint64 GetGUID() const
Definition Object.h:119
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition Object.cpp:1280
void Say(std::string const &text, const Language language)
Handles said message in regular chat based on declared language and in config pre-defined Range.
Definition Player.cpp:15797
Group * GetGroup()
Definition Player.h:2972
FROM * GetSource() const
Definition Reference.h:83
std::list< HostileReference * > StorageType
float getThreat(Unit *victim, bool alsoSearchOfflineList=false)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
Definition Unit.h:1367
void SetVisible(bool x)
Definition Unit.cpp:4163
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)
void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID=0, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
bool IsAlive() const
Definition Unit.h:2032
static Creature * GetCreature(WorldObject &object, uint64 guid)
Definition Unit.cpp:4905
static Unit * GetUnit(WorldObject &object, uint64 guid)
Definition Unit.cpp:4895
ThreatManager & getThreatManager()
Definition Unit.h:2455
void HandleEmoteCommand(uint32 anim_id)
InstanceScript * GetInstanceScript()
Definition Object.cpp:1612
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TempSummonType::TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition Object.cpp:2703
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:36
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:37
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool OnGossipHello(Player *player, GameObject *soil) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
@ DATA_HORSEMAN_EVENT
@ GAMEOBJECT_PUMPKIN_SHRINE
Creature * me
Creature * DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, TempSummonType type, uint32 despawntime)
ScriptedAI(Creature *creature)
void DoPlaySoundToSet(WorldObject *source, uint32 soundId)
void AttackStart(Unit *) OVERRIDE
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
void SpellHitTarget(Unit *unit, const SpellInfo *spell) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void SpellHit(Unit *caster, const SpellInfo *spell) OVERRIDE
Player * SelectRandomPlayer(float range=0.0f, bool checkLoS=true)
void SpellHit(Unit *caster, const SpellInfo *spell) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void SaySound(uint8 textEntry, Unit *target=0)
void EnterCombat(Unit *) OVERRIDE
void DamageTaken(Unit *, uint32 &damage) OVERRIDE
void SpellHit(Unit *, const SpellInfo *spell) OVERRIDE
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void SpellHit(Unit *, const SpellInfo *spell) OVERRIDE