TrinityCore
Loading...
Searching...
No Matches
zone_westfall.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 "CombatAI.h"
19#include "Containers.h"
20#include "CreatureAIImpl.h"
21#include "ObjectAccessor.h"
22#include "Player.h"
23#include "ScriptedCreature.h"
24#include "ScriptedGossip.h"
25#include "ScriptMgr.h"
26#include "SpellAuraEffects.h"
27#include "SpellScript.h"
28#include "SharedDefines.h"
29#include "TemporarySummon.h"
30
32{
33namespace Creatures
34{
35 static constexpr uint32 EnergizedHarvestReaper = 42342;
36 static constexpr uint32 OverloadedHarvestGolem = 42601;
37 static constexpr uint32 JangolodeMineGlubtok = 42492;
38 static constexpr uint32 JangolodeMineFigure = 42515;
39 static constexpr uint32 HomelessStormwindCitizen1 = 42386;
40 static constexpr uint32 HomelessStormwindCitizen2 = 42384;
41 static constexpr uint32 WestPlainDrifter = 42391;
42 static constexpr uint32 Transient = 42383;
43 static constexpr uint32 LousPartingThoughtsTrigger = 42562;
44 static constexpr uint32 Thug = 42387;
45 static constexpr uint32 SmallTimeHustler = 42390;
46}
47
48namespace Quests
49{
50 static constexpr uint32 MurderWasTheCaseThatTheyGaveMe = 26209;
51 static constexpr uint32 LousPartingThoughts = 26232;
52}
53
54namespace Spells
55{
56 static constexpr uint32 JangolodeMineSummonFigure = 79265;
57 static constexpr uint32 JangolodeMineSummonGlubtok = 79263;
58 static constexpr uint32 HoboInformation1 = 79181;
59 static constexpr uint32 HoboInformation2 = 79182;
60 static constexpr uint32 HoboInformation3 = 79183;
61 static constexpr uint32 HoboInformation4 = 79184;
62 static constexpr uint32 SummonRagamuffinLooter = 79169;
63 static constexpr uint32 SummonRagamuffinLooter1 = 79170;
64 static constexpr uint32 SummonRagamuffinLooter2 = 79171;
65 static constexpr uint32 SummonRagamuffinLooter3 = 79172;
66 static constexpr uint32 SummonRagamuffinLooter4 = 79173;
67 static constexpr uint32 HoboAggro = 79168;
68 static constexpr uint32 HoboInformation = 79184;
69}
70
71namespace Gossip
72{
73 namespace GossipOption
74 {
75 static constexpr uint32 GossipOption0 = 0;
76 static constexpr uint32 GossipOption1 = 1;
77 }
78}
79
80namespace Events
81{
82 namespace ItsAlive
83 {
84 static constexpr uint32 CheckArea = 1;
85 static constexpr uint32 DespawnHarvester = 2;
86 }
87
88 namespace MurderWasTheCaseThatTheyGaveMe
89 {
90 static constexpr uint32 HoboTalk = 1;
91 static constexpr uint32 JackpotIntro = 2;
92 static constexpr uint32 HoboCry = 3;
93 static constexpr uint32 PropertyRage = 4;
94 static constexpr uint32 JackpotMiddle = 5;
95 static constexpr uint32 JackpotEnd = 6;
96 static constexpr uint32 ResumeMove = 7;
97 static constexpr uint32 GroupOOC = 1;
98 }
99
100 namespace LousPartingThoughts
101 {
102 static constexpr uint32 SummonThugs = 1;
103 static constexpr uint32 ThugSay0 = 2;
104 static constexpr uint32 ThugSay1 = 3;
105 static constexpr uint32 ThugSay2 = 4;
106 static constexpr uint32 ThugSay3 = 5;
107 static constexpr uint32 ThugSay4 = 6;
108 static constexpr uint32 ThugSay5 = 7;
109 static constexpr uint32 ThugSay6 = 8;
110 static constexpr uint32 ThugCredit = 9;
111 static constexpr uint32 ThugShoot1 = 10;
112 static constexpr uint32 ThugShoot2 = 11;
113 static constexpr uint32 ThugScream = 12;
114 static constexpr uint32 ThugWarning = 13;
115 static constexpr uint32 HustlerSay0 = 14;
116 static constexpr uint32 HustlerSay1 = 15;
117 static constexpr uint32 HustlerEventReset = 16;
118 }
119}
120
121namespace Actions
122{
123 namespace MurderWasTheCaseThatTheyGaveMe
124 {
125 static constexpr uint32 HoboAggroAction = 1;
126 static constexpr uint32 HoboAggroActionDone = 2;
127 }
128 namespace LousPartingThoughts
129 {
130 static constexpr uint32 ThugReset = 1;
131 }
132}
133
134namespace Data
135{
136 static constexpr uint32 DataThugDeath = 1;
137}
138
139namespace Text
140{
141 namespace HarvestGolem
142 {
143 static constexpr uint32 AnnounceOutOfArea = 0;
144 }
145 namespace HoboText
146 {
147 static constexpr uint32 HoboSayClue1 = 0;
148 static constexpr uint32 HoboSayClue2 = 1;
149 static constexpr uint32 HoboSayClue3 = 2;
150 static constexpr uint32 HoboSayClue4 = 3;
151 static constexpr uint32 HoboAggroBribe = 4;
152 static constexpr uint32 HoboAggroConvince = 5;
153 static constexpr uint32 HoboEvent = 6;
154 static constexpr uint32 HoboJackpotIntro = 7;
155 static constexpr uint32 HoboJackpotEnd = 8;
156 static constexpr uint32 HoboPropertyRage = 9;
157 static constexpr uint32 HoboFlee = 10;
158 }
159 namespace ThugText
160 {
161 static constexpr uint32 ThugSay0 = 0;
162 static constexpr uint32 ThugSay1 = 1;
163 static constexpr uint32 ThugSay2 = 2;
164 static constexpr uint32 ThugSay3 = 3;
165 static constexpr uint32 ThugSay4 = 4;
166 static constexpr uint32 ThugSay5 = 5;
167 static constexpr uint32 ThugSay6 = 6;
168 static constexpr uint32 SayWarning = 0;
169 }
170 namespace SmallTimeHustlerText
171 {
172 static constexpr uint32 HustlerSay0 = 0;
173 static constexpr uint32 HustlerSay1 = 1;
174 }
175}
176
177namespace Sounds
178{
179 static constexpr uint32 Shooting = 15071;
180 static constexpr uint32 Scream = 17852;
181}
182
183namespace Area
184{
185 static constexpr uint32 TheMoestFarm = 918;
186}
187
188// 79084 - Unbound Energy
190{
191 void FilterTargets(std::list<WorldObject*>& targets)
192 {
193 if (targets.empty())
194 return;
195
196 Unit* caster = GetCaster();
197 targets.remove_if([caster](WorldObject const* target) -> bool
198 {
199 return caster->ToWorldObject() == target;
200 });
201
202 if (targets.size() > 1)
204 }
205
210};
211
212// 42601 - Overloaded Harvest Golem
214{
216
217 void JustAppeared() override
218 {
220 }
221
222 void PassengerBoarded(Unit* /*passenger*/, int8 /*seatId*/, bool apply) override
223 {
224 if (!apply)
226 }
227
228 void UpdateAI(uint32 diff) override
229 {
230 _events.Update(diff);
231 while (uint32 eventId = _events.ExecuteEvent())
232 {
233 switch (eventId)
234 {
237 {
238 if (Unit* owner = me->GetCharmerOrOwner())
241 }
242 else
243 _events.Repeat(1s);
244 break;
248 else
250 break;
251 default:
252 break;
253 }
254 }
255 }
256
257private:
259};
260
261// 79425 - Reaping Blows
263{
264 bool Validate(SpellInfo const* spellInfo) override
265 {
266 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } }) && ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_1).TriggerSpell) });
267 }
268
269 void HandlePeriodic(AuraEffect const* /*aurEff*/)
270 {
271 // HACK
272 // periodic ticks are forcing to cast the spell onto himself instead of target
273 // ref AuraEffect::HandlePeriodicTriggerSpellAuraTick
275 if (Creature* reaper = GetTarget()->FindNearestCreature(Creatures::EnergizedHarvestReaper, 5.f, true))
276 GetTarget()->CastSpell(reaper, GetSpellInfo()->GetEffect(EFFECT_1).TriggerSpell, true);
277 }
278
283};
284
285// 79436 - Wake Harvest Golem
287{
289 {
290 Unit* target = GetExplTargetUnit();
291 if (!target || !target->IsCreature())
293
294 return SPELL_CAST_OK;
295 }
296
298 {
299 Unit* caster = GetCaster();
300 if (!caster || !caster->IsPlayer())
301 return;
302
303 if (Creature* target = GetHitCreature())
304 {
306 target->DespawnOrUnsummon(100ms);
307 }
308 }
309
315};
316
317// 79262 - Summon Lou's House
332
333// 79275 - Quest Credit: Jangolde Event
346
347// 79290 - General Trigger 1: Glubtok
348// 79292 - General Trigger 2: Glubtok
349// 79294 - General Trigger 3: Glubtok
350// 79297 - General Trigger 4: Glubtok
352{
353 void FilterTargets(std::list<WorldObject*>& targets)
354 {
355 Player* player = Object::ToPlayer(GetCaster());
356 if (!player)
357 return;
358
359 targets.clear();
360 if (Creature* creature = player->FindNearestCreatureWithOptions(50.0f, { .CreatureId = Creatures::JangolodeMineGlubtok, .OwnerGuid = player->GetGUID() }))
361 targets.push_back(creature);
362 }
363
368};
369
370// 79279 - General Trigger 1: Figure
371// 79283 - General Trigger 2: Figure
372// 79284 - General Trigger 3: Figure
373// 79287 - General Trigger 4: Figure
375{
376 void FilterTargets(std::list<WorldObject*>& targets)
377 {
378 Player* player = Object::ToPlayer(GetCaster());
379 if (!player)
380 return;
381
382 targets.clear();
383 if (Creature* creature = player->FindNearestCreatureWithOptions(50.0f, { .CreatureId = Creatures::JangolodeMineFigure, .OwnerGuid = player->GetGUID() }))
384 targets.push_back(creature);
385 }
386
391};
392
393// 79273 - Despawn Jangolode Actor
395{
396 void FilterTargets(std::list<WorldObject*>& targets)
397 {
398 Player* player = Object::ToPlayer(GetCaster());
399 if (!player)
400 return;
401
402 targets.clear();
403 if (Creature* creature = player->FindNearestCreatureWithOptions(50.0f, { .CreatureId = Creatures::JangolodeMineGlubtok, .OwnerGuid = player->GetGUID() }))
404 targets.push_back(creature);
405
406 if (Creature* creature = player->FindNearestCreatureWithOptions(50.0f, { .CreatureId = Creatures::JangolodeMineFigure, .OwnerGuid = player->GetGUID() }))
407 targets.push_back(creature);
408 }
409
414};
415
416// 42386 - Homeless Stormwind Citizen
417// 42384 - Homeless Stormwind Citizen
418// 42384 - West Plain Drifter
419// 42383 - Transient
421{
422 npc_westfall_hobo_witness(Creature* creature) : ScriptedAI(creature), _bribeFailed(false), _hoboRage(false), _flee(false) {}
423
429
437
438 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
439 {
440 uint8 clueGainChance = 0;
441 switch (gossipListId)
442 {
444 {
445 clueGainChance = 25;
446 break;
447 }
449 {
450 clueGainChance = 75;
451 _bribeFailed = true;
452 break;
453 }
454 default:
455 return true;
456 }
457
459 CloseGossipMenuFor(player);
460 if (roll_chance(clueGainChance))
461 GiveClue(player);
462 else
463 {
464 me->SetImmuneToPC(false);
465 AttackStart(player);
466 }
467
468 return false;
469 }
470
471 void GiveClue(Player* player)
472 {
474 me->SetFacingToObject(player);
475
477
478 for (uint8 i = 0; i < HoboClues.size(); i++)
479 {
480 if (player->GetQuestSlotCounter(slot, i) == 0)
481 {
482 HoboClueData const& data = HoboClues[i];
483
484 player->CastSpell(player, data.SpellID);
485 Talk(data.TextID, player);
486
487 me->DespawnOrUnsummon(12s);
488 return;
489 }
490 }
491 }
492
503
504 void DamageTaken(Unit* /*killer*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
505 {
506 if (!_flee && me->HealthBelowPctDamaged(20, damage))
507 {
508 _flee = true;
511 }
512 }
513
514 void JustDied(Unit* who) override
515 {
516 if (Creature* creature = who->ToCreature())
519 }
520
532
533 void DoAction(int32 action) override
534 {
535 switch (action)
536 {
539 {
540 _hoboRage = true;
542 me->PauseMovement();
543 me->SetFacingToObject(target);
544 AttackStart(target);
545 }
546 break;
548 _hoboRage = false;
549 break;
550 default:
551 return;
552 }
553 }
554
555 void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
556 {
557 _targetGUID = guid;
558 }
559
560 void UpdateAI(uint32 diff) override
561 {
562 _events.Update(diff);
563 while (uint32 eventId = _events.ExecuteEvent())
564 {
565 switch (eventId)
566 {
568 me->PauseMovement();
571 break;
573 me->PauseMovement();
576 break;
578 me->SetAIAnimKitId(648);
581 break;
583 me->SetAIAnimKitId(0);
585 break;
588 me->PauseMovement();
590 break;
592 {
594 if (Creature* creature = GetClosestCreatureWithEntry(me, creatureId, 25.0f))
595 {
596 if (!creature->IsAlive() || creature->IsInCombat())
597 {
599 return;
600 }
601 _hoboRage = true;
604 me->PauseMovement();
605 me->CastSpell(creature, Spells::HoboAggro, true);
606 me->SetFacingToObject(creature);
607 }
608 else
610 break;
611 }
614 if (roll_chance(50)) // prevent spam
615 {
616 if (roll_chance(70)) // chance to trigger simple talk event
618 else
620 }
621 else
622 _events.Repeat(30s, 80s);
623 break;
624 default:
625 break;
626 }
627 }
628
629 if (!_hoboRage)
630 if (!UpdateVictim())
631 return;
632 }
633
634private:
639 bool _flee;
640};
641
642// 79169 - Summon Ragamuffin Looter
670
671// 79168 - Hobo Aggro
673{
674 void HandleDummy(SpellEffIndex /*effIndex*/)
675 {
676 if (Creature* creature = GetHitCreature())
677 {
678 creature->AI()->SetGUID(GetCaster()->GetGUID(), 0);
680 }
681 }
682
687};
688
689// 5988 - Areatrigger
691{
692public:
693 at_westfall_two_shoed_lou_thugs() : AreaTriggerScript("at_westfall_two_shoed_lou_thugs") {}
694
695 bool OnTrigger(Player* player, AreaTriggerEntry const* /*at*/) override
696 {
697 if (player->IsAlive())
699 if (Creature* lousPartingThoughtsTrigger = player->FindNearestCreature(Creatures::LousPartingThoughtsTrigger, 50.0f, true))
700 lousPartingThoughtsTrigger->AI()->SetGUID(player->GetGUID(), 0);
701
702 return true;
703 }
704};
705
706// 42387 - Westfall Thug
708{
709 npc_westfall_thug(Creature* creature) : ScriptedAI(creature) {}
710
711 void EnterEvadeMode(EvadeReason /*why*/) override
712 {
713 if (TempSummon* summon = me->ToTempSummon())
714 if (Creature* summoner = summon->GetSummonerCreatureBase())
715 summoner->AI()->DoAction(Actions::LousPartingThoughts::ThugReset);
716
718 }
719
720 void JustDied(Unit* /*who*/) override
721 {
722 if (TempSummon* summon = me->ToTempSummon())
723 if (Creature* summoner = summon->GetSummonerCreatureBase())
724 summoner->AI()->SetData(0, Data::DataThugDeath);
725 }
726};
727
728Position constexpr ThugPos[4] =
729{
730 { -9859.36f, 1332.42f, 41.9859f, 2.49582f },
731 { -9862.52f, 1332.08f, 41.9859f, 0.855211f },
732 { -9863.49f, 1335.49f, 41.9859f, 5.63741f },
733 { -9860.43f, 1335.46f, 41.9859f, 4.11898f },
734};
735
736// 42562 - Lous Parting Thoughts Trigger
738{
740
741 void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
742 {
744 return;
745
746 _eventInvokerGUID = guid;
747
749 }
750
751 void SetData(uint32 /*type*/, uint32 data) override
752 {
753 if (data == Data::DataThugDeath)
754 {
756
757 if (_thugDeathCount >= 4)
758 {
761 }
762 }
763 }
764
765 void DoAction(int32 action) override
766 {
767 switch (action)
768 {
771 break;
772 }
773 }
774
779
780 void UpdateAI(uint32 diff) override
781 {
782 _events.Update(diff);
783 while (uint32 eventId = _events.ExecuteEvent())
784 {
786
787 switch (eventId)
788 {
790 for (uint8 i = 0; i < 4; i++)
791 {
793 _summonGUIDs[i] = thug->GetGUID();
794 }
796 _thugDeathCount = 0;
797 break;
799 {
801 if (invoker && thug1)
802 thug1->AI()->Talk(Text::ThugText::ThugSay0, invoker);
804 break;
805 }
807 {
809 if (invoker && thug2)
810 thug2->AI()->Talk(Text::ThugText::ThugSay1, invoker);
812 break;
813 }
815 {
817 if (invoker && thug2)
818 thug2->AI()->Talk(Text::ThugText::ThugSay2, invoker);
820 break;
821 }
823 {
825 if (invoker && thug3)
826 thug3->AI()->Talk(Text::ThugText::ThugSay3, invoker);
828 break;
829 }
831 {
833 if (invoker && thug1)
834 {
835 thug1->AI()->Talk(Text::ThugText::ThugSay4, invoker);
836
837 for (ObjectGuid const& guid : _summonGUIDs)
838 if (Creature* thug = ObjectAccessor::GetCreature(*me, guid))
839 thug->SetFacingToObject(invoker);
840 }
841
843 break;
844 }
846 {
848 if (invoker && thug1)
849 thug1->AI()->Talk(Text::ThugText::ThugSay5, invoker);
850
852 break;
853 }
855 {
857 if (invoker && thug1)
858 {
859 thug1->AI()->Talk(Text::ThugText::ThugSay6, invoker);
860
861 for (ObjectGuid const& guid : _summonGUIDs)
862 if (Creature* thug = ObjectAccessor::GetCreature(*me, guid))
863 {
864 thug->SetImmuneToAll(false);
865 thug->AI()->AttackStart(invoker);
866 }
867 }
868 break;
869 }
871 {
872 if (invoker)
873 {
875 for (ObjectGuid tapperGUID : me->GetTapList())
876 {
877 Player* tapper = ObjectAccessor::GetPlayer(*me, tapperGUID);
878 if (!tapper || tapper->GetQuestStatus(Quests::LousPartingThoughts) != QUEST_STATUS_INCOMPLETE || tapper->GetDistance(me) > 75.f)
879 continue;
880
881 tapper->CastSpell(tapper, Spells::HoboInformation, false);
882 }
883 }
885 break;
886 }
888 {
889 if (invoker)
891
893 break;
894 }
896 {
897 if (invoker)
899
901 break;
902 }
904 {
905 if (invoker)
907
909 break;
910 }
912 {
913 if (invoker)
915 break;
916 }
917 default:
918 break;
919 }
920 }
921 }
922
923private:
926 std::array<ObjectGuid, 4> _summonGUIDs;
928};
929
930// 42390 - Areatrigger
932{
933public:
934 at_westfall_small_time_hustler() : AreaTriggerScript("at_westfall_small_time_hustler") {}
935
936 bool OnTrigger(Player* player, AreaTriggerEntry const* /*at*/) override
937 {
938 if (player->IsAlive())
939 if (Creature* lousPartingThoughtsTrigger = player->FindNearestCreature(Creatures::SmallTimeHustler, 10.0f, true))
940 lousPartingThoughtsTrigger->AI()->SetGUID(player->GetGUID(), 0);
941
942 return true;
943 }
944};
945
946// 42390 - Small Time Hustler
948{
950
951 void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
952 {
954 return;
955
956 _eventInvokerGUID = guid;
957
959 }
960
961 void UpdateAI(uint32 diff) override
962 {
963 _events.Update(diff);
964 while (uint32 eventId = _events.ExecuteEvent())
965 {
966 switch (eventId)
967 {
969 {
971 if (invoker)
972 {
973 me->SetFacingToObject(invoker);
976 }
977 break;
978 }
980 {
982 if (invoker)
983 {
986 }
987 break;
988 }
990 {
992 break;
993 }
994 default:
995 break;
996 }
997 }
998 }
999
1000private:
1003};
1004}
1005
First const & RAND(First const &first, Second const &second, Rest const &... rest)
uint8_t uint8
Definition Define.h:156
int8_t int8
Definition Define.h:152
int32_t int32
Definition Define.h:150
uint16_t uint16
Definition Define.h:155
uint32_t uint32
Definition Define.h:154
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Spells
Definition PlayerAI.cpp:32
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:146
bool roll_chance(float chance, PseudoRandomDistributionState &state)
Definition Random.cpp:131
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:43
#define RegisterCreatureAI(ai_name)
Definition ScriptMgr.h:1392
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive=true)
void CloseGossipMenuFor(Player *player)
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ TARGET_UNIT_SRC_AREA_ENTRY
@ EMOTE_ONESHOT_CRY
SpellCastResult
@ SPELL_FAILED_BAD_TARGETS
@ SPELL_CAST_OK
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
TriggerCastFlags
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define SpellCheckCastFn(F)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
EvadeReason
@ UNIT_NPC_FLAG_GOSSIP
DamageEffectType
Creatures
Sounds
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
AuraEffect * GetEffect(uint8 effIndex) const
Unit * GetTarget() const
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
bool IsCreature() const
Definition BaseEntity.h:172
bool IsPlayer() const
Definition BaseEntity.h:173
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void SetImmuneToPC(bool apply) override
Definition Creature.h:190
GuidUnorderedSet const & GetTapList() const
Definition Creature.h:312
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void DoFleeToGetAssistance()
CreatureAI * AI() const
Definition Creature.h:235
void Update(uint32 time)
Definition EventMap.h:77
void Repeat(Milliseconds time)
Definition EventMap.cpp:67
EventId ExecuteEvent()
Definition EventMap.cpp:77
void CancelEventGroup(GroupIndex group)
Definition EventMap.cpp:178
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:40
void Reset()
Definition EventMap.cpp:25
static ObjectGuid const Empty
Definition ObjectGuid.h:314
bool IsEmpty() const
Definition ObjectGuid.h:362
Player * ToPlayer()
Definition Object.h:126
WorldObject * ToWorldObject()
Definition Object.h:106
Creature * ToCreature()
Definition Object.h:121
void KilledMonsterCredit(uint32 entry, ObjectGuid guid=ObjectGuid::Empty)
Definition Player.cpp:16646
uint16 GetQuestSlotCounter(uint16 slot, uint8 counter) const
Definition Player.cpp:16366
uint16 FindQuestSlot(uint32 quest_id) const
Definition Player.cpp:16350
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15929
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
uint32 TriggerSpell
Definition SpellInfo.h:234
uint32 const Id
Definition SpellInfo.h:328
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:590
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
HookList< CheckCastHandler > OnCheckCast
Creature * GetHitCreature() const
Unit * GetCaster() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
HookList< EffectHandler > OnEffectLaunch
Unit * GetExplTargetUnit() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
virtual void Reset()
Definition UnitAI.h:64
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
Definition Unit.h:647
void ResumeMovement(uint32 timer=0, uint8 slot=0)
Definition Unit.cpp:10780
void PauseMovement(uint32 timer=0, uint8 slot=0, bool forced=true)
Definition Unit.cpp:10768
bool IsAlive() const
Definition Unit.h:1205
void RemoveNpcFlag(NPCFlags flags)
Definition Unit.h:1013
TempSummon * ToTempSummon()
Definition Unit.h:1844
Unit * GetCharmerOrOwner() const
Definition Unit.h:1241
void SetFacingToObject(WorldObject const *object, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13394
void SetNpcFlag(NPCFlags flags)
Definition Unit.h:1012
bool HealthBelowPctDamaged(float pct, uint32 damage) const
Definition Unit.h:805
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition Unit.cpp:1662
void SetAIAnimKitId(uint16 animKitId)
Definition Unit.cpp:11260
virtual void ExitVehicle(Position const *exitPosition=nullptr)
Definition Unit.cpp:12931
Creature * FindNearestCreatureWithOptions(float range, FindCreatureOptions const &options) const
Definition Object.cpp:1531
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2222
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:1403
void PlayDistanceSound(uint32 soundId, Player const *target=nullptr) const
Definition Object.cpp:2925
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:1522
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:430
uint32 GetAreaId() const
Definition Object.h:333
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
static constexpr uint32 MurderWasTheCaseThatTheyGaveMe
static constexpr uint32 SummonRagamuffinLooter4
static constexpr uint32 SummonRagamuffinLooter3
static constexpr uint32 SummonRagamuffinLooter1
static constexpr uint32 JangolodeMineSummonGlubtok
static constexpr uint32 JangolodeMineSummonFigure
static constexpr uint32 SummonRagamuffinLooter2
void RandomResize(C &container, std::size_t requestedSize)
Definition Containers.h:67
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
void SetGUID(ObjectGuid const &guid, int32) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
static constexpr std::array< HoboClueData, 4 > HoboClues
bool OnGossipSelect(Player *player, uint32, uint32 gossipListId) override
void PassengerBoarded(Unit *, int8, bool apply) override
== Fields =======================================
void AddSC_westfall()