TrinityCore
boss_lady_deathwhisper.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 "icecrown_citadel.h"
19#include "Containers.h"
20#include "Group.h"
21#include "InstanceScript.h"
22#include "MotionMaster.h"
23#include "ObjectAccessor.h"
24#include "Player.h"
25#include "QuestPools.h"
26#include "ScriptedCreature.h"
27#include "ScriptMgr.h"
28#include "SpellAuraEffects.h"
29#include "SpellInfo.h"
30#include "SpellScript.h"
31#include "TemporarySummon.h"
32
34{
35 // Lady Deathwhisper
53
54 // Darnavan
57};
58
60{
61 // Lady Deathwhisper
76
77 // Achievement
78 SPELL_FULL_HOUSE = 72827, // does not exist in dbc but still can be used for criteria check
79
80 // Both Adds
85
86 // Fanatics
97
98 // Adherents
110
111 // Vengeful Shade
117
118 // Darnavan
125};
126
128{
129 // Darnavan
136};
137
139{
143 PHASE_TWO = 3
145
147{
150 GROUP_TWO = 2
152
154{
159
162};
163
165{
168
169#define NPC_DARNAVAN RAID_MODE<uint32>(NPC_DARNAVAN_10, NPC_DARNAVAN_25, NPC_DARNAVAN_10, NPC_DARNAVAN_25)
170#define NPC_DARNAVAN_CREDIT RAID_MODE<uint32>(NPC_DARNAVAN_CREDIT_10, NPC_DARNAVAN_CREDIT_25, NPC_DARNAVAN_CREDIT_10, NPC_DARNAVAN_CREDIT_25)
171#define QUEST_DEPROGRAMMING RAID_MODE<uint32>(QUEST_DEPROGRAMMING_10, QUEST_DEPROGRAMMING_25, QUEST_DEPROGRAMMING_10, QUEST_DEPROGRAMMING_25)
172
174
176{
177 {-578.7066f, 2154.167f, 51.01529f, 1.692969f}, // 1 Left Door 1 (Cult Fanatic)
178 {-598.9028f, 2155.005f, 51.01530f, 1.692969f}, // 2 Left Door 2 (Cult Adherent)
179 {-619.2864f, 2154.460f, 51.01530f, 1.692969f}, // 3 Left Door 3 (Cult Fanatic)
180 {-578.6996f, 2269.856f, 51.01529f, 4.590216f}, // 4 Right Door 1 (Cult Adherent)
181 {-598.9688f, 2269.264f, 51.01529f, 4.590216f}, // 5 Right Door 2 (Cult Fanatic)
182 {-619.4323f, 2268.523f, 51.01530f, 4.590216f}, // 6 Right Door 3 (Cult Adherent)
183 {-524.2480f, 2211.920f, 62.90960f, 3.141592f}, // 7 Upper (Random Cultist)
184};
185
187{
188 public:
189 DaranavanMoveEvent(Creature& darnavan) : _darnavan(darnavan) { }
190
191 bool Execute(uint64 /*time*/, uint32 /*diff*/) override
192 {
194 return true;
195 }
196
197 private:
199};
200
202{
205 {
206 Initialize();
207 }
208
210 {
211 _waveCounter = 0;
213 _cultistQueue.clear();
217 {
219 });
220 }
221
222 void Reset() override
223 {
224 _Reset();
225 Initialize();
231 }
232
233 void DoAction(int32 action) override
234 {
235 if (action != ACTION_START_INTRO)
236 return;
237
240 scheduler.Schedule(Seconds(10), GROUP_INTRO, [this](TaskContext context)
241 {
242 switch (context.GetRepeatCounter())
243 {
244 case 0:
245 Talk(SAY_INTRO_2);
246 context.Repeat(Seconds(21));
247 break;
248 case 1:
249 Talk(SAY_INTRO_3);
250 context.Repeat(Seconds(11));
251 break;
252 case 2:
253 Talk(SAY_INTRO_4);
254 context.Repeat(Seconds(9));
255 break;
256 case 3:
257 Talk(SAY_INTRO_5);
258 context.Repeat(Seconds(21));
259 break;
260 case 4:
261 Talk(SAY_INTRO_6);
262 context.Repeat(Seconds(10));
263 break;
264 case 5:
265 Talk(SAY_INTRO_7);
266 break;
267 default:
268 break;
269 }
270 });
271 }
272
273 void AttackStart(Unit* victim) override
274 {
276 return;
277
278 if (victim && me->Attack(victim, true) && _phase != PHASE_ONE)
279 me->GetMotionMaster()->MoveChase(victim);
280 }
281
282 void JustEngagedWith(Unit* who) override
283 {
285 {
288 return;
289 }
290
293 me->setActive(true);
296 // phase-independent events
298 .Schedule(Minutes(10), [this](TaskContext /*context*/)
299 {
302 })
303 .Schedule(Seconds(17), [this](TaskContext death_and_decay)
304 {
307 death_and_decay.Repeat(Seconds(22), Seconds(30));
308 });
310 scheduler.Schedule(Seconds(27), [this](TaskContext dominate_mind)
311 {
313 std::list<Unit*> targets;
315 for (Unit* target : targets)
317 dominate_mind.Repeat(Seconds(40), Seconds(45));
318 });
319 // phase one only
321 .Schedule(Seconds(5), GROUP_ONE, [this](TaskContext wave)
322 {
323 SummonWaveP1();
324 wave.Repeat(Seconds(IsHeroic() ? 45 : 60));
325 })
326 .Schedule(Seconds(2), GROUP_ONE, [this](TaskContext shadow_bolt)
327 {
329 DoCast(target, SPELL_SHADOW_BOLT);
330 shadow_bolt.Repeat(Milliseconds(2450), Milliseconds(3600));
331 })
332 .Schedule(Seconds(15), GROUP_ONE, [this](TaskContext context)
333 {
335 context.Repeat(Seconds(25));
336 });
337
339 me->SetCanMelee(false);
344 }
345
346 void JustDied(Unit* killer) override
347 {
349
350 std::set<uint32> livingAddEntries;
351 // Full House achievement
352 for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
353 if (Unit* unit = ObjectAccessor::GetUnit(*me, *itr))
354 if (unit->IsAlive() && unit->GetEntry() != NPC_VENGEFUL_SHADE)
355 livingAddEntries.insert(unit->GetEntry());
356
357 if (livingAddEntries.size() >= 5)
359
361 {
362 if (darnavan->IsAlive())
363 {
364 darnavan->SetFaction(FACTION_FRIENDLY);
365 darnavan->CombatStop(true);
366 darnavan->GetMotionMaster()->MoveIdle();
367 darnavan->SetReactState(REACT_PASSIVE);
368 darnavan->m_Events.AddEvent(new DaranavanMoveEvent(*darnavan), darnavan->m_Events.CalculateTime(10s));
369 darnavan->AI()->Talk(SAY_DARNAVAN_RESCUED);
370
371 if (!killer)
372 return;
373
374 if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
375 {
376 if (Group* group = owner->GetGroup())
377 {
378 for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
379 if (Player* member = itr->GetSource())
380 if (member->IsInMap(owner))
381 member->KilledMonsterCredit(NPC_DARNAVAN_CREDIT);
382 }
383 else
384 owner->KilledMonsterCredit(NPC_DARNAVAN_CREDIT);
385 }
386 }
387 }
388
389 _JustDied();
390 }
391
392 void EnterEvadeMode(EvadeReason /*why*/) override
393 {
397 darnavan->DespawnOrUnsummon();
398
400 }
401
402 void KilledUnit(Unit* victim) override
403 {
404 if (victim->GetTypeId() == TYPEID_PLAYER)
405 Talk(SAY_KILL);
406 }
407
408 void DamageTaken(Unit* /*damageDealer*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
409 {
410 // phase transition
411 if (_phase == PHASE_ONE && damage > uint32(me->GetPower(POWER_MANA)))
412 {
418 damage -= me->GetPower(POWER_MANA);
421 me->SetCanMelee(true);
423
425 .Schedule(Seconds(12), GROUP_TWO, [this](TaskContext frostbolt)
426 {
428 frostbolt.Repeat();
429 })
430 .Schedule(Seconds(20), GROUP_TWO, [this](TaskContext frostboldVolley)
431 {
433 frostboldVolley.Repeat();
434 })
435 .Schedule(Seconds(6), Seconds(9), GROUP_TWO, [this](TaskContext touch)
436 {
437 if (me->GetVictim())
439 touch.Repeat();
440 })
441 .Schedule(Seconds(12), GROUP_TWO, [this](TaskContext summonShade)
442 {
445 me->CastSpell(nullptr, SPELL_SUMMON_SPIRITS, args);
446 summonShade.Repeat();
447 });
448
449 // on heroic mode Lady Deathwhisper is immune to taunt effects in phase 2 and continues summoning adds
450 if (IsHeroic())
451 {
455 {
456 SummonWaveP2();
457 context.Repeat(Seconds(45));
458 });
459 }
460 }
461 }
462
463 void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
464 {
465 if (spellInfo->Id == SPELL_SUMMON_SPIRITS)
466 _nextVengefulShadeTargetGUID.push_back(target->GetGUID());
467 }
468
469 void JustSummoned(Creature* summon) override
470 {
471 switch (summon->GetEntry())
472 {
473 case NPC_DARNAVAN_10:
474 case NPC_DARNAVAN_25:
475 _darnavanGUID = summon->GetGUID();
477 return;
480 break;
481 summon->AI()->SetGUID(_nextVengefulShadeTargetGUID.front());
483 break;
485 case NPC_CULT_FANATIC:
486 _cultistQueue.push_back(summon->GetGUID());
488 break;
489 default:
490 break;
491 }
492 summons.Summon(summon);
493 }
494
495 void UpdateAI(uint32 diff) override
496 {
497 if (!UpdateVictim() && _phase != PHASE_INTRO)
498 return;
499
500 scheduler.Update(diff);
501 }
502
503 // summoning function for first phase
505 {
506 uint8 addIndex = _waveCounter & 1;
507 uint8 addIndexOther = uint8(addIndex ^ 1);
508
509 // Summon first add, replace it with Darnavan if weekly quest is active
510 if (_waveCounter || !sQuestPoolMgr->IsQuestActive(QUEST_DEPROGRAMMING))
511 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3]);
512 else
513 Summon(NPC_DARNAVAN, SummonPositions[addIndex * 3]);
514
515 Summon(SummonEntries[addIndexOther], SummonPositions[addIndex * 3 + 1]);
516 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3 + 2]);
517 if (Is25ManRaid())
518 {
519 Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3]);
520 Summon(SummonEntries[addIndex], SummonPositions[addIndexOther * 3 + 1]);
521 Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3 + 2]);
523 }
524
525 ++_waveCounter;
526 }
527
528 // summoning function for second phase
530 {
531 if (Is25ManRaid())
532 {
533 uint8 addIndex = _waveCounter & 1;
534 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3]);
535 Summon(SummonEntries[addIndex ^ 1], SummonPositions[addIndex * 3 + 1]);
536 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3+ 2]);
537 }
538 else
540
541 ++_waveCounter;
542 }
543
544 // helper for summoning wave mobs
545 void Summon(uint32 entry, Position const& pos)
546 {
547 if (TempSummon* summon = me->SummonCreature(entry, pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s))
548 summon->CastSpell(summon, SPELL_TELEPORT_VISUAL);
549 }
550
551 void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
552 {
553 if (summon->GetEntry() == NPC_CULT_ADHERENT || summon->GetEntry() == NPC_CULT_FANATIC)
554 _cultistQueue.remove(summon->GetGUID());
555 }
556
558 {
559 if (_cultistQueue.empty())
560 return;
561
565 if (!cultist)
566 return;
567
568 if (RAND(0,1))
570 else
571 {
574 }
575 }
576
577private:
585};
586
588{
589 npc_cult_fanatic(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
590
591 void Reset() override
592 {
595 .SetValidator([this]
596 {
598 })
599 .Schedule(Seconds(17), [this](TaskContext vampiric_might)
600 {
602 vampiric_might.Repeat(Seconds(25));
603 })
604 .Schedule(Seconds(12), [this](TaskContext shadow_cleave)
605 {
607 shadow_cleave.Repeat(Seconds(14));
608 })
609 .Schedule(Seconds(10), [this](TaskContext necrotic_strike)
610 {
612 necrotic_strike.Repeat(Seconds(17));
613 });
614 }
615
616 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
617 {
618 switch (spellInfo->Id)
619 {
623 break;
627 break;
631 me->AttackStop();
633 break;
639 .Schedule(Seconds(2), [this](TaskContext /*context*/)
640 {
645 me->SetUninteractible(true);
646 })
647 .Schedule(Seconds(6), [this](TaskContext /*context*/)
648 {
650 me->SetUninteractible(false);
653
655 ladyDeathwhisper->AI()->Talk(SAY_ANIMATE_DEAD);
656 });
657 break;
658 default:
659 break;
660 }
661 }
662
663 void UpdateAI(uint32 diff) override
664 {
666 return;
667
668 _scheduler.Update(diff);
669 }
670
671protected:
674};
675
677{
678 npc_cult_adherent(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
679
680 void Reset() override
681 {
684 .SetValidator([this]
685 {
687 })
688 .Schedule(Seconds(5), [this](TaskContext deathchill)
689 {
692 else
694 deathchill.Repeat(Milliseconds(2500));
695 })
696 .Schedule(Seconds(15), [this](TaskContext shroud_of_the_occult)
697 {
699 shroud_of_the_occult.Repeat(Seconds(10));
700 })
701 .Schedule(Seconds(15), [this](TaskContext curse_of_torpor)
702 {
705 curse_of_torpor.Repeat(Seconds(18));
706 });
707 }
708
709 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
710 {
711 switch (spellInfo->Id)
712 {
715 break;
719 me->AttackStop();
721 break;
727 .Schedule(Seconds(2), [this](TaskContext /*context*/)
728 {
733 me->SetUninteractible(true);
734 })
735 .Schedule(Seconds(6), [this](TaskContext /*context*/)
736 {
738 me->SetUninteractible(false);
742
744 ladyDeathwhisper->AI()->Talk(SAY_ANIMATE_DEAD);
745 });
746 break;
747 default:
748 break;
749 }
750 }
751
752 void UpdateAI(uint32 diff) override
753 {
755 return;
756
757 _scheduler.Update(diff);
758 }
759
760protected:
763};
764
766{
767 npc_vengeful_shade(Creature* creature) : ScriptedAI(creature) { }
768
769 void Reset() override
770 {
773
775 .Schedule(Seconds(2), [this](TaskContext /*context*/)
776 {
779 })
780 .Schedule(Seconds(7), [this](TaskContext /*context*/)
781 {
782 me->KillSelf();
783 });
784 }
785
786 void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
787 {
788 _targetGUID = guid;
789 }
790
791 void SpellHitTarget(WorldObject* /*target*/, SpellInfo const* spellInfo) override
792 {
793 switch (spellInfo->Id)
794 {
799 me->KillSelf();
800 break;
801 default:
802 break;
803 }
804 }
805
806 void UpdateAI(uint32 diff) override
807 {
808 _scheduler.Update(diff);
809 }
810
811private:
814};
815
817{
818 npc_darnavan(Creature* creature) : ScriptedAI(creature)
819 {
820 Initialize();
821 }
822
824 {
825 _canCharge = true;
826 _canShatter = true;
827 }
828
829 void Reset() override
830 {
831 _events.Reset();
836 Initialize();
837 }
838
839 void JustDied(Unit* killer) override
840 {
841 _events.Reset();
842
843 if (!killer)
844 return;
845
846 if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
847 {
848 if (Group* group = owner->GetGroup())
849 {
850 for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
851 if (Player* member = itr->GetSource())
852 if (member->IsInMap(owner))
853 member->FailQuest(QUEST_DEPROGRAMMING);
854 }
855 else
856 owner->FailQuest(QUEST_DEPROGRAMMING);
857 }
858 }
859
860 void MovementInform(uint32 type, uint32 id) override
861 {
862 if (type != POINT_MOTION_TYPE || id != POINT_DESPAWN)
863 return;
864
866 }
867
868 void JustEngagedWith(Unit* /*victim*/) override
869 {
871 }
872
873 void UpdateAI(uint32 diff) override
874 {
875 if (!UpdateVictim())
876 return;
877
878 _events.Update(diff);
879
881 return;
882
884 {
886 _canShatter = false;
888 return;
889 }
890
892 {
894 _canCharge = false;
896 return;
897 }
898
899 while (uint32 eventId = _events.ExecuteEvent())
900 {
901 switch (eventId)
902 {
906 break;
908 _canCharge = true;
909 break;
913 break;
917 break;
919 _canShatter = true;
920 break;
924 break;
925 }
926 }
927 }
928
929private:
933};
934
935// 70842 - Mana Barrier
937{
938 void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
939 {
941 if (Unit* caster = GetCaster())
942 {
943 int32 missingHealth = int32(caster->GetMaxHealth() - caster->GetHealth());
944 caster->ModifyHealth(missingHealth);
945 caster->ModifyPower(POWER_MANA, -missingHealth);
946 }
947 }
948
949 void Register() override
950 {
952 }
953};
954
955// 71289 - Dominate Mind
957{
958 bool Validate(SpellInfo const* /*spell*/) override
959 {
961 }
962
963 void HandleApply(AuraEffect const* /*eff*/, AuraEffectHandleModes /*mode*/)
964 {
965 Unit* target = GetTarget();
966 target->CastSpell(target, SPELL_DOMINATE_MIND_SCALE, true);
967 }
968
969 void Register() override
970 {
972 }
973};
974
975// 72478 - Summon Spirits
977{
978 bool Validate(SpellInfo const* /*spell*/) override
979 {
981 }
982
984 {
986 }
987
988 void Register() override
989 {
991 }
992};
993
994// 70674 - Vampiric Might
996{
997 bool Validate(SpellInfo const* /*spell*/) override
998 {
1000 }
1001
1002 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1003 {
1005 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1006 if (!damageInfo || !damageInfo->GetDamage())
1007 return;
1008
1009 Unit* target = GetTarget();
1010 uint32 damage = damageInfo->GetDamage();
1011 ApplyPct(damage, aurEff->GetAmount());
1012 CastSpellExtraArgs args(aurEff);
1013 args.AddSpellBP0(damage);
1014 target->CastSpell(target, SPELL_VAMPIRIC_MIGHT_PROC, args);
1015 }
1016
1017 void Register() override
1018 {
1020 }
1021};
1022
1023// 69483 - Dark Reckoning
1025{
1026 bool Validate(SpellInfo const* spell) override
1027 {
1028 return ValidateSpellEffect({ { spell->Id, EFFECT_0 } })
1029 && ValidateSpellInfo({ spell->GetEffect(EFFECT_0).TriggerSpell });
1030 }
1031
1032 void OnPeriodic(AuraEffect const* aurEff)
1033 {
1035 if (Unit* caster = GetCaster())
1036 {
1037 uint32 spellId = aurEff->GetSpellEffectInfo().TriggerSpell;
1038 caster->CastSpell(GetTarget(), spellId, aurEff);
1039 }
1040 }
1041
1042 void Register() override
1043 {
1045 }
1046};
1047
1049{
1050 public:
1051 at_lady_deathwhisper_entrance() : OnlyOnceAreaTriggerScript("at_lady_deathwhisper_entrance") { }
1052
1053 bool TryHandleOnce(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1054 {
1055 if (InstanceScript* instance = player->GetInstanceScript())
1056 if (instance->GetBossState(DATA_LADY_DEATHWHISPER) != DONE)
1057 if (Creature* ladyDeathwhisper = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_LADY_DEATHWHISPER)))
1058 ladyDeathwhisper->AI()->DoAction(ACTION_START_INTRO);
1059
1060 return true;
1061 }
1062};
1063
1065{
1066 // Creatures
1072
1073 // Spells
1079
1080 // AreaTriggers
1082}
Actions
First const & RAND(First const &first, Second const &second, Rest const &... rest)
@ DIFFICULTY_10_N
Definition: DBCEnums.h:877
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint64_t uint64
Definition: Define.h:141
uint32_t uint32
Definition: Define.h:142
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition: Duration.h:32
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition: Duration.h:29
std::chrono::minutes Minutes
Minutes shorthand typedef.
Definition: Duration.h:35
@ IN_PROGRESS
@ DONE
@ POINT_MOTION_TYPE
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: ObjectDefines.h:68
std::list< ObjectGuid > GuidList
Definition: ObjectGuid.h:394
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
Spells
Definition: PlayerAI.cpp:32
@ SPELL_BERSERK
Definition: PlayerAI.cpp:371
#define sQuestPoolMgr
Definition: QuestPools.h:63
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_0
Definition: SharedDefines.h:30
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_ATTACK_ME
@ IMMUNITY_STATE
@ IMMUNITY_EFFECT
@ POWER_MANA
@ FACTION_FRIENDLY
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_TAUNT
@ SPELL_AURA_AOE_CHARM
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELLVALUE_MAX_TARGETS
Definition: SpellDefines.h:230
#define AuraEffectProcFn(F, I, N)
Definition: SpellScript.h:2160
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
EvadeReason
Definition: UnitAICommon.h:30
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ REACT_AGGRESSIVE
Definition: UnitDefines.h:508
DamageEffectType
Definition: UnitDefines.h:131
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:145
@ UNIT_STATE_CASTING
Definition: Unit.h:270
T ApplyPct(T &base, U pct)
Definition: Util.h:91
#define NPC_DARNAVAN_CREDIT
@ ACTION_START_INTRO
@ ACTION_COMPLETE_QUEST
@ NPC_DARNAVAN_CREDIT_25
@ NPC_DARNAVAN_CREDIT_10
void AddSC_boss_lady_deathwhisper()
@ SPELL_DARK_MARTYRDOM_ADHERENT_25H
@ SPELL_DARK_MARTYRDOM_ADHERENT
@ SPELL_CLEAR_ALL_DEBUFFS
@ SPELL_DARK_TRANSFORMATION_T
@ SPELL_CURSE_OF_TORPOR
@ SPELL_SUMMON_SPIRITS
@ SPELL_DARK_EMPOWERMENT
@ SPELL_DEATHCHILL_BLAST
@ SPELL_VENGEFUL_BLAST_10H
@ SPELL_DOMINATE_MIND
@ SPELL_FANATIC_S_DETERMINATION
@ SPELL_DARK_TRANSFORMATION
@ SPELL_SUMMON_SHADE
@ SPELL_SHATTERING_THROW
@ SPELL_VENGEFUL_BLAST_PASSIVE
@ SPELL_DARK_EMPOWERMENT_T
@ SPELL_MANA_BARRIER
@ SPELL_DARK_MARTYRDOM_ADHERENT_10H
@ SPELL_TOUCH_OF_INSIGNIFICANCE
@ SPELL_DARK_MARTYRDOM_FANATIC
@ SPELL_VENGEFUL_BLAST_25N
@ SPELL_SHROUD_OF_THE_OCCULT
@ SPELL_DEATH_AND_DECAY
@ SPELL_TELEPORT_VISUAL
@ SPELL_MORTAL_STRIKE
@ SPELL_DARK_MARTYRDOM_T
@ SPELL_DARK_MARTYRDOM_FANATIC_10H
@ SPELL_DEATHCHILL_BOLT
@ SPELL_ADHERENT_S_DETERMINATION
@ SPELL_NECROTIC_STRIKE
@ SPELL_SHADOW_BOLT
@ SPELL_FROSTBOLT_VOLLEY
@ SPELL_SUNDER_ARMOR
@ SPELL_VENGEFUL_BLAST_25H
@ SPELL_DARK_MARTYRDOM_FANATIC_25H
@ SPELL_DOMINATE_MIND_SCALE
@ SPELL_DARK_MARTYRDOM_ADHERENT_25N
@ SPELL_VAMPIRIC_MIGHT_PROC
@ SPELL_VAMPIRIC_MIGHT
@ SPELL_SHADOW_CLEAVE
@ SPELL_INTIMIDATING_SHOUT
@ SPELL_PERMANENT_FEIGN_DEATH
@ SPELL_SHADOW_CHANNELING
@ SPELL_FULL_HOUSE
@ SPELL_DARK_MARTYRDOM_FANATIC_25N
@ SPELL_VENGEFUL_BLAST
@ EVENT_DARNAVAN_INTIMIDATING_SHOUT
@ EVENT_DARNAVAN_SHATTERING_THROW
@ EVENT_DARNAVAN_MORTAL_STRIKE
@ EVENT_DARNAVAN_SUNDER_ARMOR
@ EVENT_DARNAVAN_CHARGE
@ EVENT_DARNAVAN_BLADESTORM
#define NPC_DARNAVAN
uint32 const SummonEntries[2]
@ SAY_ANIMATE_DEAD
@ SAY_DOMINATE_MIND
@ SAY_DARNAVAN_RESCUED
@ SAY_DARK_TRANSFORMATION
@ SAY_DARNAVAN_AGGRO
@ SAY_DARK_EMPOWERMENT
Position const SummonPositions[7]
#define QUEST_DEPROGRAMMING
SpellEffectInfo const & GetSpellEffectInfo() const
int32 GetAmount() const
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
Unit * GetCaster() const
Unit * GetTarget() const
HookList< EffectProcHandler > OnEffectProc
Definition: SpellScript.h:2155
InstanceScript *const instance
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
TaskScheduler scheduler
SummonList summons
void _JustDied()
void DoZoneInCombat()
Definition: CreatureAI.h:161
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
Definition: CreatureAI.cpp:328
Creature *const me
Definition: CreatureAI.h:61
void SetCombatPulseDelay(uint32 delay)
Definition: Creature.h:345
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
Definition: Creature.cpp:2822
void SetReactState(ReactStates st)
Definition: Creature.h:160
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
bool UpdateEntry(uint32 entry, CreatureData const *data=nullptr, bool updateLevel=true)
Definition: Creature.cpp:577
CreatureAI * AI() const
Definition: Creature.h:214
uint32 GetDamage() const
Definition: Unit.h:446
bool Execute(uint64, uint32) override
DaranavanMoveEvent(Creature &darnavan)
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 Reset()
Definition: EventMap.cpp:21
GroupReference * next()
Definition: Group.h:197
virtual bool SetBossState(uint32 id, EncounterState state)
void DoCastSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
virtual ObjectGuid GetGuidData(uint32 type) const override
void DoUpdateCriteria(CriteriaType type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
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={})
void Clear()
Definition: ObjectGuid.h:286
TypeID GetTypeId() const
Definition: Object.h:173
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
static Player * ToPlayer(Object *o)
Definition: Object.h:213
DamageInfo * GetDamageInfo() const
Definition: Unit.h:505
uint32 TriggerSpell
Definition: SpellInfo.h:237
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
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Definition: SpellScript.h:173
Unit * GetCaster() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
iterator begin()
void Summon(Creature const *summon)
iterator end()
StorageType::iterator iterator
TaskContext & Repeat(std::chrono::duration< Rep, Period > duration)
TaskScheduler::repeated_t GetRepeatCounter() const
Returns the repeat counter which increases every time the task is repeated.
TaskScheduler & CancelGroup(group_t group)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< Rep, Period > time, task_handler_t task)
TaskScheduler & Update(success_t const &callback=nullptr)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:159
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
void SelectTargetList(std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:84
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:79
virtual void SetGUID(ObjectGuid const &, int32=0)
Definition: UnitAI.h:75
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:161
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void ApplySpellImmune(uint32 spellId, SpellImmunity op, uint32 type, bool apply)
Definition: Unit.cpp:7845
bool IsWithinMeleeRange(Unit const *obj) const
Definition: Unit.h:699
void SetPower(Powers power, int32 val, bool withPowerUpdate=true)
Definition: Unit.cpp:9419
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:3089
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
bool HasUnitFlag(UnitFlags flags) const
Definition: Unit.h:832
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:11618
int32 GetMaxPower(Powers power) const
Definition: Unit.cpp:9410
void SetUninteractible(bool apply)
Definition: Unit.cpp:8147
Unit * EnsureVictim() const
Definition: Unit.h:717
bool Attack(Unit *victim, bool meleeAttack)
Definition: Unit.cpp:5670
Unit * GetVictim() const
Definition: Unit.h:715
int32 GetPower(Powers power) const
Definition: Unit.cpp:9401
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
Definition: Unit.cpp:7376
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 KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
Definition: Unit.h:921
bool AttackStop()
Definition: Unit.cpp:5781
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1042
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
void setActive(bool isActiveObject)
Definition: Object.cpp:922
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
Definition: Object.cpp:2252
bool TryHandleOnce(Player *player, AreaTriggerEntry const *) override
bool Validate(SpellInfo const *spell) override
void OnPeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
void HandlePeriodicTick(AuraEffect const *)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
@ LIGHT_S_HAMMER_TELEPORT
#define RegisterIcecrownCitadelCreatureAI(ai_name)
@ DATA_LADY_DEATHWHISPER
@ NPC_CULT_ADHERENT
@ NPC_EMPOWERED_ADHERENT
@ NPC_DEFORMED_FANATIC
@ NPC_REANIMATED_ADHERENT
@ NPC_CULT_FANATIC
@ NPC_REANIMATED_FANATIC
@ NPC_VENGEFUL_SHADE
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
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
CastSpellExtraArgs & AddSpellBP0(int32 val)
Definition: SpellDefines.h:475
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
Definition: SpellDefines.h:474
bool IsHeroic() const
void DoStartNoMovement(Unit *target)
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
T const & RAID_MODE(T const &normal10, T const &normal25) const
Difficulty GetDifficulty() const
bool Is25ManRaid() const
void ResetThreatList(Unit *who=nullptr)
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
void JustDied(Unit *killer) override
void KilledUnit(Unit *victim) override
void JustSummoned(Creature *summon) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void SummonedCreatureDies(Creature *summon, Unit *) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *who) override
void Summon(uint32 entry, Position const &pos)
void DoAction(int32 action) override
boss_lady_deathwhisper(Creature *creature)
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
void SpellHitTarget(WorldObject *target, SpellInfo const *spellInfo) override
void EnterEvadeMode(EvadeReason) override
npc_cult_adherent(Creature *creature)
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void UpdateAI(uint32 diff) override
npc_cult_fanatic(Creature *creature)
InstanceScript * _instance
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
void JustDied(Unit *killer) override
npc_darnavan(Creature *creature)
void UpdateAI(uint32 diff) override
void Reset() override
void MovementInform(uint32 type, uint32 id) override
npc_vengeful_shade(Creature *creature)
void SpellHitTarget(WorldObject *, SpellInfo const *spellInfo) override
void SetGUID(ObjectGuid const &guid, int32) override
void UpdateAI(uint32 diff) override