TrinityCore
Loading...
Searching...
No Matches
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
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
137
145
152
163
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
201// 36855 - Lady Deathwhisper
203{
206 {
207 Initialize();
208 }
209
211 {
212 _waveCounter = 0;
214 _cultistQueue.clear();
218 {
220 });
221 }
222
233
234 void DoAction(int32 action) override
235 {
236 if (action != ACTION_START_INTRO)
237 return;
238
241 scheduler.Schedule(10s, GROUP_INTRO, [this](TaskContext context)
242 {
243 switch (context.GetRepeatCounter())
244 {
245 case 0:
246 Talk(SAY_INTRO_2);
247 context.Repeat(21s);
248 break;
249 case 1:
250 Talk(SAY_INTRO_3);
251 context.Repeat(11s);
252 break;
253 case 2:
254 Talk(SAY_INTRO_4);
255 context.Repeat(9s);
256 break;
257 case 3:
258 Talk(SAY_INTRO_5);
259 context.Repeat(21s);
260 break;
261 case 4:
262 Talk(SAY_INTRO_6);
263 context.Repeat(10s);
264 break;
265 case 5:
266 Talk(SAY_INTRO_7);
267 return;
268 default:
269 break;
270 }
271 });
272 }
273
274 void AttackStart(Unit* victim) override
275 {
277 return;
278
279 if (victim && me->Attack(victim, true) && _phase != PHASE_ONE)
280 me->GetMotionMaster()->MoveChase(victim);
281 }
282
283 void JustEngagedWith(Unit* who) override
284 {
286 {
289 return;
290 }
291
294 me->setActive(true);
297 // phase-independent events
299 .Schedule(10min, [this](TaskContext /*context*/)
300 {
303 })
304 .Schedule(17s, [this](TaskContext death_and_decay)
305 {
308 death_and_decay.Repeat(22s, 30s);
309 });
311 scheduler.Schedule(27s, [this](TaskContext dominate_mind)
312 {
314 std::list<Unit*> targets;
316 for (Unit* target : targets)
318 dominate_mind.Repeat(40s, 45s);
319 });
320 // phase one only
322 .Schedule(5s, GROUP_ONE, [this](TaskContext wave)
323 {
324 SummonWaveP1();
325 wave.Repeat(IsHeroic() ? 45s : 60s);
326 })
327 .Schedule(2s, GROUP_ONE, [this](TaskContext shadow_bolt)
328 {
330 DoCast(target, SPELL_SHADOW_BOLT);
331 shadow_bolt.Repeat(2450ms, 3600ms);
332 })
333 .Schedule(15s, GROUP_ONE, [this](TaskContext context)
334 {
336 context.Repeat(25s);
337 });
338
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 > me->GetPower(POWER_MANA))
412 {
418 damage -= me->GetPower(POWER_MANA);
422
424 .Schedule(12s, GROUP_TWO, [this](TaskContext frostbolt)
425 {
427 frostbolt.Repeat();
428 })
429 .Schedule(20s, GROUP_TWO, [this](TaskContext frostboldVolley)
430 {
432 frostboldVolley.Repeat();
433 })
434 .Schedule(6s, 9s, GROUP_TWO, [this](TaskContext touch)
435 {
436 if (me->GetVictim())
438 touch.Repeat();
439 })
440 .Schedule(12s, GROUP_TWO, [this](TaskContext summonShade)
441 {
444 me->CastSpell(nullptr, SPELL_SUMMON_SPIRITS, args);
445 summonShade.Repeat();
446 });
447
448 // on heroic mode Lady Deathwhisper is immune to taunt effects in phase 2 and continues summoning adds
449 if (IsHeroic())
450 {
453 scheduler.Schedule(0s, GROUP_TWO, [this](TaskContext context)
454 {
455 SummonWaveP2();
456 context.Repeat(45s);
457 });
458 }
459 }
460 }
461
462 void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
463 {
464 if (spellInfo->Id == SPELL_SUMMON_SPIRITS)
465 _nextVengefulShadeTargetGUID.push_back(target->GetGUID());
466 }
467
468 void JustSummoned(Creature* summon) override
469 {
470 switch (summon->GetEntry())
471 {
472 case NPC_DARNAVAN_10:
473 case NPC_DARNAVAN_25:
474 _darnavanGUID = summon->GetGUID();
476 return;
479 break;
480 summon->AI()->SetGUID(_nextVengefulShadeTargetGUID.front());
482 break;
484 case NPC_CULT_FANATIC:
485 _cultistQueue.push_back(summon->GetGUID());
487 break;
488 default:
489 break;
490 }
491 summons.Summon(summon);
492 }
493
494 void UpdateAI(uint32 diff) override
495 {
496 if (!UpdateVictim() && _phase != PHASE_INTRO)
497 return;
498
499 scheduler.Update(diff, [this]
500 {
501 // We should not melee attack when barrier is up
504 });
505 }
506
507 // summoning function for first phase
509 {
510 uint8 addIndex = _waveCounter & 1;
511 uint8 addIndexOther = uint8(addIndex ^ 1);
512
513 // Summon first add, replace it with Darnavan if weekly quest is active
514 if (_waveCounter || !sQuestPoolMgr->IsQuestActive(QUEST_DEPROGRAMMING))
515 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3]);
516 else
517 Summon(NPC_DARNAVAN, SummonPositions[addIndex * 3]);
518
519 Summon(SummonEntries[addIndexOther], SummonPositions[addIndex * 3 + 1]);
520 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3 + 2]);
521 if (Is25ManRaid())
522 {
523 Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3]);
524 Summon(SummonEntries[addIndex], SummonPositions[addIndexOther * 3 + 1]);
525 Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3 + 2]);
527 }
528
529 ++_waveCounter;
530 }
531
532 // summoning function for second phase
534 {
535 if (Is25ManRaid())
536 {
537 uint8 addIndex = _waveCounter & 1;
538 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3]);
539 Summon(SummonEntries[addIndex ^ 1], SummonPositions[addIndex * 3 + 1]);
540 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3+ 2]);
541 }
542 else
544
545 ++_waveCounter;
546 }
547
548 // helper for summoning wave mobs
549 void Summon(uint32 entry, Position const& pos)
550 {
551 if (TempSummon* summon = me->SummonCreature(entry, pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s))
552 summon->CastSpell(summon, SPELL_TELEPORT_VISUAL);
553 }
554
555 void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
556 {
557 if (summon->GetEntry() == NPC_CULT_ADHERENT || summon->GetEntry() == NPC_CULT_FANATIC)
558 _cultistQueue.remove(summon->GetGUID());
559 }
560
562 {
563 if (_cultistQueue.empty())
564 return;
565
569 if (!cultist)
570 return;
571
572 if (RAND(0,1))
574 else
575 {
578 }
579 }
580
581private:
589};
590
591/* 37890 - Cult Fanatic
592 38009 - Reanimated Fanatic
593 38135 - Deformed Fanatic */
595{
596 npc_cult_fanatic(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
597
598 void Reset() override
599 {
602 .SetValidator([this]
603 {
605 })
606 .Schedule(17s, [this](TaskContext vampiric_might)
607 {
609 vampiric_might.Repeat(25s);
610 })
611 .Schedule(12s, [this](TaskContext shadow_cleave)
612 {
614 shadow_cleave.Repeat(14s);
615 })
616 .Schedule(10s, [this](TaskContext necrotic_strike)
617 {
619 necrotic_strike.Repeat(17s);
620 });
621 }
622
623 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
624 {
625 switch (spellInfo->Id)
626 {
630 break;
634 break;
638 me->AttackStop();
640 break;
646 .Schedule(2s, [this](TaskContext /*context*/)
647 {
653 })
654 .Schedule(6s, [this](TaskContext /*context*/)
655 {
660
662 ladyDeathwhisper->AI()->Talk(SAY_ANIMATE_DEAD);
663 });
664 break;
665 default:
666 break;
667 }
668 }
669
670 void UpdateAI(uint32 diff) override
671 {
673 return;
674
675 _scheduler.Update(diff, [this]
676 {
678 });
679 }
680
681protected:
684};
685
686/* 37949 - Cult Adherent
687 38010 - Reanimated Adherent
688 38136 - Empowered Adherent */
690{
691 npc_cult_adherent(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
692
693 void Reset() override
694 {
697 .SetValidator([this]
698 {
700 })
701 .Schedule(5s, [this](TaskContext deathchill)
702 {
705 else
707 deathchill.Repeat(2500ms);
708 })
709 .Schedule(15s, [this](TaskContext shroud_of_the_occult)
710 {
712 shroud_of_the_occult.Repeat(10s);
713 })
714 .Schedule(15s, [this](TaskContext curse_of_torpor)
715 {
718 curse_of_torpor.Repeat(18s);
719 });
720 }
721
722 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
723 {
724 switch (spellInfo->Id)
725 {
728 break;
732 me->AttackStop();
734 break;
740 .Schedule(2s, [this](TaskContext /*context*/)
741 {
747 })
748 .Schedule(6s, [this](TaskContext /*context*/)
749 {
755
757 ladyDeathwhisper->AI()->Talk(SAY_ANIMATE_DEAD);
758 });
759 break;
760 default:
761 break;
762 }
763 }
764
765 void UpdateAI(uint32 diff) override
766 {
768 return;
769
770 _scheduler.Update(diff);
771 }
772
773protected:
776};
777
778// 38222 - Vengeful Shade
780{
781 npc_vengeful_shade(Creature* creature) : ScriptedAI(creature) { }
782
783 void Reset() override
784 {
787
789 .Schedule(2s, [this](TaskContext /*context*/)
790 {
793 })
794 .Schedule(7s, [this](TaskContext /*context*/)
795 {
796 me->KillSelf();
797 });
798 }
799
800 void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
801 {
802 _targetGUID = guid;
803 }
804
805 void SpellHitTarget(WorldObject* /*target*/, SpellInfo const* spellInfo) override
806 {
807 switch (spellInfo->Id)
808 {
813 me->KillSelf();
814 break;
815 default:
816 break;
817 }
818 }
819
820 void UpdateAI(uint32 diff) override
821 {
822 _scheduler.Update(diff, [this]
823 {
825 });
826 }
827
828private:
831};
832
833// 38472, 38485 - Darnavan
835{
836 npc_darnavan(Creature* creature) : ScriptedAI(creature)
837 {
838 Initialize();
839 }
840
842 {
843 _canCharge = true;
844 _canShatter = true;
845 }
846
856
857 void JustDied(Unit* killer) override
858 {
859 _events.Reset();
860
861 if (!killer)
862 return;
863
864 if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
865 {
866 if (Group* group = owner->GetGroup())
867 {
868 for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
869 if (Player* member = itr->GetSource())
870 if (member->IsInMap(owner))
871 member->FailQuest(QUEST_DEPROGRAMMING);
872 }
873 else
874 owner->FailQuest(QUEST_DEPROGRAMMING);
875 }
876 }
877
878 void MovementInform(uint32 type, uint32 id) override
879 {
880 if (type != POINT_MOTION_TYPE || id != POINT_DESPAWN)
881 return;
882
884 }
885
886 void JustEngagedWith(Unit* /*victim*/) override
887 {
889 }
890
891 void UpdateAI(uint32 diff) override
892 {
893 if (!UpdateVictim())
894 return;
895
896 _events.Update(diff);
897
899 return;
900
902 {
904 _canShatter = false;
906 return;
907 }
908
910 {
912 _canCharge = false;
914 return;
915 }
916
917 while (uint32 eventId = _events.ExecuteEvent())
918 {
919 switch (eventId)
920 {
924 break;
926 _canCharge = true;
927 break;
931 break;
935 break;
937 _canShatter = true;
938 break;
942 break;
943 }
944 }
945
947 }
948
949private:
953};
954
955// 70842 - Mana Barrier
957{
959
960 void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
961 {
963 if (Unit* caster = GetCaster())
964 {
965 int32 missingHealth = int32(caster->GetMaxHealth() - caster->GetHealth());
966 caster->ModifyHealth(missingHealth);
967 caster->ModifyPower(POWER_MANA, -missingHealth);
968 }
969 }
970
975};
976
977// 71289 - Dominate Mind
998
999// 72478 - Summon Spirits
1019
1020// 70674 - Vampiric Might
1022{
1024
1025 bool Validate(SpellInfo const* /*spell*/) override
1026 {
1028 }
1029
1030 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1031 {
1033 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1034 if (!damageInfo || !damageInfo->GetDamage())
1035 return;
1036
1037 Unit* target = GetTarget();
1038 uint32 damage = damageInfo->GetDamage();
1039 ApplyPct(damage, aurEff->GetAmount());
1040 CastSpellExtraArgs args(aurEff);
1041 args.AddSpellBP0(damage);
1042 target->CastSpell(target, SPELL_VAMPIRIC_MIGHT_PROC, args);
1043 }
1044
1049};
1050
1051// 69483 - Dark Reckoning
1053{
1055
1056 bool Validate(SpellInfo const* spell) override
1057 {
1058 return ValidateSpellInfo({ spell->GetEffect(EFFECT_0).TriggerSpell });
1059 }
1060
1061 void OnPeriodic(AuraEffect const* aurEff)
1062 {
1064 if (Unit* caster = GetCaster())
1065 {
1067 caster->CastSpell(GetTarget(), spellId, aurEff);
1068 }
1069 }
1070
1075};
1076
1078{
1079 public:
1080 at_lady_deathwhisper_entrance() : OnlyOnceAreaTriggerScript("at_lady_deathwhisper_entrance") { }
1081
1082 bool TryHandleOnce(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1083 {
1084 if (InstanceScript* instance = player->GetInstanceScript())
1085 if (instance->GetBossState(DATA_LADY_DEATHWHISPER) != DONE)
1086 if (Creature* ladyDeathwhisper = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_LADY_DEATHWHISPER)))
1087 ladyDeathwhisper->AI()->DoAction(ACTION_START_INTRO);
1088
1089 return true;
1090 }
1091};
1092
First const & RAND(First const &first, Second const &second, Rest const &... rest)
@ RAID_DIFFICULTY_10MAN_NORMAL
Definition DBCEnums.h:286
@ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET
Definition DBCEnums.h:154
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint64_t uint64
Definition Define.h:132
uint32_t uint32
Definition Define.h:133
@ IN_PROGRESS
@ DONE
@ POINT_MOTION_TYPE
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
std::list< ObjectGuid > GuidList
Definition ObjectGuid.h:261
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
@ 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:1128
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_ATTACK_ME
@ SPELL_SCHOOL_MASK_NORMAL
@ 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
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_UNINTERACTIBLE
@ UNIT_STATE_CASTING
Definition Unit.h:235
DamageEffectType
Definition Unit.h:352
T ApplyPct(T &base, U pct)
Definition Util.h:83
@ ACTION_COMPLETE_QUEST
@ NPC_DARNAVAN_CREDIT_25
@ NPC_DARNAVAN_CREDIT_10
#define NPC_DARNAVAN_CREDIT
@ 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_SHATTERING_THROW
@ SPELL_VENGEFUL_BLAST_PASSIVE
@ SPELL_DARK_EMPOWERMENT_T
@ 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_DARK_MARTYRDOM_T
@ SPELL_DARK_MARTYRDOM_FANATIC_10H
@ SPELL_DEATHCHILL_BOLT
@ SPELL_ADHERENT_S_DETERMINATION
@ SPELL_NECROTIC_STRIKE
@ SPELL_FROSTBOLT_VOLLEY
@ 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_DARK_MARTYRDOM_FANATIC_25N
void AddSC_boss_lady_deathwhisper()
#define NPC_DARNAVAN
uint32 const SummonEntries[2]
@ SAY_DARNAVAN_RESCUED
@ SAY_DARK_TRANSFORMATION
@ SAY_DARK_EMPOWERMENT
@ EVENT_DARNAVAN_INTIMIDATING_SHOUT
@ EVENT_DARNAVAN_SHATTERING_THROW
@ EVENT_DARNAVAN_MORTAL_STRIKE
@ EVENT_DARNAVAN_SUNDER_ARMOR
@ EVENT_DARNAVAN_CHARGE
@ EVENT_DARNAVAN_BLADESTORM
Position const SummonPositions[7]
#define QUEST_DEPROGRAMMING
int32 GetAmount() const
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
HookList< EffectApplyHandler > AfterEffectApply
Unit * GetCaster() const
Unit * GetTarget() const
HookList< EffectProcHandler > OnEffectProc
InstanceScript *const instance
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
TaskScheduler scheduler
SummonList summons
@ EVADE_REASON_SEQUENCE_BREAK
Definition CreatureAI.h:97
void DoZoneInCombat(Creature *creature=nullptr)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
void SetCombatPulseDelay(uint32 delay)
Definition Creature.h:269
void SetReactState(ReactStates st)
Definition Creature.h:119
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool UpdateEntry(uint32 entry, CreatureData const *data=nullptr, bool updateLevel=true)
Definition Creature.cpp:540
CreatureAI * AI() const
Definition Creature.h:154
uint32 GetDamage() const
Definition Unit.h:464
bool Execute(uint64, uint32) override
DaranavanMoveEvent(Creature &darnavan)
void Update(uint32 time)
Definition EventMap.h:67
EventId ExecuteEvent()
Definition EventMap.cpp:73
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
void Reset()
Definition EventMap.cpp:21
GroupReference * next()
Definition Group.h:165
virtual bool SetBossState(uint32 id, EncounterState state)
void DoCastSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
virtual ObjectGuid GetGuidData(uint32 type) const override
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={})
void Clear()
Definition ObjectGuid.h:150
TypeID GetTypeId() const
Definition Object.h:93
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
static Player * ToPlayer(Object *o)
Definition Object.h:180
DamageInfo * GetDamageInfo() const
Definition Unit.h:519
uint32 TriggerSpell
Definition SpellInfo.h:228
uint32 Id
Definition SpellInfo.h:289
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:483
Unit * GetCaster() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
iterator begin()
void Summon(Creature const *summon)
iterator end()
StorageType::iterator iterator
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
TaskScheduler::repeated_t GetRepeatCounter() const
Returns the repeat counter which increases every time the task is repeated.
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
TaskScheduler & CancelGroup(group_t const group)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:166
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:101
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:96
virtual void SetGUID(ObjectGuid const &, int32=0)
Definition UnitAI.h:157
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:30
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:243
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
bool IsWithinMeleeRange(Unit const *obj) const
Definition Unit.h:844
void KillSelf(bool durabilityLoss=true)
Definition Unit.h:1023
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition Unit.cpp:3093
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
bool HasUnitFlag(UnitFlags flags) const
Definition Unit.h:953
Aura * AddAura(uint32 spellId, Unit *target)
Definition Unit.cpp:11964
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
Unit * EnsureVictim() const
Definition Unit.h:861
bool Attack(Unit *victim, bool meleeAttack)
Definition Unit.cpp:5535
uint32 GetMaxPower(Powers power) const
Definition Unit.h:936
void SetPower(Powers power, uint32 val, bool withPowerUpdate=true, bool force=false)
Definition Unit.cpp:9421
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
Unit * GetVictim() const
Definition Unit.h:859
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
Definition Unit.cpp:7639
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
Definition Unit.cpp:8142
uint32 GetPower(Powers power) const
Definition Unit.h:934
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:954
bool AttackStop()
Definition Unit.cpp:5645
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:955
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1087
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition Object.cpp:1992
void setActive(bool isActiveObject)
Definition Object.cpp:991
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
Definition Object.cpp:2203
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool TryHandleOnce(Player *player, AreaTriggerEntry const *) override
PrepareAuraScript(spell_deathwhisper_dark_reckoning)
bool Validate(SpellInfo const *spell) override
void OnPeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_deathwhisper_dominated_mind)
void HandlePeriodicTick(AuraEffect const *)
PrepareAuraScript(spell_deathwhisper_mana_barrier)
PrepareSpellScript(spell_deathwhisper_summon_spirits)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_deathwhisper_vampiric_might)
@ 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:108
CastSpellExtraArgs & AddSpellBP0(int32 val)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
bool IsHeroic() const
void DoStartNoMovement(Unit *target)
void AttackStart(Unit *) override
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
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)
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 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