TrinityCore
Loading...
Searching...
No Matches
chapter1.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 "CreatureAIImpl.h"
19#include "ScriptMgr.h"
20#include "CharmInfo.h"
21#include "CombatAI.h"
22#include "CreatureTextMgr.h"
23#include "G3DPosition.hpp"
24#include "GameObject.h"
25#include "GameObjectAI.h"
26#include "Log.h"
27#include "Map.h"
28#include "MotionMaster.h"
29#include "MoveSplineInit.h"
30#include "ObjectAccessor.h"
31#include "ObjectMgr.h"
32#include "PassiveAI.h"
33#include "Player.h"
34#include "ScriptedCreature.h"
35#include "ScriptedGossip.h"
36#include "SpellAuraEffects.h"
37#include "SpellMgr.h"
38#include "SpellScript.h"
39#include "SpellInfo.h"
40#include "TemporarySummon.h"
41#include "Vehicle.h"
42
43/*######
44##Quest 12848
45######*/
46
47#define GCD_CAST 1
48
67
76
81
83{
84 191577,
85 191580,
86 191581,
87 191582,
88 191583,
89 191584,
90 191585,
91 191586,
92 191587,
93 191588,
94 191589,
95 191590
96};
97
99{
100 29519,
101 29520,
102 29565,
103 29566,
104 29567
105};
106
108{
109public:
110 npc_unworthy_initiate() : CreatureScript("npc_unworthy_initiate") { }
111
113 {
115 {
116 Initialize();
120
121 wait_timer = 0;
122 anchorX = 0.f;
123 anchorY = 0.f;
124 }
125
127 {
130 }
131
137
139
140 void Reset() override
141 {
142 Initialize();
143 events.Reset();
145 me->SetImmuneToPC(true);
147 me->LoadEquipment(0, true);
148 }
149
157
158 void MovementInform(uint32 type, uint32 id) override
159 {
160 if (type != POINT_MOTION_TYPE)
161 return;
162
163 if (id == 1)
164 {
165 wait_timer = 5000;
166 me->LoadEquipment(1);
168
170 Talk(SAY_EVENT_ATTACK, starter);
171
173 }
174 }
175
176 void EventStart(Creature* anchor, Player* target)
177 {
178 wait_timer = 5000;
180
183
184 float z;
185 anchor->GetContactPoint(me, anchorX, anchorY, z, 1.0f);
186
187 playerGUID = target->GetGUID();
188 Talk(SAY_EVENT_START, target);
189 }
190
191 void UpdateAI(uint32 diff) override
192 {
193 switch (phase)
194 {
195 case PHASE_CHAINED:
196 if (!anchorGUID)
197 {
198 if (Creature* anchor = me->FindNearestCreature(29521, 30))
199 {
200 anchor->AI()->SetGUID(me->GetGUID(), DATA_PRISONER_GUID);
201 anchor->CastSpell(me, SPELL_SOUL_PRISON_CHAIN, true);
202 anchorGUID = anchor->GetGUID();
203 }
204 else
205 TC_LOG_ERROR("scripts", "npc_unworthy_initiateAI: unable to find anchor!");
206
207 float dist = 99.0f;
208 GameObject* prison = nullptr;
209
210 for (uint8 i = 0; i < 12; ++i)
211 {
212 if (GameObject* temp_prison = me->FindNearestGameObject(acherus_soul_prison[i], 30))
213 {
214 if (me->IsWithinDist(temp_prison, dist, false))
215 {
216 dist = me->GetDistance2d(temp_prison);
217 prison = temp_prison;
218 }
219 }
220 }
221
222 if (prison)
223 prison->ResetDoorOrButton();
224 else
225 TC_LOG_ERROR("scripts", "npc_unworthy_initiateAI: unable to find prison!");
226 }
227 break;
228 case PHASE_TO_EQUIP:
229 if (wait_timer)
230 {
231 if (wait_timer > diff)
232 wait_timer -= diff;
233 else
234 {
236 //TC_LOG_DEBUG("scripts", "npc_unworthy_initiateAI: move to {} {} {}", anchorX, anchorY, me->GetPositionZ());
238 wait_timer = 0;
239 }
240 }
241 break;
242 case PHASE_TO_ATTACK:
243 if (wait_timer)
244 {
245 if (wait_timer > diff)
246 wait_timer -= diff;
247 else
248 {
250 me->SetImmuneToPC(false);
253
255 AttackStart(target);
256 wait_timer = 0;
257 }
258 }
259 break;
260 case PHASE_ATTACKING:
261 if (!UpdateVictim())
262 return;
263
264 events.Update(diff);
265
266 while (uint32 eventId = events.ExecuteEvent())
267 {
268 switch (eventId)
269 {
270 case EVENT_ICY_TOUCH:
274 break;
279 break;
284 break;
285 case EVENT_DEATH_COIL:
289 break;
290 }
291 }
292 break;
293 default:
294 break;
295 }
296 }
297 };
298
299 CreatureAI* GetAI(Creature* creature) const override
300 {
301 return new npc_unworthy_initiateAI(creature);
302 }
303};
304
306{
307public:
308 npc_unworthy_initiate_anchor() : CreatureScript("npc_unworthy_initiate_anchor") { }
309
310 CreatureAI* GetAI(Creature* creature) const override
311 {
312 return new npc_unworthy_initiate_anchorAI(creature);
313 }
314
316 {
318
320
321 void SetGUID(ObjectGuid const& guid, int32 id) override
322 {
323 if (id != DATA_PRISONER_GUID)
324 return;
325
326 prisonerGUID = guid;
327 }
328
329 ObjectGuid GetGUID(int32 /*id*/) const override
330 {
331 return prisonerGUID;
332 }
333 };
334};
335
337{
338 public:
339 go_acherus_soul_prison() : GameObjectScript("go_acherus_soul_prison") { }
340
342 {
344
345 bool OnGossipHello(Player* player) override
346 {
347 if (Creature* anchor = me->FindNearestCreature(29521, 15))
348 {
349 ObjectGuid prisonerGUID = anchor->AI()->GetGUID(DATA_PRISONER_GUID);
350 if (!prisonerGUID.IsEmpty())
351 if (Creature* prisoner = ObjectAccessor::GetCreature(*player, prisonerGUID))
352 ENSURE_AI(npc_unworthy_initiate::npc_unworthy_initiateAI, prisoner->AI())->EventStart(anchor, player);
353 }
354
355 return false;
356 }
357 };
358
359 GameObjectAI* GetAI(GameObject* go) const override
360 {
361 return new go_acherus_soul_prisonAI(go);
362 }
363};
364
365// 51519 - Death Knight Initiate Visual
367{
369 {
370 Creature* target = GetHitCreature();
371 if (!target)
372 return;
373
374 uint32 spellId;
375 switch (target->GetDisplayId())
376 {
377 case 25369: spellId = 51552; break; // bloodelf female
378 case 25373: spellId = 51551; break; // bloodelf male
379 case 25363: spellId = 51542; break; // draenei female
380 case 25357: spellId = 51541; break; // draenei male
381 case 25361: spellId = 51537; break; // dwarf female
382 case 25356: spellId = 51538; break; // dwarf male
383 case 25372: spellId = 51550; break; // forsaken female
384 case 25367: spellId = 51549; break; // forsaken male
385 case 25362: spellId = 51540; break; // gnome female
386 case 25359: spellId = 51539; break; // gnome male
387 case 25355: spellId = 51534; break; // human female
388 case 25354: spellId = 51520; break; // human male
389 case 25360: spellId = 51536; break; // nightelf female
390 case 25358: spellId = 51535; break; // nightelf male
391 case 25368: spellId = 51544; break; // orc female
392 case 25364: spellId = 51543; break; // orc male
393 case 25371: spellId = 51548; break; // tauren female
394 case 25366: spellId = 51547; break; // tauren male
395 case 25370: spellId = 51545; break; // troll female
396 case 25365: spellId = 51546; break; // troll male
397 default: return;
398 }
399
400 target->CastSpell(target, spellId, GetSpell());
401 target->LoadEquipment();
402 }
403
408};
409
410/*######
411## npc_eye_of_acherus
412######*/
413
432
433G3D::Vector3 const EyeOfAcherusPath[] =
434{
435 { 2361.21f, -5660.45f, 496.744f },
436 { 2341.571f, -5672.797f, 538.3942f },
437 { 1957.4f, -5844.1f, 273.867f },
438 { 1758.01f, -5876.79f, 166.867f }
439};
440
442{
444 {
445 creature->SetDisplayFromModel(0);
446 creature->SetReactState(REACT_PASSIVE);
447 if (creature->GetCharmInfo())
449 }
450
457
466
467 void UpdateAI(uint32 diff) override
468 {
469 _events.Update(diff);
470
471 while (uint32 eventId = _events.ExecuteEvent())
472 {
473 switch (eventId)
474 {
476 if (Unit* owner = me->GetCharmerOrOwner())
479 break;
480 case EVENT_UNROOT:
484 break;
486 {
487 std::function<void(Movement::MoveSplineInit&)> initializer = [=, me = me](Movement::MoveSplineInit& init)
488 {
489 init.MovebyPath(EyeOfAcherusPath);
490 init.SetFly();
491 if (Unit* owner = me->GetCharmerOrOwner())
492 init.SetVelocity(owner->GetSpeed(MOVE_RUN));
493 };
494
496 break;
497 }
502 if (Unit* owner = me->GetCharmerOrOwner())
504 break;
505 default:
506 break;
507 }
508 }
509 }
510
511 void MovementInform(uint32 movementType, uint32 pointId) override
512 {
513 if (movementType != POINT_MOTION_TYPE)
514 return;
515
516 switch (pointId)
517 {
518 case POINT_NEW_AVALON:
521 break;
522 default:
523 break;
524 }
525 }
526
527private:
529};
530
543
544// 51858 - Siphon of Acherus
546{
547 bool Validate(SpellInfo const* /*spellInfo*/) override
548 {
549 return ValidateSpellInfo(
550 {
555 });
556 }
557
558 void HandleDummy(SpellEffIndex /*effIndex*/)
559 {
560 uint32 spellId = 0;
561
562 switch (GetHitCreature()->GetEntry())
563 {
565 spellId = SPELL_FORGE_CREDIT;
566 break;
568 spellId = SPELL_TOWN_HALL_CREDIT;
569 break;
570 case NPC_SCARLET_HOLD:
572 break;
574 spellId = SPELL_CHAPEL_CREDIT;
575 break;
576 default:
577 return;
578 }
579
580 GetCaster()->CastSpell(nullptr, spellId, true);
581 }
582
587};
588
589// 52694 - Recall Eye of Acherus
591{
592 bool Validate(SpellInfo const* /*spell*/) override
593 {
595 }
596
597 void HandleDummy(SpellEffIndex /*effIndex*/)
598 {
599 if (Player* player = Object::ToPlayer(GetCaster()->GetCharmerOrOwner()))
600 {
601 player->StopCastingCharm();
602 player->StopCastingBindSight();
603 player->RemoveAura(SPELL_THE_EYE_OF_ACHERUS);
604 }
605 }
606
611};
612
613/*######
614## npc_death_knight_initiate
615######*/
616
618{
619 SPELL_DUEL = 52996,
620 //SPELL_DUEL_TRIGGERED = 52990,
624};
625
627{
629};
630
632{
635
647
649{
650public:
651 npc_death_knight_initiate() : CreatureScript("npc_death_knight_initiate") { }
652
654 {
656 {
657 Initialize();
658 }
659
661 {
663 m_uiDuelTimer = 5000;
664 m_bIsDuelInProgress = false;
665 lose = false;
666 }
667
668 bool lose;
672
673 void Reset() override
674 {
675 Initialize();
676
680 }
681
682 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
683 {
684 if (!m_bIsDuelInProgress && spellInfo->Id == SPELL_DUEL)
685 {
686 m_uiDuelerGUID = caster->GetGUID();
687 Talk(SAY_DUEL, caster);
688 m_bIsDuelInProgress = true;
689 }
690 }
691
692 void DamageTaken(Unit* pDoneBy, uint32 &uiDamage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
693 {
694 if (m_bIsDuelInProgress && pDoneBy && pDoneBy->IsControlledByPlayer())
695 {
696 if (pDoneBy->GetGUID() != m_uiDuelerGUID && pDoneBy->GetOwnerGUID() != m_uiDuelerGUID) // other players cannot help
697 uiDamage = 0;
698 else if (uiDamage >= me->GetHealth())
699 {
700 uiDamage = 0;
701
702 if (!lose)
703 {
704 pDoneBy->RemoveGameObject(SPELL_DUEL_FLAG, true);
705 pDoneBy->AttackStop();
706 me->CastSpell(pDoneBy, SPELL_DUEL_VICTORY, true);
707 lose = true;
708 me->CastSpell(me, SPELL_GROVEL, true);
710 }
711 }
712 }
713 }
714
715 void UpdateAI(uint32 uiDiff) override
716 {
717 if (!UpdateVictim())
718 {
720 {
721 if (m_uiDuelTimer <= uiDiff)
722 {
724
726 AttackStart(unit);
727 }
728 else
729 m_uiDuelTimer -= uiDiff;
730 }
731 return;
732 }
733
735 {
736 if (lose)
737 {
738 if (!me->HasAura(SPELL_GROVEL))
740 return;
741 }
743 {
744 me->EnsureVictim()->CastSpell(me->GetVictim(), SPELL_GROVEL, true); // beg
747 return;
748 }
749 }
750
752
753 CombatAI::UpdateAI(uiDiff);
754 }
755
756 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
757 {
758 uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
759 ClearGossipMenuFor(player);
760 if (action == GOSSIP_ACTION_INFO_DEF)
761 {
762 CloseGossipMenuFor(player);
763
764 if (player->IsInCombat() || me->IsInCombat())
765 return true;
766
768 return true;
769
770 me->SetImmuneToPC(false);
772
773 player->CastSpell(me, SPELL_DUEL, false);
774 player->CastSpell(player, SPELL_DUEL_FLAG, true);
775 }
776 return true;
777 }
778
779 bool OnGossipHello(Player* player) override
780 {
781 uint32 gossipMenuId = player->GetGossipMenuForSource(me);
782 InitGossipMenuFor(player, gossipMenuId);
784 {
785 if (player->HealthBelowPct(10))
786 return true;
787
788 if (player->IsInCombat() || me->IsInCombat())
789 return true;
790
792 SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
793 }
794 return true;
795 }
796
797 void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override
798 {
799 switch (pathId)
800 {
810 break;
811 default:
812 break;
813 }
814 }
815 };
816
817 CreatureAI* GetAI(Creature* creature) const override
818 {
819 return new npc_death_knight_initiateAI(creature);
820 }
821};
822
823/*######
824## npc_dark_rider_of_acherus
825######*/
826
837
839{
841
842 void JustAppeared() override
843 {
844 if (TempSummon* summon = me->ToTempSummon())
845 _horseGUID = summon->GetSummonerGUID();
846
848 }
849
850 void Reset() override
851 {
852 _events.Reset();
853 }
854
855 void UpdateAI(uint32 diff) override
856 {
857 _events.Update(diff);
858
859 while (uint32 eventId = _events.ExecuteEvent())
860 {
861 switch (eventId)
862 {
866 me->GetMotionMaster()->MoveChase(horse);
868 break;
872 DoCast(horse, SPELL_DESPAWN_HORSE, true);
874 break;
875 case EVENT_END_SCRIPT:
877 break;
878 default:
879 break;
880 }
881 }
882 }
883
884 void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
885 {
886 if (spellInfo->Id == SPELL_DESPAWN_HORSE && target->GetGUID() == _horseGUID)
887 if (Creature* creature = target->ToCreature())
888 creature->DespawnOrUnsummon(2s);
889 }
890
891private:
894};
895
896/*######
897## npc_salanar_the_horseman
898######*/
899
910
912{
913public:
914 npc_salanar_the_horseman() : CreatureScript("npc_salanar_the_horseman") { }
915
917 {
919
920 void MoveInLineOfSight(Unit* who) override
921 {
923
924 if (who->GetTypeId() == TYPEID_UNIT && who->IsVehicle() && me->IsWithinDistInMap(who, 5.0f))
925 {
926 if (Unit* charmer = who->GetCharmer())
927 {
928 if (Player* player = charmer->ToPlayer())
929 {
930 if (player->GetQuestStatus(QUEST_INTO_REALM_OF_SHADOWS) == QUEST_STATUS_INCOMPLETE)
931 {
932 player->GroupEventHappens(QUEST_INTO_REALM_OF_SHADOWS, me);
934 charmer->RemoveAurasDueToSpell(SPELL_EFFECT_OVERTAKE);
935 if (Creature* creature = who->ToCreature())
936 {
937 creature->DespawnOrUnsummon();
938 //creature->Respawn(true);
939 }
940 }
941
942 player->RemoveAurasDueToSpell(SPELL_REALM_OF_SHADOWS);
943 }
944 }
945 }
946 }
947 };
948
949 CreatureAI* GetAI(Creature* creature) const override
950 {
951 return new npc_salanar_the_horsemanAI(creature);
952 }
953};
954
956{
957 SEAT_ID_0 = 0
959
960// 52265 - Repo
962{
963 void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
964 {
965 Creature* creature = GetTarget()->ToCreature();
966 if (!creature)
967 return;
968
969 if (Vehicle* vehicleKit = creature->GetVehicleKit())
970 if (Unit* passenger = vehicleKit->GetPassenger(SEAT_ID_0))
971 GetCaster()->EngageWithTarget(passenger);
972
973 creature->DespawnOrUnsummon(1s);
974 }
975
980};
981
982// 52264 - Deliver Stolen Horse
1008
1009/*######
1010## npc_ros_dark_rider
1011######*/
1012
1014{
1015public:
1016 npc_ros_dark_rider() : CreatureScript("npc_ros_dark_rider") { }
1017
1018 CreatureAI* GetAI(Creature* creature) const override
1019 {
1020 return new npc_ros_dark_riderAI(creature);
1021 }
1022
1024 {
1025 npc_ros_dark_riderAI(Creature* creature) : ScriptedAI(creature) { }
1026
1027 void JustEngagedWith(Unit* /*who*/) override
1028 {
1029 me->ExitVehicle();
1030 }
1031
1032 void Reset() override
1033 {
1034 Creature* deathcharger = me->FindNearestCreature(28782, 30);
1035 if (!deathcharger)
1036 return;
1037
1038 deathcharger->RestoreFaction();
1040 deathcharger->SetUninteractible(true);
1041 if (!me->GetVehicle() && deathcharger->IsVehicle() && deathcharger->GetVehicleKit()->HasEmptySeat(0))
1042 me->EnterVehicle(deathcharger);
1043 }
1044
1045 void JustDied(Unit* killer) override
1046 {
1047 Creature* deathcharger = me->FindNearestCreature(28782, 30);
1048 if (!deathcharger || !killer)
1049 return;
1050
1051 if (killer->GetTypeId() == TYPEID_PLAYER && deathcharger->GetTypeId() == TYPEID_UNIT && deathcharger->IsVehicle())
1052 {
1053 deathcharger->SetNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
1054 deathcharger->SetUninteractible(false);
1056 }
1057 }
1058 };
1059
1060};
1061
1062// correct way: 52312 52314 52555 ...
1064{
1066
1067 NPC_GHOULS = 28845,
1068 NPC_GHOSTS = 28846,
1069};
1070
1072{
1073public:
1074 npc_dkc1_gothik() : CreatureScript("npc_dkc1_gothik") { }
1075
1076 CreatureAI* GetAI(Creature* creature) const override
1077 {
1078 return new npc_dkc1_gothikAI(creature);
1079 }
1080
1082 {
1083 npc_dkc1_gothikAI(Creature* creature) : ScriptedAI(creature) { }
1084
1085 void MoveInLineOfSight(Unit* who) override
1086
1087 {
1089
1090 if (who->GetEntry() == NPC_GHOULS && me->IsWithinDistInMap(who, 10.0f))
1091 {
1092 if (Unit* owner = who->GetOwner())
1093 {
1094 if (Player* player = owner->ToPlayer())
1095 {
1096 Creature* creature = who->ToCreature();
1097 if (player->GetQuestStatus(12698) == QUEST_STATUS_INCOMPLETE)
1098 creature->CastSpell(owner, 52517, true);
1099
1101 // stand next to Gothik and be commanded into the pit
1102 // and dig into the ground.
1103 creature->DespawnOrUnsummon();
1104
1105 if (player->GetQuestStatus(12698) == QUEST_STATUS_COMPLETE)
1106 owner->RemoveAllMinionsByEntry(NPC_GHOSTS);
1107 }
1108 }
1109 }
1110 }
1111 };
1112
1113};
1114
1116{
1118 {
1120 }
1121
1122 void JustAppeared() override
1123 {
1125
1126 if (urand(0, 1))
1127 if (Unit* owner = me->GetOwner())
1128 Talk(SAY_LINE_0, owner);
1129 }
1130
1131 void FindMinions(Unit* owner)
1132 {
1133 std::list<TempSummon*> MinionList;
1134 owner->GetAllMinionsByEntry(MinionList, NPC_GHOULS);
1135
1136 for (TempSummon* summon : MinionList)
1137 if (summon->GetOwnerGUID() == me->GetOwnerGUID())
1138 if (summon->IsInCombat() && summon->getAttackerForHelper())
1139 AttackStart(summon->getAttackerForHelper());
1140 }
1141
1142 void UpdateAI(uint32 /*diff*/) override
1143 {
1144 if (!me->IsInCombat())
1145 {
1146 if (Unit* owner = me->GetOwner())
1147 {
1148 Player* plrOwner = owner->ToPlayer();
1149 if (plrOwner && plrOwner->IsInCombat())
1150 {
1151 Unit* newTarget = plrOwner->getAttackerForHelper();
1152 if (newTarget && newTarget->GetEntry() == NPC_GHOSTS)
1153 AttackStart(newTarget);
1154 else
1155 FindMinions(owner);
1156 }
1157 }
1158 }
1159
1160 if (!UpdateVictim())
1161 return;
1162 }
1163
1164 bool CanAIAttack(Unit const* target) const override
1165 {
1166 return target->GetEntry() == NPC_GHOSTS;
1167 }
1168};
1169
1175
1176// 52479 - Gift of the Harvester
1178{
1179 bool Validate(SpellInfo const* /*spell*/) override
1180 {
1181 return ValidateSpellInfo(
1182 {
1185 });
1186 }
1187
1189 {
1190 Unit* originalCaster = GetOriginalCaster();
1191 Unit* target = GetHitUnit();
1192
1193 if (originalCaster && target)
1194 originalCaster->CastSpell(target, RAND(SPELL_GHOUL_TRANFORM, SPELL_GHOST_TRANSFORM), true);
1195 }
1196
1201};
1202
1203/*######
1204## Quest 12842: Runeforging: Preparation For Battle
1205######*/
1206
1212
1213/* 53343 - Rune of Razorice
1214 53344 - Rune of the Fallen Crusader
1215 62158 - Rune of the Stoneskin Gargoyle
1216 326805 - Rune of Sanguination
1217 326855 - Rune of Spellwarding
1218 326911 - Rune of Hysteria
1219 326977 - Rune of Unending Thirst
1220 327082 - Rune of the Apocalypse */
1222{
1223 bool Validate(SpellInfo const* /*spellInfo*/) override
1224 {
1226 sObjectMgr->GetQuestTemplate(QUEST_RUNEFORGING);
1227 }
1228
1229 void HandleDummy(SpellEffIndex /*effIndex*/)
1230 {
1231 if (Player* caster = GetCaster()->ToPlayer())
1232 if (caster->GetQuestStatus(QUEST_RUNEFORGING) == QUEST_STATUS_INCOMPLETE)
1233 caster->CastSpell(caster, SPELL_RUNEFORGING_CREDIT);
1234 }
1235
1240};
1241
1246
1247// 52124 - Sky Darkener Assault
1265
1266/*######
1267## Quest 12619: The Emblazoned Runeblade
1268######*/
1269
1270// 51769 - Emblazon Runeblade
1272{
1274 {
1276 if (Unit* caster = GetCaster())
1277 caster->CastSpell(caster, aurEff->GetSpellEffectInfo().TriggerSpell, aurEff);
1278 }
1279
1284};
1285
1286// 51770 - Emblazon Runeblade
1288{
1289 bool Validate(SpellInfo const* spellInfo) override
1290 {
1291 return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValueAsInt()) });
1292 }
1293
1294 void HandleScript(SpellEffIndex /*effIndex*/)
1295 {
1297 }
1298
1303};
1304
1306{
1348};
1349
1350// 29102 - Hearthglen Crusader
1351// 29103 - Tirisfal Crusader
1353{
1355 {
1356 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(creature->m_spells[0], creature->GetMap()->GetDifficultyID());
1357 if (!spellInfo)
1358 return;
1359
1360 auto [minRange, maxRange] = spellInfo->GetMinMaxRange(false);
1361 _minimumRange = minRange;
1362
1363 if (!_minimumRange)
1365 creature->m_CombatDistance = maxRange;
1366 creature->m_SightDistance = creature->m_CombatDistance;
1367 }
1368
1369 void AttackStart(Unit* who) override
1370 {
1371 if (!who)
1372 return;
1373
1375 {
1376 if (me->Attack(who, true) && !who->IsFlying())
1377 me->GetMotionMaster()->MoveChase(who);
1378 }
1379 else
1380 {
1381 if (me->Attack(who, false) && !who->IsFlying())
1383 }
1384
1385 if (who->IsFlying())
1387 }
1388
1389 void UpdateAI(uint32 /*diff*/) override
1390 {
1391 if (!UpdateVictim())
1392 return;
1393
1396 }
1397
1398 void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override
1399 {
1400 switch (pathId)
1401 {
1443 me->DespawnOrUnsummon(1s);
1444 break;
1445 default:
1446 break;
1447 }
1448 }
1449
1450private:
1452};
1453
First const & RAND(First const &first, Second const &second, Rest const &... rest)
T GetEntry(std::unordered_map< uint32, T > const &map, CriteriaTreeEntry const *tree)
uint8_t uint8
Definition Define.h:156
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
#define TC_LOG_ERROR(filterType__, message__,...)
Definition Log.h:182
@ MOTION_PRIORITY_NORMAL
@ POINT_MOTION_TYPE
#define MELEE_RANGE
@ TYPEID_UNIT
Definition ObjectGuid.h:43
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
#define sObjectMgr
Definition ObjectMgr.h:1873
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:146
@ QUEST_STATUS_COMPLETE
Definition QuestDef.h:144
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
void AddGossipItemFor(Player *player, GossipOptionNpc optionNpc, std::string text, uint32 sender, uint32 action)
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const &guid)
void ClearGossipMenuFor(Player *player)
void InitGossipMenuFor(Player *player, uint32 menuId)
void CloseGossipMenuFor(Player *player)
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_KILL_CREDIT2
@ FACTION_SCARLET_CRUSADE_2
@ FACTION_UNDEAD_SCOURGE_2
@ FACTION_FRIENDLY
@ FACTION_MONSTER
@ FACTION_CREATURE
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
#define sSpellMgr
Definition SpellMgr.h:812
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define ENSURE_AI(a, b)
Definition UnitAI.h:30
@ MOVE_RUN
@ REACT_DEFENSIVE
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_STAND_STATE_KNEEL
Definition UnitDefines.h:50
@ UNIT_STAND_STATE_STAND
Definition UnitDefines.h:42
@ UNIT_NPC_FLAG_SPELLCLICK
DamageEffectType
@ UNIT_FLAG_CAN_SWIM
G3D::Vector3 const EyeOfAcherusPath[]
Definition chapter1.cpp:433
Says_VBM
Definition chapter1.cpp:627
@ SAY_DUEL
Definition chapter1.cpp:628
GiftOfTheHarvester
@ SPELL_GHOUL_TRANFORM
@ SPELL_GHOST_TRANSFORM
HorseSeats
Definition chapter1.cpp:956
@ SEAT_ID_0
Definition chapter1.cpp:957
#define GCD_CAST
Definition chapter1.cpp:47
void AddSC_the_scarlet_enclave_c1()
SkyDarkenerAssault
@ SPELL_SKY_DARKENER_ASSAULT
Paths_VBN
Definition chapter1.cpp:637
@ PATH_DEATH_KNIGHT_INITIATE3
Definition chapter1.cpp:640
@ PATH_DEATH_KNIGHT_INITIATE8
Definition chapter1.cpp:645
@ PATH_DEATH_KNIGHT_INITIATE4
Definition chapter1.cpp:641
@ PATH_DEATH_KNIGHT_INITIATE7
Definition chapter1.cpp:644
@ PATH_DEATH_KNIGHT_INITIATE5
Definition chapter1.cpp:642
@ PATH_DEATH_KNIGHT_INITIATE6
Definition chapter1.cpp:643
@ PATH_DEATH_KNIGHT_INITIATE2
Definition chapter1.cpp:639
@ PATH_DEATH_KNIGHT_INITIATE
Definition chapter1.cpp:638
Misc_VBN
Definition chapter1.cpp:632
@ QUEST_DEATH_CHALLENGE
Definition chapter1.cpp:633
DeathComesFromOnHigh
Definition chapter1.cpp:532
@ NPC_NEW_AVALON_TOWN_HALL
Definition chapter1.cpp:539
@ NPC_NEW_AVALON_FORGE
Definition chapter1.cpp:538
@ SPELL_TOWN_HALL_CREDIT
Definition chapter1.cpp:534
@ NPC_CHAPEL_OF_THE_CRIMSON_FLAME
Definition chapter1.cpp:541
@ NPC_SCARLET_HOLD
Definition chapter1.cpp:540
@ SPELL_SCARLET_HOLD_CREDIT
Definition chapter1.cpp:535
@ SPELL_CHAPEL_CREDIT
Definition chapter1.cpp:536
@ SPELL_FORGE_CREDIT
Definition chapter1.cpp:533
Spells_DKI
Definition chapter1.cpp:618
@ SPELL_DUEL_FLAG
Definition chapter1.cpp:622
@ SPELL_GROVEL
Definition chapter1.cpp:623
@ SPELL_DUEL
Definition chapter1.cpp:619
@ SPELL_DUEL_VICTORY
Definition chapter1.cpp:621
Runeforging
@ QUEST_RUNEFORGING
@ SPELL_RUNEFORGING_CREDIT
SalanarTheHorseman
Definition chapter1.cpp:901
@ SALANAR_SAY
Definition chapter1.cpp:902
@ SPELL_EFFECT_STOLEN_HORSE
Definition chapter1.cpp:904
@ QUEST_INTO_REALM_OF_SHADOWS
Definition chapter1.cpp:903
@ SPELL_REALM_OF_SHADOWS
Definition chapter1.cpp:908
@ SPELL_DELIVER_STOLEN_HORSE
Definition chapter1.cpp:905
@ SPELL_CALL_DARK_RIDER
Definition chapter1.cpp:906
@ SPELL_EFFECT_OVERTAKE
Definition chapter1.cpp:907
UnworthyInitiatePhase
Definition chapter1.cpp:69
@ PHASE_TO_ATTACK
Definition chapter1.cpp:73
@ PHASE_EQUIPING
Definition chapter1.cpp:72
@ PHASE_TO_EQUIP
Definition chapter1.cpp:71
@ PHASE_CHAINED
Definition chapter1.cpp:70
@ PHASE_ATTACKING
Definition chapter1.cpp:74
TheGiftThatKeepsOnGiving
@ SAY_LINE_0
@ NPC_GHOSTS
@ NPC_GHOULS
EyeOfAcherusMisc
Definition chapter1.cpp:415
@ SPELL_EYE_OF_ACHERUS_VISUAL
Definition chapter1.cpp:417
@ SAY_LAUNCH_TOWARDS_DESTINATION
Definition chapter1.cpp:427
@ EVENT_GRANT_CONTROL
Definition chapter1.cpp:425
@ SPELL_THE_EYE_OF_ACHERUS
Definition chapter1.cpp:416
@ EVENT_LAUNCH_TOWARDS_DESTINATION
Definition chapter1.cpp:424
@ SPELL_ROOT_SELF
Definition chapter1.cpp:420
@ EVENT_ANNOUNCE_LAUNCH_TO_DESTINATION
Definition chapter1.cpp:422
@ SAY_EYE_UNDER_CONTROL
Definition chapter1.cpp:428
@ SPELL_EYE_OF_ACHERUS_FLIGHT_BOOST
Definition chapter1.cpp:418
@ SPELL_EYE_OF_ACHERUS_FLIGHT
Definition chapter1.cpp:419
@ POINT_NEW_AVALON
Definition chapter1.cpp:430
@ EVENT_UNROOT
Definition chapter1.cpp:423
uint32 acherus_soul_prison[12]
Definition chapter1.cpp:82
uint32 acherus_unworthy_initiate[5]
Definition chapter1.cpp:98
DarkRiderOfAcherus
Definition chapter1.cpp:828
@ SAY_DARK_RIDER
Definition chapter1.cpp:829
@ SPELL_DESPAWN_HORSE
Definition chapter1.cpp:835
@ EVENT_DESPAWN_HORSE
Definition chapter1.cpp:832
@ EVENT_START_MOVING
Definition chapter1.cpp:831
@ EVENT_END_SCRIPT
Definition chapter1.cpp:833
UnworthyInitiateData
Definition chapter1.cpp:78
@ DATA_PRISONER_GUID
Definition chapter1.cpp:79
HearthglenCrusaderPaths
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN12
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN3
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN16
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN26
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN15
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN28
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN29
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN17
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN24
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN6
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN8
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN34
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN22
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN30
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN7
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN31
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN25
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN5
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN11
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN10
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN41
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN14
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN33
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN20
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN19
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN4
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN18
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN37
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN21
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN9
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN39
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN36
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN27
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN40
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN32
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN13
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN38
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN2
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN23
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN35
UnworthyInitiate
Definition chapter1.cpp:50
@ SPELL_DEATH_COIL
Definition chapter1.cpp:57
@ SPELL_PLAGUE_STRIKE
Definition chapter1.cpp:55
@ EVENT_PLAGUE_STRIKE
Definition chapter1.cpp:63
@ SPELL_BLOOD_STRIKE
Definition chapter1.cpp:56
@ SAY_EVENT_START
Definition chapter1.cpp:59
@ SAY_EVENT_ATTACK
Definition chapter1.cpp:60
@ SPELL_DK_INITIATE_VISUAL
Definition chapter1.cpp:52
@ EVENT_ICY_TOUCH
Definition chapter1.cpp:62
@ EVENT_BLOOD_STRIKE
Definition chapter1.cpp:64
@ SPELL_ICY_TOUCH
Definition chapter1.cpp:54
@ SPELL_SOUL_PRISON_CHAIN
Definition chapter1.cpp:51
@ EVENT_DEATH_COIL
Definition chapter1.cpp:65
SpellEffectInfo const & GetSpellEffectInfo() const
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
Unit * GetCaster() const
Unit * GetTarget() const
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
TypeID GetTypeId() const
Definition BaseEntity.h:166
void Reset() override
Definition CombatAI.cpp:62
void UpdateAI(uint32 diff) override
Definition CombatAI.cpp:92
virtual void MoveInLineOfSight(Unit *)
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
virtual void JustAppeared()
bool UpdateVictim()
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
Creature *const me
Definition CreatureAI.h:63
int8 GetOriginalEquipmentId() const
Definition Creature.h:262
void SetImmuneToPC(bool apply) override
Definition Creature.h:190
uint32 m_spells[MAX_CREATURE_SPELLS]
Definition Creature.h:332
void LoadEquipment(int8 id=1, bool force=false)
void SetDisplayFromModel(uint32 modelIdx)
void SetReactState(ReactStates st)
Definition Creature.h:180
float m_SightDistance
Definition Creature.h:435
void SetCurrentEquipmentId(uint8 id)
Definition Creature.h:264
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
float m_CombatDistance
Definition Creature.h:435
void SetTarget(ObjectGuid const &guid) override
void ExitVehicle(Position const *exitPosition=nullptr) override
uint8 GetCurrentEquipmentId() const
Definition Creature.h:263
void Update(uint32 time)
Definition EventMap.h:77
void DelayEvents(Milliseconds delay)
Definition EventMap.cpp:100
EventId ExecuteEvent()
Definition EventMap.cpp:77
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:40
void Reset()
Definition EventMap.cpp:25
GameObject *const me
void ResetDoorOrButton()
Difficulty GetDifficultyID() const
Definition Map.h:363
void LaunchMoveSpline(std::function< void(Movement::MoveSplineInit &init)> &&initializer, uint32 id=0, MovementGeneratorPriority priority=MOTION_PRIORITY_NORMAL, MovementGeneratorType type=EFFECT_MOTION_TYPE, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
bool IsEmpty() const
Definition ObjectGuid.h:362
void Clear()
Definition ObjectGuid.h:329
Player * ToPlayer()
Definition Object.h:126
uint32 GetEntry() const
Definition Object.h:89
Creature * ToCreature()
Definition Object.h:121
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15929
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition Player.cpp:14226
std::unique_ptr< PlayerMenu > PlayerTalkClass
Definition Player.h:2556
uint32 GetGossipMenuForSource(WorldObject const *source) const
Definition Player.cpp:14248
uint32 TriggerSpell
Definition SpellInfo.h:234
int32 CalcValueAsInt(WorldObject const *caster=nullptr, SpellEffectValue const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
SpellRange GetMinMaxRange(bool positive=false, WorldObject const *caster=nullptr, Spell *spell=nullptr) const
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)
Creature * GetHitCreature() const
Unit * GetCaster() const
int32 GetEffectValueAsInt() const
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Spell * GetSpell() const
Unit * GetOriginalCaster() const
bool DoSpellAttackIfReady(uint32 spellId)
Definition UnitAI.cpp:53
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:172
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:81
Definition Unit.h:647
void EnterVehicle(Unit *base, int8 seatId=-1)
Definition Unit.cpp:12845
bool IsVehicle() const
Definition Unit.h:766
Vehicle * GetVehicle() const
Definition Unit.h:1800
void RemoveGameObject(GameObject *gameObj, bool del)
Definition Unit.cpp:5436
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
Definition Unit.cpp:10804
void RestoreFaction()
Definition Unit.cpp:12143
bool IsWithinCombatRange(Unit const *obj, float dist2compare) const
Definition Unit.cpp:675
void SetFaction(uint32 faction) override
Definition Unit.h:887
ObjectGuid GetOwnerGUID() const override
Definition Unit.h:1211
Unit * GetCharmer() const
Definition Unit.h:1229
Unit * getAttackerForHelper() const
Definition Unit.cpp:5849
MotionMaster * GetMotionMaster()
Definition Unit.h:1750
bool IsFullHealth() const
Definition Unit.h:803
void RemoveNpcFlag(NPCFlags flags)
Definition Unit.h:1013
TempSummon * ToTempSummon()
Definition Unit.h:1844
CharmInfo * GetCharmInfo()
Definition Unit.h:1262
void SetUninteractible(bool apply)
Definition Unit.cpp:8583
Unit * EnsureVictim() const
Definition Unit.h:740
Unit * GetCharmerOrOwner() const
Definition Unit.h:1241
uint32 GetDisplayId() const
Definition Unit.h:1637
bool Attack(Unit *victim, bool meleeAttack)
Definition Unit.cpp:5872
uint64 GetHealth() const
Definition Unit.h:800
void SetNpcFlag(NPCFlags flags)
Definition Unit.h:1012
void EngageWithTarget(Unit *who)
Definition Unit.cpp:8513
void GetAllMinionsByEntry(std::list< TempSummon * > &Minions, uint32 entry)
Definition Unit.cpp:6439
Unit * GetVictim() const
Definition Unit.h:738
bool HealthBelowPct(float pct) const
Definition Unit.h:804
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4822
bool IsControlledByPlayer() const
Definition Unit.h:1234
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:861
bool IsFlying() const
Definition Unit.h:1823
Vehicle * GetVehicleKit() const
Definition Unit.h:1798
bool AttackStop()
Definition Unit.cpp:5984
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3992
bool IsInCombat() const
Definition Unit.h:1073
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:862
bool HasEmptySeat(int8 seatId) const
Checks if vehicle's seat specified by 'seatId' is empty.
Definition Vehicle.cpp:282
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition Object.cpp:1544
Map * GetMap() const
Definition Object.h:411
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2222
Unit * GetOwner() const
Definition Object.cpp:1603
float GetDistance2d(WorldObject const *obj) const
Definition Object.cpp:448
void GetContactPoint(WorldObject const *obj, float &x, float &y, float &z, float distance2d=CONTACT_DISTANCE) const
Definition Object.cpp:2781
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:1522
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition Object.cpp:499
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition Object.cpp:494
GameObjectAI * GetAI(GameObject *go) const override
Definition chapter1.cpp:359
CreatureAI * GetAI(Creature *creature) const override
Definition chapter1.cpp:817
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
Definition chapter1.cpp:949
CreatureAI * GetAI(Creature *creature) const override
Definition chapter1.cpp:310
CreatureAI * GetAI(Creature *creature) const override
Definition chapter1.cpp:299
bool Validate(SpellInfo const *spellInfo) override
void HandleEffectPeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
Definition chapter1.cpp:592
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void HandleDummy(SpellEffIndex)
Definition chapter1.cpp:558
bool Validate(SpellInfo const *) override
Definition chapter1.cpp:547
bool Validate(SpellInfo const *) override
void HandleScriptEffect(SpellEffIndex)
Definition chapter1.cpp:368
void HandleScriptEffect(SpellEffIndex)
Definition chapter1.cpp:990
bool Validate(SpellInfo const *) override
Definition chapter1.cpp:985
void HandleScriptEffect(SpellEffIndex)
bool Validate(SpellInfo const *) override
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
Definition chapter1.cpp:963
void Register() override
Definition chapter1.cpp:976
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)
void InitPossessCreateSpells()
Definition CharmInfo.cpp:74
constexpr float GetPositionZ() const
Definition Position.h:89
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
bool OnGossipHello(Player *player) override
Definition chapter1.cpp:345
void UpdateAI(uint32 diff) override
Definition chapter1.cpp:855
npc_dark_rider_of_acherus(Creature *creature)
Definition chapter1.cpp:840
void Reset() override
Definition chapter1.cpp:850
void JustAppeared() override
Definition chapter1.cpp:842
void SpellHitTarget(WorldObject *target, SpellInfo const *spellInfo) override
Definition chapter1.cpp:884
void DamageTaken(Unit *pDoneBy, uint32 &uiDamage, DamageEffectType, SpellInfo const *) override
Definition chapter1.cpp:692
bool OnGossipSelect(Player *player, uint32, uint32 gossipListId) override
Definition chapter1.cpp:756
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
Definition chapter1.cpp:682
void WaypointPathEnded(uint32, uint32 pathId) override
Definition chapter1.cpp:797
npc_dkc1_gothikAI(Creature *creature)
void MoveInLineOfSight(Unit *who) override
void UpdateAI(uint32 diff) override
Definition chapter1.cpp:467
npc_eye_of_acherus(Creature *creature)
Definition chapter1.cpp:443
void MovementInform(uint32 movementType, uint32 pointId) override
Definition chapter1.cpp:511
void OnCharmed(bool apply) override
Definition chapter1.cpp:458
void InitializeAI() override
Definition chapter1.cpp:451
void WaypointPathEnded(uint32, uint32 pathId) override
npc_hearthglen_crusader(Creature *creature)
void UpdateAI(uint32) override
void AttackStart(Unit *who) override
== Triggered Actions Requested ==================
void JustDied(Unit *killer) override
bool CanAIAttack(Unit const *target) const override
void UpdateAI(uint32) override
npc_scarlet_ghoul(Creature *creature)
void JustAppeared() override
void FindMinions(Unit *owner)
void EventStart(Creature *anchor, Player *target)
Definition chapter1.cpp:176
void MovementInform(uint32 type, uint32 id) override
Definition chapter1.cpp:158
void SetGUID(ObjectGuid const &guid, int32 id) override
Definition chapter1.cpp:321