TrinityCore
zone_icecrown.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 "Containers.h"
21#include "DB2Stores.h"
22#include "MotionMaster.h"
23#include "ObjectAccessor.h"
24#include "Player.h"
25#include "ScriptedCreature.h"
26#include "SpellAuras.h"
27#include "SpellScript.h"
28#include "TemporarySummon.h"
29
30/*######
31## npc_argent_valiant
32######*/
33
35{
36 SPELL_CHARGE = 63010,
38 SPELL_KILL_CREDIT = 63049
39};
40
42{
43 npc_argent_valiant(Creature* creature) : ScriptedAI(creature)
44 {
45 Initialize();
46 creature->GetMotionMaster()->MovePoint(0, 8599.258f, 963.951f, 547.553f);
47 creature->SetFaction(FACTION_FRIENDLY); //wrong faction in db?
48 }
49
51 {
52 uiChargeTimer = 7000;
54 }
55
58
59 void Reset() override
60 {
61 Initialize();
62 }
63
64 void MovementInform(uint32 uiType, uint32 /*uiId*/) override
65 {
66 if (uiType != POINT_MOTION_TYPE)
67 return;
68
70 }
71
72 void DamageTaken(Unit* pDoneBy, uint32& uiDamage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
73 {
74 if (uiDamage > me->GetHealth() && pDoneBy && pDoneBy->GetTypeId() == TYPEID_PLAYER)
75 {
76 uiDamage = 0;
77 pDoneBy->CastSpell(pDoneBy, SPELL_KILL_CREDIT, true);
82 }
83 }
84
85 void UpdateAI(uint32 uiDiff) override
86 {
87 if (!UpdateVictim())
88 return;
89
90 if (uiChargeTimer <= uiDiff)
91 {
93 uiChargeTimer = 7000;
94 } else uiChargeTimer -= uiDiff;
95
96 if (uiShieldBreakerTimer <= uiDiff)
97 {
100 } else uiShieldBreakerTimer -= uiDiff;
101 }
102};
103
104/*######
105## npc_guardian_pavilion
106######*/
107
109{
112
115};
116
118{
120 {
121 SetCombatMovement(false);
122 }
123
124 void MoveInLineOfSight(Unit* who) override
125
126 {
128 return;
129
130 if (!who || who->GetTypeId() != TYPEID_PLAYER || !me->IsHostileTo(who) || !me->isInBackInMap(who, 5.0f))
131 return;
132
134 return;
135
136 if (who->ToPlayer()->GetTeamId() == TEAM_ALLIANCE)
137 who->CastSpell(who, SPELL_TRESPASSER_H, true);
138 else
139 who->CastSpell(who, SPELL_TRESPASSER_A, true);
140
141 }
142};
143
144/*######
145* npc_tournament_training_dummy
146######*/
148{
152
156
160
164
166
169};
170
172{
174 {
175 Initialize();
176 SetCombatMovement(false);
177 }
178
180 {
181 isVulnerable = false;
182 }
183
186
187 void Reset() override
188 {
190 Initialize();
191
192 events.Reset();
194 }
195
196 void EnterEvadeMode(EvadeReason why) override
197 {
198 if (!_EnterEvadeMode(why))
199 return;
200
201 Reset();
202 }
203
204 void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
205 {
206 damage = 0;
208 }
209
210 void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
211 {
212 Unit* unitCaster = caster->ToUnit();
213 if (!unitCaster)
214 return;
215
216 switch (me->GetEntry())
217 {
219 if (spellInfo->Id == SPELL_PLAYER_CHARGE)
220 if (isVulnerable)
221 DoCast(unitCaster, SPELL_CHARGE_CREDIT, true);
222 break;
223 case NPC_MELEE_TARGET:
224 if (spellInfo->Id == SPELL_PLAYER_THRUST)
225 {
226 DoCast(unitCaster, SPELL_MELEE_CREDIT, true);
227
228 if (Unit* target = unitCaster->GetVehicleBase())
229 DoCast(target, SPELL_COUNTERATTACK, true);
230 }
231 break;
233 if (spellInfo->Id == SPELL_PLAYER_BREAK_SHIELD)
234 if (isVulnerable)
235 DoCast(unitCaster, SPELL_RANGED_CREDIT, true);
236 break;
237 }
238
239 if (spellInfo->Id == SPELL_PLAYER_BREAK_SHIELD)
241 isVulnerable = true;
242 }
243
244 void UpdateAI(uint32 diff) override
245 {
246 events.Update(diff);
247
248 switch (events.ExecuteEvent())
249 {
251 switch (me->GetEntry())
252 {
254 {
257 break;
258 }
260 {
262 if (!defend || defend->GetStackAmount() < 3 || defend->GetDuration() <= 8000)
264 break;
265 }
266 }
267 isVulnerable = false;
269 break;
271 if (UpdateVictim())
272 {
275 }
276 break;
277 }
278
279 if (!UpdateVictim())
280 return;
281
284 }
285
286 void MoveInLineOfSight(Unit* /*who*/) override { }
287
288};
289
290// Battle for Crusaders' Pinnacle
292{
296 SPELL_TORCH = 58121,
297
306 NPC_LK = 31013,
307
308 BANNER_SAY = 0, // "The Blessed Banner of the Crusade has been planted.\n Defend the banner from all attackers!"
309 DALFORS_SAY_PRE_1 = 0, // "BY THE LIGHT! Those damned monsters! Look at what they've done to our people!"
310 DALFORS_SAY_PRE_2 = 1, // "Burn it down, boys. Burn it all down."
311 DALFORS_SAY_START = 2, // "Let 'em come. They'll pay for what they've done!"
312 DALFORS_YELL_FINISHED = 3, // "We've done it, lads! We've taken the pinnacle from the Scourge! Report to Father Gustav at once and tell him the good news! We're gonna get to buildin' and settin' up! Go!"
313 LK_TALK_1 = 0, // "Leave no survivors!"
314 LK_TALK_2 = 1, // "Cower before my terrible creations!"
315 LK_TALK_3 = 2, // "Feast my children! Feast upon the flesh of the living!"
316 LK_TALK_4 = 3, // "Lay down your arms and surrender your souls!"
317
327};
328
330{
331 {6458.703f, 403.858f, 490.498f, 3.1205f}, // Dalfors spawn point
332 {6422.950f, 423.335f, 510.451f, 0.0f}, // Dalfors intro pos
333 {6426.343f, 420.515f, 508.650f, 0.0f}, // Dalfors fight pos
334};
335
337{
338 {6462.025f, 403.681f, 489.721f, 3.1007f}, // priest1 spawn point
339 {6421.480f, 423.576f, 510.781f, 5.7421f}, // priest1 intro pos
340};
341
343{
344 {6463.969f, 407.198f, 489.240f, 2.2689f}, // priest2 spawn point
345 {6419.778f, 421.404f, 510.972f, 5.7421f}, // priest2 intro pos
346};
347
349{
350 {6464.371f, 400.944f, 489.186f, 6.1610f}, // priest3 spawn point
351 {6423.516f, 425.782f, 510.774f, 5.7421f}, // priest3 intro pos
352};
353
355{
356 {6462.929f, 409.826f, 489.392f, 3.0968f}, // mason1 spawn point
357 {6428.163f, 421.960f, 508.297f, 0.0f}, // mason1 intro pos
358 {6414.335f, 454.904f, 511.395f, 2.8972f}, // mason1 action pos
359};
360
362{
363 {6462.650f, 405.670f, 489.576f, 2.9414f}, // mason2 spawn point
364 {6426.250f, 419.194f, 508.219f, 0.0f}, // mason2 intro pos
365 {6415.014f, 446.849f, 511.395f, 3.1241f}, // mason2 action pos
366};
367
369{
370 {6462.646f, 401.218f, 489.601f, 2.7864f}, // mason3 spawn point
371 {6423.855f, 416.598f, 508.305f, 0.0f}, // mason3 intro pos
372 {6417.070f, 438.824f, 511.395f, 3.6651f}, // mason3 action pos
373};
374
376{
378 {
379 HalofSpawned = false;
380 PhaseCount = 0;
381
382 SetCombatMovement(false);
383 }
384
386
388
390
392
397
398 void Reset() override
399 {
400 me->SetRegenerateHealth(false);
404 }
405
406 void JustEngagedWith(Unit* /*who*/) override { }
407
408 void MoveInLineOfSight(Unit* /*who*/) override { }
409
410 void JustSummoned(Creature* Summoned) override
411 {
412 Summons.Summon(Summoned);
413 }
414
415 void JustDied(Unit* /*killer*/) override
416 {
417 Summons.DespawnAll();
419 }
420
421 void UpdateAI(uint32 diff) override
422 {
423 events.Update(diff);
424
425 switch (events.ExecuteEvent())
426 {
427 case EVENT_SPAWN:
428 {
430 {
431 guidDalfors = Dalfors->GetGUID();
432 Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[1]);
433 }
435 {
436 guidPriest[0] = Priest1->GetGUID();
437 Priest1->GetMotionMaster()->MovePoint(0, Priest1Pos[1]);
438 }
440 {
441 guidPriest[1] = Priest2->GetGUID();
442 Priest2->GetMotionMaster()->MovePoint(0, Priest2Pos[1]);
443 }
445 {
446 guidPriest[2] = Priest3->GetGUID();
447 Priest3->GetMotionMaster()->MovePoint(0, Priest3Pos[1]);
448 }
449 if (Creature* Mason1 = DoSummon(NPC_ARGENT_MASON, Mason1Pos[0]))
450 {
451 guidMason[0] = Mason1->GetGUID();
452 Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[1]);
453 }
454 if (Creature* Mason2 = DoSummon(NPC_ARGENT_MASON, Mason2Pos[0]))
455 {
456 guidMason[1] = Mason2->GetGUID();
457 Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[1]);
458 }
459 if (Creature* Mason3 = DoSummon(NPC_ARGENT_MASON, Mason3Pos[0]))
460 {
461 guidMason[2] = Mason3->GetGUID();
462 Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[1]);
463 }
465 }
466 break;
467 case EVENT_INTRO_1:
468 {
470 Dalfors->AI()->Talk(DALFORS_SAY_PRE_1);
472 }
473 break;
474 case EVENT_INTRO_2:
475 {
477 {
478 Dalfors->SetFacingTo(6.215f);
479 Dalfors->AI()->Talk(DALFORS_SAY_PRE_2);
480 }
482 }
483 break;
484 case EVENT_INTRO_3:
485 {
487 {
488 Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[2]);
489 Dalfors->SetHomePosition(DalforsPos[2]);
490 }
492 {
493 Priest1->SetFacingTo(5.7421f);
494 Priest1->SetHomePosition(Priest1Pos[1]);
495 }
497 {
498 Priest2->SetFacingTo(5.7421f);
499 Priest2->SetHomePosition(Priest2Pos[1]);
500 }
502 {
503 Priest3->SetFacingTo(5.7421f);
504 Priest3->SetHomePosition(Priest3Pos[1]);
505 }
507 {
508 Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[2]);
509 Mason1->SetHomePosition(Mason1Pos[2]);
510 }
512 {
513 Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[2]);
514 Mason2->SetHomePosition(Mason2Pos[2]);
515 }
517 {
518 Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[2]);
519 Mason3->SetHomePosition(Mason3Pos[2]);
520 }
523 }
524 break;
526 {
528 {
529 Mason1->SetFacingTo(2.8972f);
530 Mason1->AI()->SetData(1, 1); // triggers SAI actions on npc
531 }
533 {
534 Mason2->SetFacingTo(3.1241f);
535 Mason2->AI()->SetData(1, 1); // triggers SAI actions on npc
536 }
538 {
539 Mason3->SetFacingTo(3.6651f);
540 Mason3->AI()->SetData(1, 1); // triggers SAI actions on npc
541 }
542 }
543 break;
545 {
547 LK->AI()->Talk(LK_TALK_1);
549 Dalfors->AI()->Talk(DALFORS_SAY_START);
551 }
552 break;
553 case EVENT_WAVE_SPAWN:
554 {
555 if (PhaseCount == 3)
556 {
558 LK->AI()->Talk(LK_TALK_2);
559 }
560 else if (PhaseCount == 6)
561 {
563 LK->AI()->Talk(LK_TALK_3);
564 }
565 if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason3Pos[0]))
566 {
567 tempsum->SetHomePosition(DalforsPos[2]);
568 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
569 }
570 if (urand(0, 1) == 0)
571 {
573 {
574 tempsum->SetHomePosition(DalforsPos[2]);
575 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
576 }
578 {
579 tempsum->SetHomePosition(DalforsPos[2]);
580 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
581 }
582 }
583 else
584 {
586 {
587 tempsum->SetHomePosition(DalforsPos[2]);
588 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
589 }
591 {
592 tempsum->SetHomePosition(DalforsPos[2]);
593 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
594 }
595 }
596
597 PhaseCount++;
598
599 if (PhaseCount < 8)
601 else
603 }
604 break;
605 case EVENT_HALOF:
606 {
608 LK->AI()->Talk(LK_TALK_4);
609 if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason1Pos[0]))
610 {
611 tempsum->SetHomePosition(DalforsPos[2]);
612 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
613 }
614 if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason2Pos[0]))
615 {
616 tempsum->SetHomePosition(DalforsPos[2]);
617 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
618 }
620 {
621 HalofSpawned = true;
622 guidHalof = tempsum->GetGUID();
623 tempsum->SetHomePosition(DalforsPos[2]);
624 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
625 }
626 }
627 break;
628 case EVENT_ENDED:
629 {
630 Summons.DespawnAll();
632 }
633 break;
634 }
635
636 if (PhaseCount == 8)
638 if (Halof->isDead())
639 {
641 Summons.DespawnEntry(NPC_HIDEOUS_PLAGEBRINGER);
642 Summons.DespawnEntry(NPC_REANIMATED_CAPTAIN);
643 Summons.DespawnEntry(NPC_SCOURGE_DRUDGE);
646 Dalfors->AI()->Talk(DALFORS_YELL_FINISHED);
648 }
649 }
650};
651
652/*######
653## Borrowed Technology - Id: 13291, The Solution Solution (daily) - Id: 13292, Volatility - Id: 13239, Volatiliy - Id: 13261 (daily)
654######*/
655
657{
658 // Spells
659 SPELL_GRAB = 59318,
663 SPELL_RIDE = 59319,
664
665 // Points
668
669 // Events
672
674{
675 npc_frostbrood_skytalon(Creature* creature) : VehicleAI(creature) { }
676
678
679 void IsSummonedBy(WorldObject* summoner) override
680 {
681 me->GetMotionMaster()->MovePoint(POINT_GRAB_DECOY, summoner->GetPositionX(), summoner->GetPositionY(), summoner->GetPositionZ());
682 }
683
684 void MovementInform(uint32 type, uint32 id) override
685 {
686 if (type != POINT_MOTION_TYPE)
687 return;
688
689 if (id == POINT_GRAB_DECOY)
690 if (TempSummon* summon = me->ToTempSummon())
691 if (Unit* summoner = summon->GetSummonerUnit())
692 DoCast(summoner, SPELL_GRAB);
693 }
694
695 void UpdateAI(uint32 diff) override
696 {
698 events.Update(diff);
699
700 while (uint32 eventId = events.ExecuteEvent())
701 {
702 if (eventId == EVENT_FLY_AWAY)
703 {
704 Position randomPosOnRadius;
705 randomPosOnRadius.m_positionZ = (me->GetPositionZ() + 40.0f);
706 me->GetNearPoint2D(nullptr, randomPosOnRadius.m_positionX, randomPosOnRadius.m_positionY, 40.0f, me->GetAbsoluteAngle(me));
707 me->GetMotionMaster()->MovePoint(POINT_FLY_AWAY, randomPosOnRadius);
708 }
709 }
710 }
711
712 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
713 {
714 switch (spellInfo->Id)
715 {
716 case SPELL_EXPLOSION:
718 break;
719 case SPELL_RIDE:
722 break;
723 }
724 }
725};
726
727/*######
728## Quest 12887, 12892: It's All Fun and Games
729######*/
730
731// 55288 - It's All Fun and Games: The Ocular On Death
733{
734 bool Validate(SpellInfo const* spellInfo) override
735 {
736 return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
737 }
738
739 void HandleScript(SpellEffIndex /*effIndex*/)
740 {
741 if (Player* target = GetHitPlayer())
742 target->CastSpell(target, uint32(GetEffectValue()));
743 }
744
745 void Register() override
746 {
748 }
749};
750
751/*######
752## Quest 14077, 14144: The Light's Mercy
753######*/
754
755// 66411 - Summon Tualiq Proxy
757{
759 {
760 Position const offset = { 0.0f, 0.0f, 30.0f, 0.0f };
761 dest.RelocateOffset(offset);
762 }
763
764 void Register() override
765 {
767 }
768};
769
770/*######
771## Quest 14076 & 14092: Breakfast Of Champions
772######*/
773
775{
779
780// 66512 - Pound Drum
782{
783 bool Validate(SpellInfo const* /*spell*/) override
784 {
786 }
787
789 {
791 }
792
793 void Register() override
794 {
796 }
797};
798
799/*######
800## Quest 14112 & 14145: What Do You Feed a Yeti, Anyway?
801######*/
802
804{
810
811std::array<uint32, 4> const ChumTheWaterSummonSpells =
812{
817};
818
819// 66741 - Chum the Water
821{
822 bool Validate(SpellInfo const* /*spellInfo*/) override
823 {
825 }
826
827 void HandleScript(SpellEffIndex /*effIndex*/)
828 {
829 Unit* caster = GetCaster();
831 }
832
833 void Register() override
834 {
836 }
837};
838
839/*######
840## Quest 13121: Through the Eye
841######*/
842
844{
850
851// 25732 - Through the Eye: Eye of the Lich King
853{
854 bool Validate(SpellInfo const* /*spellInfo*/) override
855 {
858 }
859
860 void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
861 {
862 if (Player* target = GetTarget()->ToPlayer())
863 target->Unit::Whisper(TEXT_USING_THE_EYE_OF_THE_LK, target, true);
864 }
865
866 void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
867 {
868 Unit* target = GetTarget();
869 target->CastSpell(target, SPELL_SUMMON_IMAGE_OF_VARDMADRA, true);
870 target->CastSpell(target, SPELL_SUMMON_IMAGE_OF_SHADOW_CULTIST, true);
871 }
872
873 void Register() override
874 {
877 }
878};
879
880// 57884 - Through the Eye: Kill Credit to Master
882{
883 bool Validate(SpellInfo const* /*spellInfo*/) override
884 {
886 }
887
888 void HandleScript(SpellEffIndex /*effIndex*/)
889 {
891 }
892
893 void Register() override
894 {
896 }
897};
898
899/*######
900## Quest 13008: Scourge Tactics
901######*/
902
903// 56515 - Summon Freed Crusader
905{
906 bool Validate(SpellInfo const* spellInfo) override
907 {
908 return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
909 }
910
911 void HandleScript(SpellEffIndex /*effIndex*/)
912 {
914 }
915
916 void Register() override
917 {
919 }
920};
921
923{
936}
DB2Storage< BroadcastTextEntry > sBroadcastTextStore("BroadcastText.db2", &BroadcastTextLoadInfo::Instance)
uint32_t uint32
Definition: Define.h:142
@ POINT_MOTION_TYPE
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
bool roll_chance_i(int chance)
Definition: Random.h:59
#define RegisterCreatureAI(ai_name)
Definition: ScriptMgr.h:1380
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive=true)
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_0
Definition: SharedDefines.h:30
@ TARGET_DEST_CASTER
@ TEAM_ALLIANCE
@ SPELL_EFFECT_SCRIPT_EFFECT
@ FACTION_FRIENDLY
@ FACTION_MONSTER
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define SpellCastFn(F)
Definition: SpellScript.h:825
#define SpellDestinationTargetSelectFn(F, I, N)
Definition: SpellScript.h:874
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
EvadeReason
Definition: UnitAICommon.h:30
DamageEffectType
Definition: UnitDefines.h:131
@ UNIT_STATE_STUNNED
Definition: Unit.h:258
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:2039
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
Unit * GetTarget() const
int32 GetDuration() const
Definition: SpellAuras.h:173
uint8 GetStackAmount() const
Definition: SpellAuras.h:189
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:219
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:299
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
Creature * DoSummon(uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
Definition: CreatureAI.cpp:464
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:371
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
void SetRegenerateHealth(bool value)
Definition: Creature.h:358
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:52
void Reset()
Definition: EventMap.cpp:21
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
static Unit * ToUnit(Object *o)
Definition: Object.h:225
TypeID GetTypeId() const
Definition: Object.h:173
uint32 GetEntry() const
Definition: Object.h:161
static Player * ToPlayer(Object *o)
Definition: Object.h:213
TeamId GetTeamId() const
Definition: Player.h:2236
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
Definition: SpellInfo.cpp:495
uint32 const Id
Definition: SpellInfo.h:325
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition: SpellInfo.h:577
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
Player * GetHitPlayer() const
Unit * GetCaster() const
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
Definition: SpellScript.h:873
HookList< EffectHandler > OnEffectHit
Definition: SpellScript.h:839
Unit * GetHitUnit() const
int32 GetEffectValue() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
HookList< CastHandler > OnCast
Definition: SpellScript.h:822
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:161
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void SetControlled(bool apply, UnitState state)
Definition: Unit.cpp:10911
void SetFaction(uint32 faction) override
Definition: Unit.h:859
bool isInBackInMap(Unit const *target, float distance, float arc=float(M_PI)) const
Definition: Unit.cpp:3160
Unit * GetVehicleBase() const
Definition: Unit.cpp:11480
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
TempSummon * ToTempSummon()
Definition: Unit.h:1756
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4560
uint64 GetHealth() const
Definition: Unit.h:776
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
bool IsHostileTo(WorldObject const *target) const
Definition: Object.cpp:2860
void GetNearPoint2D(WorldObject const *searcher, float &x, float &y, float distance, float absAngle) const
Definition: Object.cpp:3339
uint32 GetAreaId() const
Definition: Object.h:546
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *spellInfo) override
void SetDest(SpellDestination &dest)
bool Validate(SpellInfo const *spellInfo) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition: Containers.h:109
constexpr float GetPositionX() const
Definition: Position.h:76
float m_positionZ
Definition: Position.h:55
constexpr float GetPositionY() const
Definition: Position.h:77
float m_positionX
Definition: Position.h:53
float m_positionY
Definition: Position.h:54
float GetAbsoluteAngle(float x, float y) const
Definition: Position.h:125
constexpr float GetOrientation() const
Definition: Position.h:79
constexpr float GetPositionZ() const
Definition: Position.h:78
void SetCombatMovement(bool allowMovement)
void RelocateOffset(Position const &offset)
Definition: Spell.cpp:122
void UpdateAI(uint32 diff) override
Definition: CombatAI.cpp:238
void DamageTaken(Unit *pDoneBy, uint32 &uiDamage, DamageEffectType, SpellInfo const *) override
void Reset() override
void MovementInform(uint32 uiType, uint32) override
npc_argent_valiant(Creature *creature)
void UpdateAI(uint32 uiDiff) override
ObjectGuid guidMason[3]
ObjectGuid guidPriest[3]
void JustSummoned(Creature *Summoned) override
npc_blessed_banner(Creature *creature)
void JustDied(Unit *) override
void MoveInLineOfSight(Unit *) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
void Reset() override
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void IsSummonedBy(WorldObject *summoner) override
npc_frostbrood_skytalon(Creature *creature)
void MoveInLineOfSight(Unit *who) override
npc_guardian_pavilion(Creature *creature)
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
void EnterEvadeMode(EvadeReason why) override
npc_tournament_training_dummy(Creature *creature)
void MoveInLineOfSight(Unit *) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void UpdateAI(uint32 diff) override
GuardianPavilion
@ AREA_SILVER_COVENANT_PAVILION
@ SPELL_TRESPASSER_H
@ SPELL_TRESPASSER_A
@ AREA_SUNREAVER_PAVILION
void AddSC_icecrown()
ArgentValiant
@ SPELL_CHARGE
@ SPELL_KILL_CREDIT
@ SPELL_SHIELD_BREAKER
Position const Priest1Pos[2]
BreakfastOfChampions
@ SPELL_STORMFORGED_MOLE_MACHINE
@ SPELL_SUMMON_DEEP_JORMUNGAR
std::array< uint32, 4 > const ChumTheWaterSummonSpells
Position const Mason1Pos[3]
Position const Mason3Pos[3]
Position const Priest3Pos[2]
Position const Priest2Pos[2]
ThroughTheEye
@ SPELL_USING_THE_EYE_OF_THE_LK
@ TEXT_USING_THE_EYE_OF_THE_LK
@ SPELL_SUMMON_IMAGE_OF_SHADOW_CULTIST
@ SPELL_SUMMON_IMAGE_OF_VARDMADRA
TournamentDummy
@ SPELL_RANGED_DEFEND
@ SPELL_PLAYER_CHARGE
@ NPC_RANGED_TARGET
@ SPELL_VULNERABLE
@ EVENT_DUMMY_RECAST_DEFEND
@ SPELL_CHARGE_DEFEND
@ SPELL_MELEE_CREDIT
@ SPELL_COUNTERATTACK
@ EVENT_DUMMY_RESET
@ NPC_CHARGE_TARGET
@ SPELL_CHARGE_CREDIT
@ SPELL_RANGED_CREDIT
@ SPELL_PLAYER_BREAK_SHIELD
@ NPC_MELEE_TARGET
@ SPELL_PLAYER_THRUST
ChumTheWaterSummons
@ SPELL_SUMMON_NORTH_SEA_THRESHER
@ SPELL_SUMMON_NORTH_SEA_MAKO
@ SPELL_SUMMON_ANGRY_KVALDIR
@ SPELL_SUMMON_NORTH_SEA_BLUE_SHARK
BorrowedTechnologyAndVolatility
@ SPELL_EXPLOSION
@ SPELL_IMMOLATION
@ SPELL_GRAB
@ SPELL_PING_BUNNY
@ POINT_GRAB_DECOY
@ POINT_FLY_AWAY
@ SPELL_RIDE
@ EVENT_FLY_AWAY
BlessedBanner
@ BANNER_SAY
@ DALFORS_SAY_PRE_1
@ EVENT_START_FIGHT
@ SPELL_BLESSING_OF_THE_CRUSADE
@ EVENT_SPAWN
@ EVENT_INTRO_1
@ NPC_HIDEOUS_PLAGEBRINGER
@ SPELL_CRUSADERS_SPIRE_VICTORY
@ EVENT_INTRO_2
@ NPC_HALOF_THE_DEATHBRINGER
@ SPELL_THREAT_PULSE
@ NPC_BLESSED_BANNER
@ NPC_ARGENT_BATTLE_PRIEST
@ LK_TALK_2
@ NPC_REANIMATED_CAPTAIN
@ EVENT_HALOF
@ DALFORS_YELL_FINISHED
@ NPC_ARGENT_MASON
@ EVENT_WAVE_SPAWN
@ LK_TALK_1
@ EVENT_MASON_ACTION
@ SPELL_TORCH
@ NPC_CRUSADER_LORD_DALFORS
@ DALFORS_SAY_PRE_2
@ EVENT_INTRO_3
@ EVENT_ENDED
@ NPC_SCOURGE_DRUDGE
@ LK_TALK_4
@ DALFORS_SAY_START
@ LK_TALK_3
@ NPC_LK
Position const Mason2Pos[3]
Position const DalforsPos[3]