TrinityCore
zone_grizzly_hills.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 "ScriptMgr.h"
19#include "CombatAI.h"
20#include "MotionMaster.h"
21#include "ObjectAccessor.h"
22#include "Player.h"
23#include "ScriptedEscortAI.h"
24#include "SpellInfo.h"
25#include "SpellScript.h"
26#include "TemporarySummon.h"
27
28/*######
29## Quest 12027: Mr. Floppy's Perilous Adventure
30######*/
31
33{
34 // Creature
35 NPC_MRFLOPPY = 26589,
37 NPC_RAVENOUS_WORG = 26590, // RWORG
38 NPC_EMILY = 26588,
39 // Quest
41 // Spell
42 SPELL_MRFLOPPY = 47184, // vehicle aura
43 // Text
44 SAY_WORGHAGGRO1 = 0, // Um... I think one of those wolves is back...
45 SAY_WORGHAGGRO2 = 1, // He's going for Mr. Floppy!
46 SAY_WORGRAGGRO3 = 2, // Oh, no! Look, it's another wolf, and it's a biiiiiig one!
47 SAY_WORGRAGGRO4 = 3, // He's gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!
48 SAY_RANDOMAGGRO = 4, // There's a big meanie attacking Mr. Floppy! Help!
49 SAY_VICTORY1 = 5, // Let's get out of here before more wolves find us!
50 SAY_VICTORY2 = 6, // Don't go toward the light, Mr. Floppy!
51 SAY_VICTORY3 = 7, // Mr. Floppy, you're ok! Thank you so much for saving Mr. Floppy!
52 SAY_VICTORY4 = 8, // I think I see the camp! We're almost home, Mr. Floppy! Let's go!
53 TEXT_EMOTE_WP1 = 9, // Mr. Floppy revives
54 TEXT_EMOTE_AGGRO = 10, // The Ravenous Worg chomps down on Mr. Floppy
55 SAY_QUEST_ACCEPT = 11, // Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!
56 SAY_QUEST_COMPLETE = 12, // Thank you for helping me get back to the camp. Go tell Walter that I'm safe now!
57 PATH_ESCORT_EMILY = 212706
58};
59
60// emily
61struct npc_emily : public EscortAI
62{
63 npc_emily(Creature* creature) : EscortAI(creature) { }
64
65 void JustSummoned(Creature* summoned) override
66 {
67 if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 50.0f))
68 summoned->AI()->AttackStart(Mrfloppy);
69 else
70 summoned->AI()->AttackStart(me->GetVictim());
71 }
72
73 void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
74 {
75 Player* player = GetPlayerForEscort();
76 if (!player)
77 return;
78
79 switch (waypointId)
80 {
81 case 9:
82 if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 100.0f))
83 _mrfloppyGUID = Mrfloppy->GetGUID();
84 break;
85 case 10:
87 {
90 }
91 break;
92 case 11:
95 break;
96 case 17:
98 Mrfloppy->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
101 {
102 RWORG->SetFaction(FACTION_FRIENDLY);
103 _RavenousworgGUID = RWORG->GetGUID();
104 }
105 break;
106 case 18:
108 {
110 RWORG->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
111 DoCast(Mrfloppy, SPELL_MRFLOPPY);
112 }
113 break;
114 case 19:
116 {
117 if (Mrfloppy->HasAura(SPELL_MRFLOPPY))
118 {
120 Mrfloppy->EnterVehicle(RWORG);
121 }
122 }
123 break;
124 case 20:
126 RWORG->HandleEmoteCommand(EMOTE_ONESHOT_WOUND_CRITICAL);
127 break;
128 case 21:
130 {
132 {
133 Unit::Kill(RWORG, Mrfloppy);
134 Mrfloppy->ExitVehicle();
135 RWORG->SetFaction(FACTION_MONSTER);
136 RWORG->GetMotionMaster()->MovePoint(0, RWORG->GetPositionX()+10, RWORG->GetPositionY()+80, RWORG->GetPositionZ());
138 }
139 }
140 break;
141 case 22:
143 {
144 if (Mrfloppy->isDead())
145 {
147 RWORG->DisappearAndDie();
148 me->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
149 Mrfloppy->setDeathState(ALIVE);
150 Mrfloppy->GetMotionMaster()->MoveFollow(me, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
152 }
153 }
154 break;
155 case 24:
157 Talk(SAY_QUEST_COMPLETE, player);
158 me->SetWalk(false);
159 break;
160 case 25:
162 break;
163 case 27:
166 Mrfloppy->DisappearAndDie();
167 break;
168 }
169 }
170
171 void JustEngagedWith(Unit* /*Who*/) override
172 {
174 }
175
176 void Reset() override
177 {
180 }
181
182 void OnQuestAccept(Player* player, Quest const* quest) override
183 {
184 if (quest->GetQuestId() == QUEST_PERILOUS_ADVENTURE)
185 {
187 if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 180.0f))
188 Mrfloppy->GetMotionMaster()->MoveFollow(me, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
189
191 Start(true, player->GetGUID());
192 }
193 }
194
195 private:
198};
199
200// mrfloppy
202{
203 npc_mrfloppy(Creature* creature) : ScriptedAI(creature) { }
204
205 void Reset() override { }
206
207 void JustEngagedWith(Unit* Who) override
208 {
209 if (Creature* Emily = GetClosestCreatureWithEntry(me, NPC_EMILY, 50.0f))
210 {
211 switch (Who->GetEntry())
212 {
213 case NPC_HUNGRY_WORG:
214 Emily->AI()->Talk(SAY_WORGHAGGRO2);
215 break;
217 Emily->AI()->Talk(SAY_WORGRAGGRO4);
218 break;
219 default:
220 Emily->AI()->Talk(SAY_RANDOMAGGRO);
221 }
222 }
223 }
224
225 void EnterEvadeMode(EvadeReason /*why*/) override { }
226
227 void MoveInLineOfSight(Unit* /*who*/) override { }
228
229 void UpdateAI(uint32 /*diff*/) override
230 {
231 if (!UpdateVictim())
232 return;
233 }
234};
235
236/*######
237## Quest 12227: Doing Your Duty
238######*/
239
241{
242 // Sound
244 SOUND_MALE = 12670,
245 // Spell
248 SPELL_DUST_FIELD = 48329
250
252{
254 {
255 Initialize();
256 }
257
259 {
260 _counter = 0;
261 _gender = 0;
262 }
263
264 void Reset() override
265 {
266 Initialize();
267 }
268
269 void SetData(uint32 Type, uint32 Data) override
270 {
271 if (Type == 1)
272 _gender = Data;
273 }
274
275 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
276 {
277 Unit* unitCaster = caster->ToUnit();
278 if (!unitCaster)
279 return;
280
281 if (spellInfo->Id == SPELL_OUTHOUSE_GROANS)
282 {
283 ++_counter;
284 if (_counter < 5)
285 DoCast(unitCaster, SPELL_CAMERA_SHAKE, true);
286 else
287 _counter = 0;
288 DoCast(me, SPELL_DUST_FIELD, true);
289 switch (_gender)
290 {
291 case GENDER_FEMALE:
293 break;
294
295 case GENDER_MALE:
297 break;
298 }
299 }
300 }
301 private:
304};
305
306// Tallhorn Stage
307
309{
310 //Gameobject
311 OBJECT_HAUNCH = 188665
313
315{
316 npc_tallhorn_stag(Creature* creature) : ScriptedAI(creature)
317 {
318 Initialize();
319 }
320
322 {
323 _phase = 1;
324 }
325
326 void Reset() override
327 {
328 Initialize();
329 }
330
331 void UpdateAI(uint32 /*diff*/) override
332 {
333 if (_phase == 1)
334 {
336 {
338 me->SetImmuneToPC(true);
340 }
341 _phase = 0;
342 }
343 if (!UpdateVictim())
344 return;
345 }
346 private:
348};
349
350// Amberpine Woodsman
351
353{
354 // Creature
355 NPC_TALLHORN_STAG = 26363
357
359{
363
365{
366 npc_amberpine_woodsman(Creature* creature) : ScriptedAI(creature) { }
367
368 void Reset() override
369 {
371 {
373 }
374 else
376 }
377
378 void UpdateAI(uint32 diff) override
379 {
380 _events.Update(diff);
381
382 while (uint32 eventId = _events.ExecuteEvent())
383 {
384 switch (eventId)
385 {
386 case EVENT_WOODSMAN_1:
389 break;
390 case EVENT_WOODSMAN_2:
393 break;
394 default:
395 break;
396 }
397 }
398 UpdateVictim();
399 }
400 private:
402};
403
404/*######
405## Quest 12288: Overwhelmed!
406######*/
407
409{
410 // Quest
412 // Spell
415 // Text
416 SAY_RANDOM = 0
418
420{
422 {
423 Initialize();
424 }
425
427 {
428 _despawnTimer = 5s;
429 }
430
431 void Reset() override
432 {
433 Initialize();
434 }
435
436 void MovementInform(uint32, uint32 id) override
437 {
438 if (id == 1)
440 }
441
442 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
443 {
444 Player* playerCaster = caster->ToPlayer();
445 if (!playerCaster)
446 return;
447
449 {
450 DoCast(playerCaster, SPELL_KILL_CREDIT);
451 Talk(SAY_RANDOM, playerCaster);
452 if (me->IsStandState())
454 else
455 {
458 }
459 }
460 }
461 private:
463};
464
465/*Venture co. Straggler - when you cast Smoke Bomb, he will yell and run away*/
467{
468 // Quest
471 // Spell
473 SPELL_CHOP = 43410,
475 // Text
476 SAY_SEO = 0
478
480{
485 EVENT_CHOP = 5
487
489{
491
492 void JustEngagedWith(Unit* /*who*/) override
493 {
495 }
496
497 void Reset() override
498 {
500
502 me->SetImmuneToPC(false);
504 }
505
506 void UpdateAI(uint32 diff) override
507 {
508 _events.Update(diff);
509
510 while (uint32 eventId = _events.ExecuteEvent())
511 {
512 switch (eventId)
513 {
519 break;
521 Talk(SAY_SEO);
524 break;
528 break;
531 break;
532 case EVENT_CHOP:
533 if (UpdateVictim())
535 _events.Repeat(Seconds(10), Seconds(12));
536 break;
537 default:
538 break;
539 }
540 }
541
542 if (!UpdateVictim())
543 return;
544 }
545
546 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
547 {
548 if (spellInfo->Id == SPELL_SMOKE_BOMB && caster->GetTypeId() == TYPEID_PLAYER)
549 {
551 me->SetImmuneToPC(true);
553 me->CombatStop(false);
554 _playerGUID = caster->GetGUID();
556 }
557 }
558
559private:
562};
563
564/*######
565## Quest: A Blade Fit For A Champion
566######*/
567
569{
570 // Creature
574 // Items
576 // Spells
578 SPELL_FROG_LOVE = 62537, // for 1 minute !
579 SPELL_WARTS = 62581,
583 // Text
585 SAY_MAIDEN_1 = 1
587
589{
596
598{
599 npc_lake_frog(Creature* creature) : ScriptedAI(creature)
600 {
601 Initialize();
602 }
603
605 {
606 _following = false;
607 _runningScript = false;
608 }
609
610 void Reset() override
611 {
612 Initialize();
615 }
616
617 void UpdateAI(uint32 diff) override
618 {
619 if (_following)
622
623 _events.Update(diff);
624
625 while (uint32 eventId = _events.ExecuteEvent())
626 {
627 switch (eventId)
628 {
629 case EVENT_LAKEFROG_1:
633 break;
634 case EVENT_LAKEFROG_2:
637 break;
638 case EVENT_LAKEFROG_3:
641 break;
642 case EVENT_LAKEFROG_4:
645 break;
646 case EVENT_LAKEFROG_5:
649 break;
650 default:
651 break;
652 }
653 }
654 }
655
656 void ReceiveEmote(Player* player, uint32 emote) override
657 {
659 return;
660
661 if (emote == TEXT_EMOTE_KISS && me->IsWithinDistInMap(player, 30.0f) && player->HasItemCount(ITEM_WARTS_B_GONE_LIP_BALM, 1, false))
662 {
664 player->AddAura(SPELL_WARTS, player);
665 else
666 {
667 DoCast(player, SPELL_FROG_KISS); // Removes SPELL_WARTSBGONE_LIP_BALM
668
669 if (me->GetEntry() == NPC_LAKE_FROG)
670 {
672 me->GetMotionMaster()->MoveFollow(player, 0.3f, frand(float(M_PI) / 2, float(M_PI) + (float(M_PI) / 2)));
673 _following = true;
674 }
675 else if (me->GetEntry() == NPC_LAKE_FROG_QUEST)
676 {
678 me->SetFacingToObject(player);
679 _runningScript = true;
681 }
682 }
683 }
684 }
685
686 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
687 {
689 return false;
690 }
691
692private:
696};
697
699{
702
704{
705 bool Load() override
706 {
707 return GetCaster()->GetTypeId() == TYPEID_UNIT;
708 }
709
710 void HandleScript(SpellEffIndex /*effIndex*/)
711 {
712 if (GetCaster()->ToCreature()->GetEntry() == NPC_BROKEN_DOWN_SHREDDER)
714 }
715
716 void Register() override
717 {
719 }
720};
721
723{
725 SPELL_WORGENS_CALL = 53095
727
728// 53094 - Infected Worgen Bite
730{
732 {
733 Unit* target = GetTarget();
734 if (target->GetTypeId() == TYPEID_PLAYER)
735 if (GetStackAmount() == GetSpellInfo()->StackAmount)
736 {
737 Remove();
738 target->CastSpell(target, SPELL_WORGENS_CALL, true);
739 }
740 }
741
742 void Register() override
743 {
745 }
746};
747
748/*######
749## Quest: Riding the Red Rocket
750######*/
751
753{
759 SPELL_DETONATE = 49250
761
763{
765 {
766 _finished = false;
768 }
769
770 void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override
771 {
772 if (apply && who->ToPlayer())
773 {
775 _faction = who->ToPlayer()->GetTeam();
776 }
777 }
778
779 void JustReachedHome() override
780 {
781 _finished = false;
782 me->SetVisible(true);
784 }
785
786 void DoAction(int32 /*action*/) override
787 {
788 FinishQuest(false, _faction);
789 }
790
791 void SpellHit(WorldObject* caster, SpellInfo const* /*spellInfo*/) override
792 {
793 if (caster->GetEntry() == NPC_HORDE_LUMBERBOAT || caster->GetEntry() == NPC_ALLIANCE_LUMBERBOAT)
794 FinishQuest(true, _faction);
795 }
796
797 void FinishQuest(bool success, uint32 faction)
798 {
799 if (_finished)
800 return;
801
802 _finished = true;
803
804 if (success)
806
809 me->SetVisible(false);
811 }
812
813private:
816};
817
819{
822 SPELL_WARHEAD_FUSE = 49181
824// 49107 - Vehicle: Warhead Fuse
826{
827 bool Validate(SpellInfo const* /*spellInfo*/) override
828 {
830 }
831
832 void HandleDummy(SpellEffIndex /*effIndex*/)
833 {
834 Unit* caster = GetCaster();
835
836 caster->CastSpell(caster, SPELL_WARHEAD_Z_CHECK, true);
837 caster->CastSpell(caster, SPELL_WARHEAD_SEEKING_LUMBERSHIP, true);
838 caster->CastSpell(caster, SPELL_WARHEAD_FUSE, true);
839 }
840
841 void Register() override
842 {
844 }
845};
846
848{
853// 49250 - Detonate
855{
856 bool Validate(SpellInfo const* /*spellInfo*/) override
857 {
859 }
860
861 void HandleDummy(SpellEffIndex /*effIndex*/)
862 {
863 Unit* caster = GetCaster();
864 Player* player = GetHitPlayer();
865 if (!player)
866 return;
867
868 player->ExitVehicle();
869 float horizontalSpeed = 3.0f;
870 float verticalSpeed = 40.0f;
871 player->KnockbackFrom(caster->GetPosition(), horizontalSpeed, verticalSpeed);
872 caster->CastSpell(player, SPELL_PARACHUTE, true);
873
874 std::list<Creature*> explosionBunnys;
876 for (std::list<Creature*>::const_iterator itr = explosionBunnys.begin(); itr != explosionBunnys.end(); ++itr)
877 (*itr)->CastSpell((*itr), SPELL_TORPEDO_EXPLOSION, true);
878 }
879
880 void Register() override
881 {
883 }
884};
885
886// 61678 - Z Check
888{
889public:
891 {
892 _posZ = 0.0f;
893 }
894
895 void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
896 {
898 }
899
900 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
901 {
903
904 if (_posZ != GetTarget()->GetPositionZ())
905 if (Creature* target = GetTarget()->ToCreature())
906 target->AI()->DoAction(0);
907 }
908
909private:
910 float _posZ;
911
912 void Register() override
913 {
916 }
917};
918
919// 49181 - Warhead Fuse
921{
922 void HandleOnEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
923 {
924 if (Unit* rocketUnit = GetTarget()->GetVehicleBase())
925 if (Creature* rocketCrea = rocketUnit->ToCreature())
926 rocketCrea->AI()->DoAction(0);
927 }
928
929 void Register() override
930 {
932 }
933};
934
936{
952}
#define M_PI
Definition: Common.h:115
T GetEntry(std::unordered_map< uint32, T > const &map, CriteriaTreeEntry const *tree)
uint8_t uint8
Definition: Define.h:144
int8_t int8
Definition: Define.h:140
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition: Duration.h:32
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition: Duration.h:29
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition: ObjectDefines.h:63
@ TYPEID_UNIT
Definition: ObjectGuid.h:40
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
#define PET_FOLLOW_ANGLE
Definition: PetDefines.h:98
#define PET_FOLLOW_DIST
Definition: PetDefines.h:97
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:145
float frand(float min, float max)
Definition: Random.cpp:55
#define RegisterCreatureAI(ai_name)
Definition: ScriptMgr.h:1380
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive=true)
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_0
Definition: SharedDefines.h:30
@ GENDER_MALE
@ GENDER_FEMALE
@ EMOTE_ONESHOT_WOUND_CRITICAL
@ EMOTE_ONESHOT_ATTACK1H
@ EMOTE_STATE_LOOT
@ EMOTE_STATE_USE_STANDING
@ TEXT_EMOTE_KISS
@ SPELL_EFFECT_SCRIPT_EFFECT
@ ALLIANCE
@ FACTION_FRIENDLY
@ FACTION_MONSTER
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAPPLY
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:2040
EvadeReason
Definition: UnitAICommon.h:30
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ REACT_AGGRESSIVE
Definition: UnitDefines.h:508
@ UNIT_STAND_STATE_DEAD
Definition: UnitDefines.h:49
@ UNIT_STAND_STATE_STAND
Definition: UnitDefines.h:42
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:297
@ UNIT_FLAG3_FAKE_DEAD
Definition: UnitDefines.h:259
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:145
@ ALIVE
Definition: Unit.h:246
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
SpellInfo const * GetSpellInfo() const
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
Unit * GetTarget() const
HookList< EffectApplyHandler > OnEffectRemove
Definition: SpellScript.h:2035
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
uint8 GetStackAmount() const
HookList< EffectApplyHandler > OnEffectApply
Definition: SpellScript.h:2024
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
Definition: CreatureAI.cpp:328
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
CreatureAI * AI() const
Definition: Creature.h:214
void DisappearAndDie()
Definition: Creature.h:83
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void Repeat(Milliseconds time)
Definition: EventMap.cpp:63
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
void MoveFollow(Unit *target, float dist, ChaseAngle angle, Optional< Milliseconds > duration={}, MovementSlot slot=MOTION_SLOT_ACTIVE)
void MoveTargetedHome()
void Clear()
Definition: ObjectGuid.h:286
static Creature * ToCreature(Object *o)
Definition: Object.h:219
static Unit * ToUnit(Object *o)
Definition: Object.h:225
TypeID GetTypeId() const
Definition: Object.h:173
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
void SetEntry(uint32 entry)
Definition: Object.h:162
static Player * ToPlayer(Object *o)
Definition: Object.h:213
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition: Player.cpp:9888
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Definition: Player.cpp:16598
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: Player.cpp:16050
Team GetTeam() const
Definition: Player.h:2235
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
Player * GetHitPlayer() const
Unit * GetCaster() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void KnockbackFrom(Position const &origin, float speedXY, float speedZ, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr)
Definition: Unit.cpp:11860
void SetVisible(bool x)
Definition: Unit.cpp:8351
void CombatStop(bool includingCast=false, bool mutualPvP=true, bool(*unitFilter)(Unit const *otherUnit)=nullptr)
Definition: Unit.cpp:5827
void SetUnitFlag3(UnitFlags3 flags)
Definition: Unit.h:843
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
Definition: Unit.cpp:10100
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
void SetFacingToObject(WorldObject const *object, bool force=true)
Definition: Unit.cpp:12671
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:11618
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:983
bool IsStandState() const
Definition: Unit.cpp:10094
void SetEmoteState(Emote emote)
Definition: Unit.h:852
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:982
bool SetWalk(bool enable)
Definition: Unit.cpp:12707
Unit * GetVictim() const
Definition: Unit.h:715
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
void RemoveAllAuras()
Definition: Unit.cpp:4242
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:833
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true, bool skipSettingDeathState=false)
Definition: Unit.cpp:10591
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:834
virtual void ExitVehicle(Position const *exitPosition=nullptr)
Definition: Unit.cpp:12204
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition: Object.cpp:2170
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition: Object.cpp:3312
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2148
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition: Object.cpp:1147
void HandleAfterEffectApply(AuraEffect const *, AuraEffectHandleModes)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void Register() override
void HandleOnEffectRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectPeriodic(AuraEffect const *)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
void Register() override
void apply(T *val)
Definition: ByteConverter.h:41
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
void Start(bool isActiveAttacker=true, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false)
void LoadPath(uint32 pathId)
Player * GetPlayerForEscort()
constexpr float GetPositionX() const
Definition: Position.h:76
constexpr float GetPositionY() const
Definition: Position.h:77
constexpr void GetPosition(float &x, float &y) const
Definition: Position.h:81
constexpr float GetPositionZ() const
Definition: Position.h:78
void DoPlaySoundToSet(WorldObject *source, uint32 soundId)
void UpdateAI(uint32 diff) override
npc_amberpine_woodsman(Creature *creature)
void WaypointReached(uint32 waypointId, uint32) override
void Reset() override
ObjectGuid _mrfloppyGUID
void OnQuestAccept(Player *player, Quest const *quest) override
ObjectGuid _RavenousworgGUID
npc_emily(Creature *creature)
void JustEngagedWith(Unit *) override
void JustSummoned(Creature *summoned) override
void UpdateAI(uint32 diff) override
void Reset() override
void ReceiveEmote(Player *player, uint32 emote) override
bool OnGossipSelect(Player *player, uint32, uint32) override
npc_lake_frog(Creature *creature)
void Reset() override
void MoveInLineOfSight(Unit *) override
void UpdateAI(uint32) override
void JustEngagedWith(Unit *Who) override
npc_mrfloppy(Creature *creature)
void EnterEvadeMode(EvadeReason) override
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
npc_outhouse_bunny(Creature *creature)
void SetData(uint32 Type, uint32 Data) override
void SpellHit(WorldObject *caster, SpellInfo const *) override
void PassengerBoarded(Unit *who, int8, bool apply) override
== Fields =======================================
void FinishQuest(bool success, uint32 faction)
npc_rocket_propelled_warhead(Creature *creature)
void UpdateAI(uint32) override
npc_tallhorn_stag(Creature *creature)
void JustEngagedWith(Unit *) override
void UpdateAI(uint32 diff) override
npc_venture_co_straggler(Creature *creature)
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
npc_wounded_skirmisher(Creature *creature)
void MovementInform(uint32, uint32 id) override
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
@ SPELL_WARHEAD_SEEKING_LUMBERSHIP
@ SPELL_WARHEAD_Z_CHECK
@ SPELL_WARHEAD_FUSE
AmberpineWoodsman
@ NPC_TALLHORN_STAG
void AddSC_grizzly_hills()
InfectedWorgenBite
@ SPELL_WORGENS_CALL
@ SPELL_INFECTED_WORGEN_BITE
@ SPELL_VENTURE_STRAGGLER_CREDIT
@ SPELL_SMOKE_BOMB
@ SPELL_CHOP
@ QUEST_SMOKE_EM_OUT_H
@ QUEST_SMOKE_EM_OUT_A
@ SPELL_DETONATE
@ SPELL_HORDE_KILL_CREDIT_TORPEDO
@ SPELL_ALLIANCE_KILL_CREDIT_TORPEDO
@ NPC_HORDE_LUMBERBOAT
@ SPELL_VEHICLE_WARHEAD_FUSE
@ NPC_ALLIANCE_LUMBERBOAT
@ NPC_LAKE_FROG
@ SPELL_FROG_KISS
@ ITEM_WARTS_B_GONE_LIP_BALM
@ SAY_MAIDEN_1
@ SPELL_SUMMON_ASHWOOD_BRAND
@ SPELL_WARTSBGONE_LIP_BALM
@ NPC_LAKE_FROG_QUEST
@ SPELL_FROG_LOVE
@ SAY_MAIDEN_0
@ SPELL_WARTS
@ NPC_MAIDEN_OF_ASHWOOD_LAKE
@ SPELL_MAIDEN_OF_ASHWOOD_LAKE_TRANSFORM
@ SPELL_KILL_CREDIT
@ QUEST_OVERWHELMED
@ SPELL_RENEW_SKIRMISHER
@ SAY_RANDOM
@ PATH_ESCORT_EMILY
@ SAY_QUEST_COMPLETE
@ NPC_RAVENOUS_WORG
@ TEXT_EMOTE_AGGRO
@ SAY_VICTORY1
@ SAY_VICTORY3
@ NPC_EMILY
@ SAY_RANDOMAGGRO
@ SAY_VICTORY2
@ SAY_WORGRAGGRO3
@ SAY_WORGRAGGRO4
@ QUEST_PERILOUS_ADVENTURE
@ SAY_QUEST_ACCEPT
@ NPC_MRFLOPPY
@ SAY_WORGHAGGRO1
@ SPELL_MRFLOPPY
@ SAY_WORGHAGGRO2
@ SAY_VICTORY4
@ NPC_HUNGRY_WORG
@ TEXT_EMOTE_WP1
AmberpineWoodsmanEvents
@ EVENT_WOODSMAN_2
@ EVENT_WOODSMAN_1
ShredderDelivery
@ NPC_BROKEN_DOWN_SHREDDER
@ EVENT_STRAGGLER_3
@ EVENT_STRAGGLER_1
@ EVENT_STRAGGLER_2
@ EVENT_STRAGGLER_4
@ EVENT_CHOP
@ EVENT_LAKEFROG_4
@ EVENT_LAKEFROG_3
@ EVENT_LAKEFROG_5
@ EVENT_LAKEFROG_2
@ EVENT_LAKEFROG_1
@ OBJECT_HAUNCH
@ SPELL_DUST_FIELD
@ SOUND_FEMALE
@ SPELL_CAMERA_SHAKE
@ SPELL_OUTHOUSE_GROANS
@ SOUND_MALE
@ SPELL_TORPEDO_EXPLOSION
@ SPELL_PARACHUTE
@ NPC_ALLIANCE_LUMBERBOAT_EXPLOSIONS