Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
zone_elwynn_forest.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: Elwynn_Forest
8SD%Complete: 50
9SDCategory: Elwynn Forest
10EndScriptData */
11
12/* ContentData
13npc_blackrock_spy
14npc_blackrock_invader
15npc_stormwind_infantry
16npc_blackrock_battle_worg
17npc_goblin_assassin
18EndContentData */
19
20#include "ScriptMgr.h"
21#include "ScriptedCreature.h"
22#include "Vehicle.h"
23
25{
33 SPELL_SPYING = 92857,
36 NPC_BLACKROCK_BATTLE_WORG = 49871, //Blackrock Battle Worg NPC ID
37 NPC_STORMWIND_INFANTRY = 49869, //Stormwind Infantry NPC ID
38 WORG_FIGHTING_FACTION = 232, //Faction used by worgs to be able to attack infantry
39 WORG_FACTION_RESTORE = 32, //Default Blackrock Battle Worg Faction
40 WORG_GROWL = 2649, //Worg Growl Spell
41 AI_HEALTH_MIN = 85, //Minimum health for AI staged fight between Blackrock Battle Worgs and Stormwind Infantry
42 SAY_INFANTRY_YELL = 1, //Stormwind Infantry Yell phrase from Group 1
43 INFANTRY_YELL_CHANCE = 10 //% Chance for Stormwind Infantry to Yell - May need further adjustment... should be low chance
44};
45
46/*######
47## npc_blackrock_spy
48######*/
49
51{
52public:
53 npc_blackrock_spy() : CreatureScript("npc_blackrock_spy") { }
54
55 CreatureAI* GetAI(Creature* creature) const
56 {
57 return new npc_blackrock_spyAI (creature);
58 }
59
61 {
63 {
64 CastSpying();
65 }
66
68 {
69 GetCreature(-8868.88f, -99.1016f);
70 GetCreature(-8936.5f, -246.743f);
71 GetCreature(-8922.44f, -73.9883f);
72 GetCreature(-8909.68f, -40.0247f);
73 GetCreature(-8834.85f, -119.701f);
74 GetCreature(-9022.08f, -163.965f);
75 GetCreature(-8776.55f, -79.158f);
76 GetCreature(-8960.08f, -63.767f);
77 GetCreature(-8983.12f, -202.827f);
78 }
79
80 void GetCreature(float X, float Y)
81 {
82 if (me->GetHomePosition().GetPositionX() == X && me->GetHomePosition().GetPositionY() == Y)
83 if (!me->IsInCombat() && !me->HasAura(SPELL_SPYING))
85
87 }
88
90 {
91 Spyglass(-8868.88f, -99.1016f, -8936.5f, -246.743f, -8922.44f, -73.9883f, -8909.68f, -40.0247f, -8834.85f,
92 -119.701f, -9022.08f, -163.965f, -8776.55f, -79.158f, -8960.08f, -63.767f, -8983.12f, -202.827f);
93 }
94
95 void Spyglass(float X1, float Y1, float X2, float Y2, float X3, float Y3, float X4, float Y4, float X5, float Y5,
96 float X6, float Y6, float X7, float Y7, float X8, float Y8, float X9, float Y9)
97 {
98 if ((me->GetHomePosition().GetPositionX() != X1 && me->GetHomePosition().GetPositionY() != Y1) &&
99 (me->GetHomePosition().GetPositionX() != X2 && me->GetHomePosition().GetPositionY() != Y2) &&
100 (me->GetHomePosition().GetPositionX() != X3 && me->GetHomePosition().GetPositionY() != Y3) &&
101 (me->GetHomePosition().GetPositionX() != X4 && me->GetHomePosition().GetPositionY() != Y4) &&
102 (me->GetHomePosition().GetPositionX() != X5 && me->GetHomePosition().GetPositionY() != Y5) &&
103 (me->GetHomePosition().GetPositionX() != X6 && me->GetHomePosition().GetPositionY() != Y6) &&
104 (me->GetHomePosition().GetPositionX() != X7 && me->GetHomePosition().GetPositionY() != Y7) &&
105 (me->GetHomePosition().GetPositionX() != X8 && me->GetHomePosition().GetPositionY() != Y8) &&
106 (me->GetHomePosition().GetPositionX() != X9 && me->GetHomePosition().GetPositionY() != Y9))
107 if (me->GetHomePosition().GetPositionX() == me->GetPositionX() && me->GetHomePosition().GetPositionY() == me->GetPositionY())
108 if (!me->IsInCombat() && !me->HasAura(SPELL_SPYGLASS))
110 }
111
116
117 void UpdateAI(uint32 /*diff*/) OVERRIDE
118 {
119 CastSpyglass();
120
121 if (!UpdateVictim())
122 return;
123
125 }
126 };
127};
128
129/*######
130## npc_blackrock_invader
131######*/
132
134{
135public:
136 npc_blackrock_invader() : CreatureScript("npc_blackrock_invader") { }
137
138 CreatureAI* GetAI(Creature* creature) const
139 {
140 return new npc_blackrock_invaderAI (creature);
141 }
142
160};
161
162/*######
163## npc_goblin_assassin
164######*/
165
167{
168public:
169 npc_goblin_assassin() : CreatureScript("npc_goblin_assassin") { }
170
171 CreatureAI* GetAI(Creature* creature) const
172 {
173 return new npc_goblin_assassinAI (creature);
174 }
175
177 {
179 {
180 if (!me->IsInCombat() && !me->HasAura(SPELL_SPYING))
182 }
183
188
189 void UpdateAI(uint32 /*diff*/) OVERRIDE
190 {
191 if (!UpdateVictim())
192 return;
193
195 }
196 };
197};
198
199/*######
200## npc_stormwind_infantry
201######*/
202
204{
205public:
206 npc_stormwind_infantry() : CreatureScript("npc_stormwind_infantry") {}
207
208 CreatureAI* GetAI(Creature* creature) const
209 {
210 return new npc_stormwind_infantryAI (creature);
211 }
212
214 {
216
218
220 {
221 tSeek = std::rand() % 2000 + 1000;
222 cYell = std::rand() % 100;
223 tYell = std::rand() % 60000 + 5000;
224 }
225
226 void DamageTaken(Unit* who, uint32& damage) OVERRIDE
227 {
228 if (who->GetTypeId() == TypeID::TYPEID_PLAYER)//If damage taken from player
229 {
230 me->getThreatManager().resetAllAggro();
231 who->AddThreat(me, 1.0f);
232 me->AddThreat(who, 1.0f);
233 me->AI()->AttackStart(who);
234 }
235 else if (who->IsPet())//If damage taken from pet
236 {
237 me->getThreatManager().resetAllAggro();
238 me->AddThreat(who, 1.0f);
239 me->AI()->AttackStart(who);
240 }
241 if (who->GetEntry() == NPC_BLACKROCK_BATTLE_WORG && me->HealthBelowPct(AI_HEALTH_MIN))//If damage taken from Blackrock Battle Worg
242 {
243 damage = 0;//We do not want to do damage if Blackrock Battle Worg is below preset HP level (currently 85% - Blizzlike)
244 me->AddThreat(who, 1.0f);
245 me->AI()->AttackStart(who);
246 }
247 }
248
250 {
251 if (!UpdateVictim())
252 return;
253 else
254 {
255 if (tYell <= diff)//Chance to yell every 5 to 10 seconds
256 {
257 if (cYell < INFANTRY_YELL_CHANCE)//Roll for random chance to Yell phrase
258 {
259 me->AI()->Talk(SAY_INFANTRY_YELL); //Yell phrase
260 tYell = std::rand() % 120000 + 10000; //After First yell, change time range from 10 to 120 seconds
261 }
262 else
263 tYell = std::rand() % 120000 + 10000; //From 10 to 120 seconds
264 }
265 else
266 {
267 tYell -= diff;
268 DoMeleeAttackIfReady(); //Else do standard attack
269 }
270 }
271 }
272 };
273};
274
275/*######
276## npc_blackrock_battle_worg
277######*/
278
280{
281public:
282 npc_blackrock_battle_worg() : CreatureScript("npc_blackrock_battle_worg") {}
283
284 CreatureAI* GetAI(Creature* creature) const
285 {
286 return new npc_blackrock_battle_worgAI (creature);
287 }
288
290 {
292
294
296 {
297 tSeek = std::rand() % 2000 + 1000;
298 tGrowl = std::rand() % 10000 + 8500;
299 me->setFaction(WORG_FACTION_RESTORE);//Restore our faction on reset
300 }
301
302 void DamageTaken(Unit* who, uint32& damage) OVERRIDE
303 {
304 if (who->GetTypeId() == TypeID::TYPEID_PLAYER)//If damage taken from player
305 {
306 me->getThreatManager().resetAllAggro();
307 who->AddThreat(me, 1.0f);
308 me->AddThreat(who, 1.0f);
309 me->AI()->AttackStart(who);
310 }
311 else if (who->IsPet())//If damage taken from pet
312 {
313 me->getThreatManager().resetAllAggro();
314 me->AddThreat(who, 1.0f);
315 me->AI()->AttackStart(who);
316 }
317 if (who->GetEntry() == NPC_STORMWIND_INFANTRY && me->HealthBelowPct(AI_HEALTH_MIN))//If damage taken from Stormwind Infantry
318 {
319 damage = 0;//We do not want to do damage if Stormwind Infantry is below preset HP level (currently 85% - Blizzlike)
320 me->AddThreat(who, 1.0f);
321 me->AI()->AttackStart(who);
322 }
323 }
324
326 {
327 if (tSeek <= diff)
328 {
329 if ((me->IsAlive()) && (!me->IsInCombat() && (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) <= 1.0f)))
330 if (Creature* enemy = me->FindNearestCreature(NPC_STORMWIND_INFANTRY,1.0f, true))
331 {
332 me->setFaction(WORG_FIGHTING_FACTION);//We must change our faction to one which is able to attack Stormwind Infantry (Faction 232 works well)
333 me->AI()->AttackStart(enemy);
334 tSeek = std::rand() % 2000 + 1000;
335 }
336 }
337 else
338 tSeek -= diff;
339
340 if (UpdateVictim())
341 {
342 if (tGrowl <=diff)
343 {
344 DoCast(me->GetVictim(), WORG_GROWL);//Do Growl if ready
345 tGrowl = std::rand() % 10000 + 8500;
346 }
347 else
348 {
349 tGrowl -= diff;
350 DoMeleeAttackIfReady();//Else do standard attack
351 }
352 }
353 else
354 {
355 me->setFaction(WORG_FACTION_RESTORE);//Reset my faction if not in combat
356 return;
357 }
358 }
359 };
360};
361
363{
364public:
365 npc_hogger_elwynn() : CreatureScript("npc_hogger_elwynn") { }
366
367 CreatureAI* GetAI(Creature* creature) const
368 {
369 return new npc_hogger_elwynnAI(creature);
370 }
371
373 {
374 const Position dumasSpawnPos = { -10132.9f, 653.561f, 36.0503f, 2.021f };
375 const Position andromathSpawnPos = { -10123.0f, 656.875f, 36.0511f, 1.97181f };
376 const Position ragaMuffin1SpawnPos = { -10122.5f, 660.198f, 36.0366f, 2.83775f };
377 const Position ragaMuffin2SpawnPos = { -10130.9f, 653.302f, 36.0501f, 1.65242f };
378 const Position jonathanSpawnPos = { -10128.3f, 656.465f, 36.0544f, 2.04543f };
389 {
391 NPC_DUMAS = 46940,
395 };
420
421 npc_hogger_elwynnAI(Creature* creature) : ScriptedAI(creature) { }
422
424 {
425 phase = 0;
426 me->SetReactState(REACT_AGGRESSIVE);
428 events.Reset();
429 }
430
431 void EnterCombat(Unit* /*who*/) OVERRIDE
432 {
433 events.ScheduleEvent(EVENT_VICIOUS_SLICE, 3000);
434 }
435
436 void DamageTaken(Unit* attacker, uint32& damage) OVERRIDE
437 {
438 if (phase == 0 && !HealthAbovePct(50))
439 {
440 phase = 1;
441 events.CancelEvent(EVENT_VICIOUS_SLICE);
442 events.ScheduleEvent(EVENT_EATING, 1000);
443 }
444
445 if (phase == 1 && damage >= me->GetHealth())
446 {
447 phase = 2;
448 events.ScheduleEvent(EVENT_OUTRO, 1000);
449 me->RemoveAllAuras();
450 me->AttackStop();
451 attacker->AttackStop();
452 me->SetReactState(REACT_PASSIVE);
454 me->SetWalk(true);
456 me->GetMotionMaster()->MovePoint(1, -10136.9f, 670.009f, 36.03682f);
457 damage = me->GetHealth() - 1;
458 }
459 }
460
462 {
463 if (!UpdateVictim())
464 return;
465
466 events.Update(diff);
467
468 switch (events.ExecuteEvent())
469 {
471 {
472 me->CastSpell(me->GetVictim(), SPELL_VICIOUS_SLICE, false);
473 events.ScheduleEvent(EVENT_VICIOUS_SLICE, 12000);
474 break;
475 }
476 case EVENT_EATING:
477 {
478 if (phase == 1)
479 {
481 if (Creature* meat = me->FindNearestCreature(NPC_TRIGGER_MEAT, 30.0f))
482 {
483 Talk(YELL_YIPE, me);
484 me->CastSpell(me, SPELL_SUMMON_MINIONS, false);
485 me->GetMotionMaster()->MoveFollow(meat, 0.01f, 1.57079f);
486 me->SetFacingToObject(meat);
487 events.ScheduleEvent(EVENT_BLOODY_STRIKE, 3000);
488 }
489 }
490 break;
491 }
493 {
494 if (Creature* meat = me->FindNearestCreature(NPC_TRIGGER_MEAT, 30.0f))
495 me->CastSpell(meat, SPELL_BLOODY_STRIKE, false);
496
497 events.ScheduleEvent(EVENT_BLOODY_STRIKE, 3000);
498 events.ScheduleEvent(EVENT_UPSET_STOMACH, 10000);
499 break;
500 }
502 {
503 events.CancelEvent(EVENT_UPSET_STOMACH);
504 events.CancelEvent(EVENT_BLOODY_STRIKE);
505 me->CastSpell(me, SPELL_UPSET_STOMACH, false);
506
507 if (Unit* victim = me->SelectVictim())
508 {
509 me->GetMotionMaster()->MoveFollow(victim, 0.1f, 0.0f);
510 AttackStart(victim);
511 }
512
513 events.ScheduleEvent(EVENT_VICIOUS_SLICE, 3000);
514 break;
515 }
516 case EVENT_OUTRO:
517 {
518 events.CancelEvent(EVENT_VICIOUS_SLICE);
519 events.CancelEvent(EVENT_EATING);
520 events.CancelEvent(EVENT_UPSET_STOMACH);
521 events.CancelEvent(EVENT_BLOODY_STRIKE);
522
524 {
525 dumas->CastSpell(dumas, SPELL_TELEPORT_VISUAL_ONLY);
526 float x, y, z;
527 dumas->GetClosePoint(x, y, z, dumas->GetObjectSize() / 3, 2.5f);
528 dumas->GetMotionMaster()->MovePoint(0, x, y, z);
529 }
530
532 {
533 andromath->CastSpell(andromath, SPELL_TELEPORT_VISUAL_ONLY);
534 float x, y, z;
535 andromath->GetClosePoint(x, y, z, andromath->GetObjectSize() / 3, 2.5f);
536 andromath->GetMotionMaster()->MovePoint(0, x, y, z);
537 }
538
540 {
541 ragamuffin1->CastSpell(ragamuffin1, SPELL_TELEPORT_VISUAL_ONLY);
542 float x, y, z;
543 ragamuffin1->GetClosePoint(x, y, z, ragamuffin1->GetObjectSize() / 3, 2.5f);
544 ragamuffin1->GetMotionMaster()->MovePoint(0, x, y, z);
545 events.ScheduleEvent(EVENT_KID_TALK1, 5000);
546 }
547
549 {
550 ragamuffin2->CastSpell(ragamuffin2, SPELL_TELEPORT_VISUAL_ONLY);
551 float x, y, z;
552 ragamuffin2->GetClosePoint(x, y, z, ragamuffin2->GetObjectSize() / 3, 2.5f);
553 ragamuffin2->GetMotionMaster()->MovePoint(0, x, y, z);
554 }
555
557 {
558 jonathan->CastSpell(jonathan, SPELL_TELEPORT_VISUAL_ONLY);
559 jonathan->MonsterYell("Hold your blade, adventurer!", Language::LANG_UNIVERSAL, me);
560 jonathan->SetWalk(true);
561 jonathan->Dismount();
562 float x, y, z;
563 jonathan->GetClosePoint(x, y, z, jonathan->GetObjectSize() / 3, 10.0f);
564 jonathan->GetMotionMaster()->MovePoint(0, x, y, z);
565 me->SetFacingToObject(jonathan);
566 events.ScheduleEvent(EVENT_HOGGER_GRR, 8000);
567 events.ScheduleEvent(EVENT_JONATHAN_TALK2, 15000);
568 }
569 break;
570 }
571 case EVENT_KID_TALK1:
572 {
573 if (Creature* ragaMuffin1 = me->FindNearestCreature(NPC_RAGAMUFFIN, 25.0f))
574 {
575 ragaMuffin1->MonsterSay("General Hammond Clay!", Language::LANG_UNIVERSAL, ragaMuffin1);
576
577 if (Creature* ragaMuffin2 = ragaMuffin1->FindNearestCreature(NPC_RAGAMUFFIN, 25.0f))
578 ragaMuffin2->MonsterSay("Wow!", Language::LANG_UNIVERSAL, ragaMuffin2);
579 }
580 break;
581 }
582 case EVENT_HOGGER_GRR:
583 {
584 Talk(SAY_GRR);
585 break;
586 }
588 {
589 if (Creature* jonathan = me->FindNearestCreature(NPC_JONATHAN, 25.0f))
590 {
591 jonathan->MonsterSay("This beast leads the Riverpaw gnoll gang and may be the key to ending gnoll aggression in Elwynn.", Language::LANG_UNIVERSAL, jonathan);
592 jonathan->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
593 }
594 events.ScheduleEvent(EVENT_JONATHAN_TALK3, 5000);
595 break;
596 }
598 {
599 if (Creature* jonathan = me->FindNearestCreature(NPC_JONATHAN, 25.0f))
600 {
601 jonathan->MonsterSay("We're taking him into custody in the name of King Varian Wrynn.", Language::LANG_UNIVERSAL, jonathan);
602 }
603 events.ScheduleEvent(EVENT_HOGGER_NOO, 5000);
604 break;
605 }
606 case EVENT_HOGGER_NOO:
607 {
608 Talk(SAY_NO);
609 events.ScheduleEvent(EVENT_JONATHAN_TALK4, 5000);
610 break;
611 }
613 {
614 if (Creature* jonathan = me->FindNearestCreature(NPC_JONATHAN, 25.0f))
615 {
616 if (Creature* andromath = me->FindNearestCreature(NPC_ANDROMATH, 25.0f))
617 {
618 jonathan->SetFacingToObject(andromath);
619 }
620 jonathan->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
621 jonathan->MonsterSay("Take us to the Stockades, Andromath.", Language::LANG_UNIVERSAL, jonathan);
622 }
623 events.ScheduleEvent(EVENT_TELEPORT_AND_DESPAWN, 3000);
624 break;
625 }
627 {
628 if (Creature* dumas = me->FindNearestCreature(NPC_DUMAS, 25.0f))
629 {
630 dumas->CastSpell(dumas, SPELL_TELEPORT_VISUAL_ONLY);
631 dumas->DespawnOrUnsummon();
632 }
633
634 if (Creature* andromath = me->FindNearestCreature(NPC_ANDROMATH, 25.0f))
635 {
636 andromath->CastSpell(andromath, SPELL_TELEPORT_VISUAL_ONLY);
637 andromath->DespawnOrUnsummon();
638 }
639
640 if (Creature* jonathan = me->FindNearestCreature(NPC_JONATHAN, 25.0f))
641 {
642 jonathan->CastSpell(jonathan, SPELL_TELEPORT_VISUAL_ONLY);
643 jonathan->DespawnOrUnsummon();
644 }
645
646 for (uint8 i = 0; i < 2; i++)
647 {
648 if (Creature* ragaMuffin = me->FindNearestCreature(NPC_RAGAMUFFIN, 25.0f))
649 {
650 ragaMuffin->CastSpell(ragaMuffin, SPELL_TELEPORT_VISUAL_ONLY);
651 ragaMuffin->DespawnOrUnsummon();
652 }
653 }
654
655 std::list<Player*> playerList;
656 GetPlayerListInGrid(playerList, me, 15.0f);
657
658 // TODO: FIX member access into incomplete type Player
659 // reference to incomplete type player is not allowed.
660 /*
661 for (auto&& player : playerList)
662 {
663 player->KilledMonsterCredit(448);
664 }*/
665
666 me->CastSpell(me, SPELL_TELEPORT_VISUAL_ONLY);
667 me->DespawnOrUnsummon();
668 }
669 }
671 }
672 };
673};
674
675#include <map>
676#include "Timer.h"
677
678static std::map<uint64, uint32> s_DughanGossipCooldowns;
679
681{
682public:
683 npc_marshal_dughan() : CreatureScript("npc_marshal_dughan") { }
684
685 bool OnGossipHello(Player* player, Creature* creature) override
686 {
687 player->PrepareGossipMenu(creature, creature->GetCreatureTemplate()->GossipMenuId, true);
688
689 if (player->GetQuestStatus(35) == QUEST_STATUS_COMPLETE)
690 {
691 player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I wish to ride the Stormwind charger, sir.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
692 }
693
694 player->SendPreparedGossip(creature);
695 return true;
696 }
697
698 bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) override
699 {
700 player->PlayerTalkClass->ClearMenus();
701 if (action == GOSSIP_ACTION_INFO_DEF + 1)
702 {
704
705 // Dismount the player if they are currently mounted
706 if (player->IsMounted())
707 player->Dismount();
708
709 // Use the native spell which safely summons the horse and mounts the player
710 player->CastSpell(player, 78854, true);
711 }
712 return true;
713 }
714};
715
717{
718public:
719 npc_stormwind_charger() : CreatureScript("npc_stormwind_charger") { }
720
722 {
724 {
725 }
726
727 void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) OVERRIDE
728 {
729 if (Player* player = who->ToPlayer())
730 {
731 if (apply)
732 {
735 me->AddUnitState(UNIT_STATE_IGNORE_PATHFINDING);
736 me->GetMotionMaster()->MovePath(42260, false);
737 }
738 else
739 {
741 me->DespawnOrUnsummon(1000);
742 }
743 }
744 }
745
747 {
749 if (type == WAYPOINT_MOTION_TYPE && id == 37)
750 {
751 me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
752 if (Unit* passenger = me->GetVehicleKit()->GetPassenger(0))
753 {
754 passenger->ExitVehicle();
755 }
756 }
757 }
758 };
759
760 CreatureAI* GetAI(Creature* creature) const override
761 {
762 return new npc_stormwind_chargerAI(creature);
763 }
764};
765
const T & RAND(const T &v1, const T &v2)
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
std::int8_t int8
Definition Define.h:75
#define OVERRIDE
Definition Define.h:60
@ GOSSIP_ICON_CHAT
Definition GossipDef.h:46
@ WAYPOINT_MOTION_TYPE
@ TYPEID_PLAYER
Definition Object.h:55
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition Object.h:68
@ QUEST_STATUS_COMPLETE
Definition QuestDef.h:87
void GetPlayerListInGrid(std::list< Player * > &list, WorldObject *source, float maxSearchRange)
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
@ EMOTE_ONESHOT_POINT
@ EMOTE_ONESHOT_SALUTE
@ UNIT_STATE_IGNORE_PATHFINDING
Definition Unit.h:539
@ REACT_PASSIVE
Definition Unit.h:1156
@ REACT_AGGRESSIVE
Definition Unit.h:1158
@ UNIT_FLAG_NON_ATTACKABLE
Definition Unit.h:626
@ UNIT_FLAG_IMMUNE_TO_NPC
Definition Unit.h:634
@ UNIT_FLAG_IMMUNE_TO_PC
Definition Unit.h:633
@ UNIT_FIELD_FLAGS
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
virtual void MovementInform(uint32, uint32)
Definition CreatureAI.h:118
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:56
CreatureTemplate const * GetCreatureTemplate() const
Definition Creature.h:524
CreatureScript(const char *name)
Player * ToPlayer()
Definition Object.h:204
void SendPreparedGossip(WorldObject *source)
Definition Player.cpp:11815
QuestStatus GetQuestStatus(uint32 quest_id) const
void PrepareGossipMenu(WorldObject *source, uint32 menuId=0, bool showQuests=false)
Definition Player.cpp:11668
PlayerMenu * PlayerTalkClass
Definition Player.h:2680
void ClearMenus()
void SendCloseGossip() const
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)
void Dismount()
Definition Unit.cpp:3685
bool IsMounted() const
Definition Unit.h:1742
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2801
CreatureAI * GetAI(Creature *creature) const
CreatureAI * GetAI(Creature *creature) const
CreatureAI * GetAI(Creature *creature) const
CreatureAI * GetAI(Creature *creature) const
CreatureAI * GetAI(Creature *creature) const
bool OnGossipHello(Player *player, Creature *creature) override
bool OnGossipSelect(Player *player, Creature *creature, uint32 sender, uint32 action) override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const
uint32 GossipMenuId
Definition Creature.h:74
Creature * me
bool HealthAbovePct(uint32 pct) const
ScriptedAI(Creature *creature)
void AttackStart(Unit *) OVERRIDE
VehicleAI(Creature *c)
Definition CombatAI.cpp:262
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void DamageTaken(Unit *who, uint32 &damage) OVERRIDE
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
void Spyglass(float X1, float Y1, float X2, float Y2, float X3, float Y3, float X4, float Y4, float X5, float Y5, float X6, float Y6, float X7, float Y7, float X8, float Y8, float X9, float Y9)
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void DamageTaken(Unit *attacker, uint32 &damage) OVERRIDE
void PassengerBoarded(Unit *who, int8, bool apply) OVERRIDE
== Fields =======================================
void MovementInform(uint32 type, uint32 id) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void DamageTaken(Unit *who, uint32 &damage) OVERRIDE
static std::map< uint64, uint32 > s_DughanGossipCooldowns
@ SAY_BLACKROCK_COMBAT_2
@ SAY_INFANTRY_YELL
@ SAY_BLACKROCK_COMBAT_3
@ NPC_BLACKROCK_BATTLE_WORG
@ AI_HEALTH_MIN
@ SPELL_SPYING
@ SAY_BLACKROCK_COMBAT_4
@ SAY_BLACKROCK_COMBAT_5
@ WORG_FIGHTING_FACTION
@ SPELL_SPYGLASS
@ INFANTRY_YELL_CHANCE
@ SAY_ASSASSIN_COMBAT_1
@ SPELL_SNEAKING
@ WORG_FACTION_RESTORE
@ SAY_BLACKROCK_COMBAT_1
@ NPC_STORMWIND_INFANTRY
@ SAY_ASSASSIN_COMBAT_2
void AddSC_elwynn_forest()