TrinityCore
Loading...
Searching...
No Matches
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 "CreatureTextMgr.h"
21#include "MotionMaster.h"
22#include "ObjectAccessor.h"
23#include "Player.h"
24#include "ScriptedEscortAI.h"
25#include "SpellInfo.h"
26#include "SpellScript.h"
27#include "TemporarySummon.h"
28
29/*######
30## Quest 12027: Mr. Floppy's Perilous Adventure
31######*/
32
34{
35 // Creature
36 NPC_MRFLOPPY = 26589,
38 NPC_RAVENOUS_WORG = 26590, // RWORG
39 NPC_EMILY = 26588,
40 // Quest
42 // Spell
43 SPELL_MRFLOPPY = 47184, // vehicle aura
44 // Text
45 SAY_WORGHAGGRO1 = 0, // Um... I think one of those wolves is back...
46 SAY_WORGHAGGRO2 = 1, // He's going for Mr. Floppy!
47 SAY_WORGRAGGRO3 = 2, // Oh, no! Look, it's another wolf, and it's a biiiiiig one!
48 SAY_WORGRAGGRO4 = 3, // He's gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!
49 SAY_RANDOMAGGRO = 4, // There's a big meanie attacking Mr. Floppy! Help!
50 SAY_VICTORY1 = 5, // Let's get out of here before more wolves find us!
51 SAY_VICTORY2 = 6, // Don't go toward the light, Mr. Floppy!
52 SAY_VICTORY3 = 7, // Mr. Floppy, you're ok! Thank you so much for saving Mr. Floppy!
53 SAY_VICTORY4 = 8, // I think I see the camp! We're almost home, Mr. Floppy! Let's go!
54 TEXT_EMOTE_WP1 = 9, // Mr. Floppy revives
55 TEXT_EMOTE_AGGRO = 10, // The Ravenous Worg chomps down on Mr. Floppy
56 SAY_QUEST_ACCEPT = 11, // Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!
57 SAY_QUEST_COMPLETE = 12, // Thank you for helping me get back to the camp. Go tell Walter that I'm safe now!
58 PATH_ESCORT_EMILY = 212706
59};
60
61// emily
62struct npc_emily : public EscortAI
63{
64 npc_emily(Creature* creature) : EscortAI(creature) { }
65
66 void JustSummoned(Creature* summoned) override
67 {
68 if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 50.0f))
69 summoned->AI()->AttackStart(Mrfloppy);
70 else
71 summoned->AI()->AttackStart(me->GetVictim());
72 }
73
74 void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
75 {
76 Player* player = GetPlayerForEscort();
77 if (!player)
78 return;
79
80 switch (waypointId)
81 {
82 case 9:
83 if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 100.0f))
84 _mrfloppyGUID = Mrfloppy->GetGUID();
85 break;
86 case 10:
88 {
91 }
92 break;
93 case 11:
96 break;
97 case 17:
99 Mrfloppy->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
102 {
103 RWORG->SetFaction(FACTION_FRIENDLY);
104 _RavenousworgGUID = RWORG->GetGUID();
105 }
106 break;
107 case 18:
109 {
111 RWORG->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
112 DoCast(Mrfloppy, SPELL_MRFLOPPY);
113 }
114 break;
115 case 19:
117 {
118 if (Mrfloppy->HasAura(SPELL_MRFLOPPY))
119 {
121 Mrfloppy->EnterVehicle(RWORG);
122 }
123 }
124 break;
125 case 20:
127 RWORG->HandleEmoteCommand(EMOTE_ONESHOT_WOUND_CRITICAL);
128 break;
129 case 21:
131 {
133 {
134 Unit::Kill(RWORG, Mrfloppy);
135 Mrfloppy->ExitVehicle();
136 RWORG->SetFaction(FACTION_MONSTER);
137 RWORG->GetMotionMaster()->MovePoint(0, RWORG->GetPositionX()+10, RWORG->GetPositionY()+80, RWORG->GetPositionZ());
139 }
140 }
141 break;
142 case 22:
144 {
145 if (Mrfloppy->isDead())
146 {
148 RWORG->DisappearAndDie();
149 me->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
150 Mrfloppy->setDeathState(ALIVE);
151 Mrfloppy->GetMotionMaster()->MoveFollow(me, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
153 }
154 }
155 break;
156 case 24:
158 Talk(SAY_QUEST_COMPLETE, player);
159 me->SetWalk(false);
160 break;
161 case 25:
163 break;
164 case 27:
167 Mrfloppy->DisappearAndDie();
168 break;
169 }
170 }
171
172 void JustEngagedWith(Unit* /*Who*/) override
173 {
175 }
176
177 void Reset() override
178 {
181 }
182
183 void OnQuestAccept(Player* player, Quest const* quest) override
184 {
185 if (quest->GetQuestId() == QUEST_PERILOUS_ADVENTURE)
186 {
188 if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 180.0f))
189 Mrfloppy->GetMotionMaster()->MoveFollow(me, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
190
192 Start(true, player->GetGUID());
193 }
194 }
195
196 private:
199};
200
201// mrfloppy
203{
204 npc_mrfloppy(Creature* creature) : ScriptedAI(creature) { }
205
206 void Reset() override { }
207
208 void JustEngagedWith(Unit* Who) override
209 {
210 if (Creature* Emily = GetClosestCreatureWithEntry(me, NPC_EMILY, 50.0f))
211 {
212 switch (Who->GetEntry())
213 {
214 case NPC_HUNGRY_WORG:
215 Emily->AI()->Talk(SAY_WORGHAGGRO2);
216 break;
218 Emily->AI()->Talk(SAY_WORGRAGGRO4);
219 break;
220 default:
221 Emily->AI()->Talk(SAY_RANDOMAGGRO);
222 }
223 }
224 }
225
226 void EnterEvadeMode(EvadeReason /*why*/) override { }
227
228 void MoveInLineOfSight(Unit* /*who*/) override { }
229
230 void UpdateAI(uint32 /*diff*/) override
231 {
232 if (!UpdateVictim())
233 return;
234 }
235};
236
237/*######
238## Quest 12227: Doing Your Duty
239######*/
240
242{
243 // Sound
245 SOUND_MALE = 12670,
246 // Spell
249 SPELL_DUST_FIELD = 48329
251
253{
255 {
256 Initialize();
257 }
258
260 {
261 _counter = 0;
262 _gender = 0;
263 }
264
265 void Reset() override
266 {
267 Initialize();
268 }
269
270 void SetData(uint32 Type, uint32 Data) override
271 {
272 if (Type == 1)
273 _gender = Data;
274 }
275
276 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
277 {
278 Unit* unitCaster = caster->ToUnit();
279 if (!unitCaster)
280 return;
281
282 if (spellInfo->Id == SPELL_OUTHOUSE_GROANS)
283 {
284 ++_counter;
285 if (_counter < 5)
286 DoCast(unitCaster, SPELL_CAMERA_SHAKE, true);
287 else
288 _counter = 0;
289 DoCast(me, SPELL_DUST_FIELD, true);
290 switch (_gender)
291 {
292 case GENDER_FEMALE:
294 break;
295
296 case GENDER_MALE:
298 break;
299 }
300 }
301 }
302 private:
305};
306
307// Tallhorn Stage
308
310{
311 //Gameobject
312 OBJECT_HAUNCH = 188665
314
316{
317 npc_tallhorn_stag(Creature* creature) : ScriptedAI(creature)
318 {
319 Initialize();
320 }
321
323 {
324 _phase = 1;
325 }
326
327 void Reset() override
328 {
329 Initialize();
330 }
331
332 void UpdateAI(uint32 /*diff*/) override
333 {
334 if (_phase == 1)
335 {
337 {
339 me->SetImmuneToPC(true);
341 }
342 _phase = 0;
343 }
344 if (!UpdateVictim())
345 return;
347 }
348 private:
350};
351
352// Amberpine Woodsman
353
355{
356 // Creature
357 NPC_TALLHORN_STAG = 26363
359
365
367{
368 npc_amberpine_woodsman(Creature* creature) : ScriptedAI(creature) { }
369
370 void Reset() override
371 {
373 {
375 }
376 else
378 }
379
380 void UpdateAI(uint32 diff) override
381 {
382 _events.Update(diff);
383
384 while (uint32 eventId = _events.ExecuteEvent())
385 {
386 switch (eventId)
387 {
388 case EVENT_WOODSMAN_1:
391 break;
392 case EVENT_WOODSMAN_2:
395 break;
396 default:
397 break;
398 }
399 }
400 UpdateVictim();
401 }
402 private:
404};
405
406/*######
407## Quest 12288: Overwhelmed!
408######*/
409
411{
412 // Quest
414 // Spell
417 // Text
418 SAY_RANDOM = 0
420
422{
424 {
425 Initialize();
426 }
427
429 {
430 _despawnTimer = 5s;
431 }
432
433 void Reset() override
434 {
435 Initialize();
436 }
437
438 void MovementInform(uint32, uint32 id) override
439 {
440 if (id == 1)
442 }
443
444 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
445 {
446 Player* playerCaster = caster->ToPlayer();
447 if (!playerCaster)
448 return;
449
451 {
452 DoCast(playerCaster, SPELL_KILL_CREDIT);
453 Talk(SAY_RANDOM, playerCaster);
454 if (me->IsStandState())
456 else
457 {
460 }
461 }
462 }
463
464 void UpdateAI(uint32 /*diff*/) override
465 {
466 if (!UpdateVictim())
467 return;
468
470 }
471 private:
473};
474
475/*Venture co. Straggler - when you cast Smoke Bomb, he will yell and run away*/
477{
478 // Quest
481 // Spell
483 SPELL_CHOP = 43410,
485 // Text
486 SAY_SEO = 0
488
497
499{
501
502 void JustEngagedWith(Unit* /*who*/) override
503 {
505 }
506
507 void Reset() override
508 {
510
512 me->SetImmuneToPC(false);
514 }
515
516 void UpdateAI(uint32 diff) override
517 {
518 _events.Update(diff);
519
520 while (uint32 eventId = _events.ExecuteEvent())
521 {
522 switch (eventId)
523 {
529 break;
531 Talk(SAY_SEO);
534 break;
538 break;
541 break;
542 case EVENT_CHOP:
543 if (UpdateVictim())
545 _events.Repeat(Seconds(10), Seconds(12));
546 break;
547 default:
548 break;
549 }
550 }
551
552 if (!UpdateVictim())
553 return;
555 }
556
557 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
558 {
559 if (spellInfo->Id == SPELL_SMOKE_BOMB && caster->GetTypeId() == TYPEID_PLAYER)
560 {
562 me->SetImmuneToPC(true);
564 me->CombatStop(false);
565 _playerGUID = caster->GetGUID();
567 }
568 }
569
570private:
573};
574
575/*######
576## Quest: A Blade Fit For A Champion
577######*/
578
580{
581 // Creature
585 // Items
587 // Spells
589 SPELL_FROG_LOVE = 62537, // for 1 minute !
590 SPELL_WARTS = 62581,
594 // Text
596 SAY_MAIDEN_1 = 1
598
607
609{
610 npc_lake_frog(Creature* creature) : ScriptedAI(creature)
611 {
612 Initialize();
613 }
614
616 {
617 _following = false;
618 _runningScript = false;
619 }
620
621 void Reset() override
622 {
623 Initialize();
626 }
627
628 void UpdateAI(uint32 diff) override
629 {
630 if (_following)
633
634 _events.Update(diff);
635
636 while (uint32 eventId = _events.ExecuteEvent())
637 {
638 switch (eventId)
639 {
640 case EVENT_LAKEFROG_1:
644 break;
645 case EVENT_LAKEFROG_2:
648 break;
649 case EVENT_LAKEFROG_3:
652 break;
653 case EVENT_LAKEFROG_4:
656 break;
657 case EVENT_LAKEFROG_5:
660 break;
661 default:
662 break;
663 }
664 }
665 }
666
667 void ReceiveEmote(Player* player, uint32 emote) override
668 {
670 return;
671
672 if (emote == TEXT_EMOTE_KISS && me->IsWithinDistInMap(player, 30.0f) && player->HasItemCount(ITEM_WARTS_B_GONE_LIP_BALM, 1, false))
673 {
675 player->AddAura(SPELL_WARTS, player);
676 else
677 {
678 DoCast(player, SPELL_FROG_KISS); // Removes SPELL_WARTSBGONE_LIP_BALM
679
680 if (me->GetEntry() == NPC_LAKE_FROG)
681 {
683 me->GetMotionMaster()->MoveFollow(player, 0.3f, frand(float(M_PI) / 2, float(M_PI) + (float(M_PI) / 2)));
684 _following = true;
685 }
686 else if (me->GetEntry() == NPC_LAKE_FROG_QUEST)
687 {
689 me->SetFacingToObject(player);
690 _runningScript = true;
692 }
693 }
694 }
695 }
696
697 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
698 {
700 return false;
701 }
702
703private:
707};
708
713
715{
717
718 bool Load() override
719 {
720 return GetCaster()->GetTypeId() == TYPEID_UNIT;
721 }
722
723 void HandleScript(SpellEffIndex /*effIndex*/)
724 {
725 if (GetCaster()->ToCreature()->GetEntry() == NPC_BROKEN_DOWN_SHREDDER)
727 }
728
733};
734
740
741// 53094 - Infected Worgen Bite
762
763/*######
764## Quest: Riding the Red Rocket
765######*/
766
776
778{
780 {
781 _finished = false;
783 }
784
785 void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override
786 {
787 if (apply && who->ToPlayer())
788 {
790 _faction = who->ToPlayer()->GetTeam();
791 }
792 }
793
794 void JustReachedHome() override
795 {
796 _finished = false;
797 me->SetVisible(true);
799 }
800
801 void DoAction(int32 /*action*/) override
802 {
803 FinishQuest(false, _faction);
804 }
805
806 void SpellHit(WorldObject* caster, SpellInfo const* /*spellInfo*/) override
807 {
808 if (caster->GetEntry() == NPC_HORDE_LUMBERBOAT || caster->GetEntry() == NPC_ALLIANCE_LUMBERBOAT)
809 FinishQuest(true, _faction);
810 }
811
812 void FinishQuest(bool success, uint32 faction)
813 {
814 if (_finished)
815 return;
816
817 _finished = true;
818
819 if (success)
821
824 me->SetVisible(false);
826 }
827
828private:
831};
832
839// 49107 - Vehicle: Warhead Fuse
841{
843
844 bool Validate(SpellInfo const* /*spellInfo*/) override
845 {
847 }
848
849 void HandleDummy(SpellEffIndex /*effIndex*/)
850 {
851 Unit* caster = GetCaster();
852
853 caster->CastSpell(caster, SPELL_WARHEAD_Z_CHECK, true);
854 caster->CastSpell(caster, SPELL_WARHEAD_SEEKING_LUMBERSHIP, true);
855 caster->CastSpell(caster, SPELL_WARHEAD_FUSE, true);
856 }
857
862};
863
870// 49250 - Detonate
872{
874
875 bool Validate(SpellInfo const* /*spellInfo*/) override
876 {
878 }
879
880 void HandleDummy(SpellEffIndex /*effIndex*/)
881 {
882 Unit* caster = GetCaster();
883 Player* player = GetHitPlayer();
884 if (!player)
885 return;
886
887 player->ExitVehicle();
888 float horizontalSpeed = 3.0f;
889 float verticalSpeed = 40.0f;
890 player->KnockbackFrom(caster->GetPositionX(), caster->GetPositionY(), horizontalSpeed, verticalSpeed);
891 caster->CastSpell(player, SPELL_PARACHUTE, true);
892
893 std::list<Creature*> explosionBunnys;
895 for (std::list<Creature*>::const_iterator itr = explosionBunnys.begin(); itr != explosionBunnys.end(); ++itr)
896 (*itr)->CastSpell((*itr), SPELL_TORPEDO_EXPLOSION, true);
897 }
898
903};
904
905// 61678 - Z Check
907{
909
910public:
912 {
913 _posZ = 0.0f;
914 }
915
916 void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
917 {
919 }
920
921 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
922 {
924
925 if (_posZ != GetTarget()->GetPositionZ())
926 if (Creature* target = GetTarget()->ToCreature())
927 target->AI()->DoAction(0);
928 }
929
930private:
931 float _posZ;
932
938};
939
940// 49181 - Warhead Fuse
942{
944
945 void HandleOnEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
946 {
947 if (Unit* rocketUnit = GetTarget()->GetVehicleBase())
948 if (Creature* rocketCrea = rocketUnit->ToCreature())
949 rocketCrea->AI()->DoAction(0);
950 }
951
956};
957
958enum
959{
966
967// 47117 - Script Cast Summon Image of Drakuru
968// 47149 - Script Cast Summon Image of Drakuru 02
969// 47316 - Script Cast Summon Image of Drakuru 03
970// 47405 - Script Cast Summon Image of Drakuru 04
971// 50439 - Script Cast Summon Image of Drakuru 05
996
997/*######
998## Quest 12308: Escape from Silverbrook
999######*/
1000
1005
1006// 48682 - Escape from Silverbrook - Periodic Dummy
1026
1027// 48681 - Summon Silverbrook Worgen
1046
1047/*######
1048## Quest 12414: Mounting Up
1049######*/
1050
1051// 49285 - Hand Over Reins
1070
1071/*######
1072## Quest 12121: See You on the Other Side
1073######*/
1074
1080
1081// 47744 - Rage of Jin'arrak
1103
1104// 61613 - Gan'jo Ressurection
1124
1125/*######
1126## Creature 26853 (Makki Wintergale) (if quest 'Shifting Priorities' (12763) is completed)
1127######*/
1128
1133
1134// 53288 - Flight - Onequah to Light's Breach
1154
1155/*######
1156## Creature 26876 (Samuel Clearbook) (if quest 'Reallocating Resources' (12770) is completed)
1157######*/
1158
1163
1164// 53311 - Flight - Westfall to Light's Breach
1184
1186{
1202 RegisterSpellScriptWithArgs(spell_grizzly_hills_script_cast_summon_image_of_drakuru, "spell_grizzly_hills_script_cast_summon_image_of_drakuru_01", SPELL_ENVISION_DRAKURU_01);
1203 RegisterSpellScriptWithArgs(spell_grizzly_hills_script_cast_summon_image_of_drakuru, "spell_grizzly_hills_script_cast_summon_image_of_drakuru_02", SPELL_ENVISION_DRAKURU_02);
1204 RegisterSpellScriptWithArgs(spell_grizzly_hills_script_cast_summon_image_of_drakuru, "spell_grizzly_hills_script_cast_summon_image_of_drakuru_03", SPELL_ENVISION_DRAKURU_03);
1205 RegisterSpellScriptWithArgs(spell_grizzly_hills_script_cast_summon_image_of_drakuru, "spell_grizzly_hills_script_cast_summon_image_of_drakuru_04", SPELL_ENVISION_DRAKURU_04);
1206 RegisterSpellScriptWithArgs(spell_grizzly_hills_script_cast_summon_image_of_drakuru, "spell_grizzly_hills_script_cast_summon_image_of_drakuru_05", SPELL_ENVISION_DRAKURU_05);
1214}
#define M_PI
Definition Common.h:72
uint8_t uint8
Definition Define.h:135
int8_t int8
Definition Define.h:131
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition Duration.h:27
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:24
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
@ TYPEID_UNIT
Definition ObjectGuid.h:38
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
#define PET_FOLLOW_ANGLE
Definition PetDefines.h:86
#define PET_FOLLOW_DIST
Definition PetDefines.h:85
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:107
float frand(float min, float max)
Definition Random.cpp:55
#define RegisterCreatureAI(ai_name)
Definition ScriptMgr.h:1139
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
Definition ScriptMgr.h:1127
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive=true)
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_APPLY_AURA
@ GENDER_MALE
@ GENDER_FEMALE
@ TARGET_DEST_CASTER_SUMMON
@ EMOTE_ONESHOT_WOUND_CRITICAL
@ EMOTE_ONESHOT_ATTACK1H
@ EMOTE_STATE_LOOT
@ EMOTE_STATE_USE_STANDING
@ UNIT_DYNFLAG_DEAD
@ TEXT_EMOTE_KISS
@ 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)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellDestinationTargetSelectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_STAND_STATE_DEAD
Definition UnitDefines.h:41
@ UNIT_STAND_STATE_STAND
Definition UnitDefines.h:34
@ UNIT_NPC_FLAG_GOSSIP
@ UNIT_FLAG_NON_ATTACKABLE
@ ALIVE
Definition Unit.h:211
Data
void PreventDefaultAction()
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
HookList< EffectApplyHandler > AfterEffectApply
Unit * GetTarget() const
HookList< EffectApplyHandler > OnEffectRemove
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
uint8 GetStackAmount() const
HookList< EffectApplyHandler > OnEffectApply
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
void SetImmuneToPC(bool apply) override
Definition Creature.h:129
void SetReactState(ReactStates st)
Definition Creature.h:119
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
CreatureAI * AI() const
Definition Creature.h:154
void DisappearAndDie()
Definition Creature.h:73
void Update(uint32 time)
Definition EventMap.h:67
void Repeat(Milliseconds time)
Definition EventMap.cpp:63
EventId ExecuteEvent()
Definition EventMap.cpp:73
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MoveFollow(Unit *target, float dist, ChaseAngle angle, MovementSlot slot=MOTION_SLOT_ACTIVE)
void MoveTargetedHome()
void Clear()
Definition ObjectGuid.h:150
static Creature * ToCreature(Object *o)
Definition Object.h:186
static Unit * ToUnit(Object *o)
Definition Object.h:192
TypeID GetTypeId() const
Definition Object.h:93
virtual void SetDynamicFlag(uint32 flag)
Definition Object.h:89
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
void SetEntry(uint32 entry)
Definition Object.h:82
static Player * ToPlayer(Object *o)
Definition Object.h:180
uint32 GetTeam() const
Definition Player.h:1832
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition Player.cpp:9763
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Definition Player.cpp:16032
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15642
uint32 GetQuestId() const
Definition QuestDef.h:229
float CalcRadius(WorldObject *caster=nullptr, Spell *=nullptr) const
uint32 Id
Definition SpellInfo.h:289
Player * GetHitPlayer() const
Unit * GetCaster() const
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:166
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:30
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
void SetVisible(bool x)
Definition Unit.cpp:8513
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
Aura * AddAura(uint32 spellId, Unit *target)
Definition Unit.cpp:11964
void RemoveNpcFlag(NPCFlags flags)
Definition Unit.h:1098
bool IsStandState() const
Definition Unit.cpp:10357
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
void SetFacingToObject(WorldObject const *object, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13259
void SetEmoteState(Emote emote)
Definition Unit.h:967
void SetNpcFlag(NPCFlags flags)
Definition Unit.h:1097
bool SetWalk(bool enable)
Definition Unit.cpp:13268
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
Unit * GetVictim() const
Definition Unit.h:859
void SetStandState(UnitStandStateType state)
Definition Unit.cpp:10363
void RemoveAllAuras()
Definition Unit.cpp:4157
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true)
Definition Unit.cpp:10930
void CombatStop(bool includingCast=false, bool mutualPvP=true)
Definition Unit.cpp:5691
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:954
void KnockbackFrom(float x, float y, float speedXY, float speedZ)
Definition Unit.cpp:12204
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:955
virtual void ExitVehicle(Position const *exitPosition=nullptr)
Definition Unit.cpp:12661
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition Object.cpp:2121
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition Object.cpp:3153
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
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:1992
Position GetNearPosition(float dist, float angle)
Definition Object.cpp:3250
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2099
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition Object.cpp:1192
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
PrepareSpellScript(spell_grizzly_hills_escape_from_silverbrook_summon_worgen)
PrepareSpellScript(spell_grizzly_hills_escape_from_silverbrook)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_grizzly_hills_flight_onequah_to_lights_breach)
PrepareAuraScript(spell_grizzly_hills_flight_westfall_to_lights_breach)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_grizzly_hills_ganjo_ressurection)
PrepareSpellScript(spell_grizzly_hills_hand_over_reins)
PrepareAuraScript(spell_grizzly_hills_rage_of_jinarrak)
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareSpellScript(spell_grizzly_hills_script_cast_summon_image_of_drakuru)
void HandleAfterEffectApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_infected_worgen_bite)
PrepareSpellScript(spell_shredder_delivery)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_vehicle_warhead_fuse)
PrepareSpellScript(spell_warhead_detonate)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleOnEffectRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_warhead_fuse)
void HandleEffectPeriodic(AuraEffect const *)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_z_check)
void Register() override
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()
float GetPositionZ() const
Definition Position.h:81
float GetPositionX() const
Definition Position.h:79
float GetPositionY() const
Definition Position.h:80
void DoPlaySoundToSet(WorldObject *source, uint32 soundId)
void Relocate(Position const &pos)
Definition Spell.cpp:99
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 UpdateAI(uint32) override
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
@ SPELL_FLIGHT_WESTFALL_TO_LIGHTS_BREACH
@ SPELL_WARHEAD_SEEKING_LUMBERSHIP
@ SPELL_WARHEAD_Z_CHECK
@ SPELL_WARHEAD_FUSE
@ NPC_TALLHORN_STAG
void AddSC_grizzly_hills()
@ SPELL_WORGENS_CALL
@ SPELL_INFECTED_WORGEN_BITE
@ SPELL_SUMMON_YOUR_CORPSE
@ SPELL_ON_THE_OTHER_SIDE
@ SPELL_VENTURE_STRAGGLER_CREDIT
@ SPELL_SMOKE_BOMB
@ 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
@ SPELL_SUMMON_ASHWOOD_BRAND
@ SPELL_WARTSBGONE_LIP_BALM
@ NPC_LAKE_FROG_QUEST
@ SPELL_FROG_LOVE
@ NPC_MAIDEN_OF_ASHWOOD_LAKE
@ SPELL_MAIDEN_OF_ASHWOOD_LAKE_TRANSFORM
@ SPELL_FLIGHT_ONEQUAH_TO_LIGHTS_BREACH
@ SPELL_KILL_CREDIT
@ QUEST_OVERWHELMED
@ SPELL_RENEW_SKIRMISHER
@ PATH_ESCORT_EMILY
@ SAY_QUEST_COMPLETE
@ NPC_RAVENOUS_WORG
@ TEXT_EMOTE_AGGRO
@ SAY_VICTORY1
@ SAY_VICTORY3
@ 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
@ NPC_BROKEN_DOWN_SHREDDER
@ EVENT_STRAGGLER_3
@ EVENT_STRAGGLER_1
@ EVENT_STRAGGLER_2
@ EVENT_STRAGGLER_4
EscapeFromSilverbrook
@ SPELL_SUMMON_WORGEN
@ EVENT_LAKEFROG_4
@ EVENT_LAKEFROG_3
@ EVENT_LAKEFROG_5
@ EVENT_LAKEFROG_2
@ EVENT_LAKEFROG_1
@ SPELL_ENVISION_DRAKURU_05
@ SPELL_ENVISION_DRAKURU_03
@ SPELL_ENVISION_DRAKURU_02
@ SPELL_ENVISION_DRAKURU_04
@ SPELL_ENVISION_DRAKURU_01
@ OBJECT_HAUNCH
@ SPELL_DUST_FIELD
@ SPELL_CAMERA_SHAKE
@ SPELL_OUTHOUSE_GROANS
@ SPELL_TORPEDO_EXPLOSION
@ SPELL_PARACHUTE
@ NPC_ALLIANCE_LUMBERBOAT_EXPLOSIONS