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
147{
150 GROUP_TWO = 2
152
163
168
173
174#define NPC_DARNAVAN RAID_MODE<uint32>(NPC_DARNAVAN_10, NPC_DARNAVAN_25, NPC_DARNAVAN_10, NPC_DARNAVAN_25)
175#define NPC_DARNAVAN_CREDIT RAID_MODE<uint32>(NPC_DARNAVAN_CREDIT_10, NPC_DARNAVAN_CREDIT_25, NPC_DARNAVAN_CREDIT_10, NPC_DARNAVAN_CREDIT_25)
176#define QUEST_DEPROGRAMMING RAID_MODE<uint32>(QUEST_DEPROGRAMMING_10, QUEST_DEPROGRAMMING_25, QUEST_DEPROGRAMMING_10, QUEST_DEPROGRAMMING_25)
177
179
181{
182 {-578.7066f, 2154.167f, 51.01529f, 1.692969f}, // 1 Left Door 1 (Cult Fanatic)
183 {-598.9028f, 2155.005f, 51.01530f, 1.692969f}, // 2 Left Door 2 (Cult Adherent)
184 {-619.2864f, 2154.460f, 51.01530f, 1.692969f}, // 3 Left Door 3 (Cult Fanatic)
185 {-578.6996f, 2269.856f, 51.01529f, 4.590216f}, // 4 Right Door 1 (Cult Adherent)
186 {-598.9688f, 2269.264f, 51.01529f, 4.590216f}, // 5 Right Door 2 (Cult Fanatic)
187 {-619.4323f, 2268.523f, 51.01530f, 4.590216f}, // 6 Right Door 3 (Cult Adherent)
188 {-524.2480f, 2211.920f, 62.90960f, 3.141592f}, // 7 Upper (Random Cultist)
189};
190
192{
193 public:
194 DaranavanMoveEvent(Creature& darnavan) : _darnavan(darnavan) { }
195
196 bool Execute(uint64 /*time*/, uint32 /*diff*/) override
197 {
199 return true;
200 }
201
202 private:
204};
205
207{
210 {
211 Initialize();
212 }
213
215 {
216 _waveCounter = 0;
218 _cultistQueue.clear();
222 {
224 });
225 }
226
237
238 void DoAction(int32 action) override
239 {
240 if (action != ACTION_START_INTRO)
241 return;
242
245 scheduler.Schedule(Seconds(10), GROUP_INTRO, [this](TaskContext& context)
246 {
247 switch (context.GetRepeatCounter())
248 {
249 case 0:
250 Talk(SAY_INTRO_2);
251 context.Repeat(Seconds(21));
252 break;
253 case 1:
254 Talk(SAY_INTRO_3);
255 context.Repeat(Seconds(11));
256 break;
257 case 2:
258 Talk(SAY_INTRO_4);
259 context.Repeat(Seconds(9));
260 break;
261 case 3:
262 Talk(SAY_INTRO_5);
263 context.Repeat(Seconds(21));
264 break;
265 case 4:
266 Talk(SAY_INTRO_6);
267 context.Repeat(Seconds(10));
268 break;
269 case 5:
270 Talk(SAY_INTRO_7);
271 break;
272 default:
273 break;
274 }
275 });
276 }
277
278 void AttackStart(Unit* victim) override
279 {
281 return;
282
283 if (victim && me->Attack(victim, true) && _phase != PHASE_ONE)
284 me->GetMotionMaster()->MoveChase(victim);
285 }
286
287 void JustEngagedWith(Unit* who) override
288 {
290 {
293 return;
294 }
295
297 me->setActive(true);
300 // phase-independent events
302 .Schedule(Minutes(10), [this](TaskContext const& /*context*/)
303 {
306 })
307 .Schedule(Seconds(17), [this](TaskContext& death_and_decay)
308 {
311 death_and_decay.Repeat(Seconds(22), Seconds(30));
312 });
314 scheduler.Schedule(Seconds(27), [this](TaskContext& dominate_mind)
315 {
317 std::list<Unit*> targets;
319 for (Unit* target : targets)
321 dominate_mind.Repeat(Seconds(40), Seconds(45));
322 });
323 // phase one only
325 .Schedule(Seconds(5), GROUP_ONE, [this](TaskContext& wave)
326 {
327 SummonWaveP1();
328 wave.Repeat(Seconds(IsHeroic() ? 45 : 60));
329 })
330 .Schedule(Seconds(2), GROUP_ONE, [this](TaskContext& shadow_bolt)
331 {
333 DoCast(target, SPELL_SHADOW_BOLT);
334 shadow_bolt.Repeat(Milliseconds(2450), Milliseconds(3600));
335 })
336 .Schedule(Seconds(15), GROUP_ONE, [this](TaskContext& context)
337 {
339 context.Repeat(Seconds(25));
340 });
341
343 me->SetCanMelee(false);
348 }
349
350 void JustDied(Unit* killer) override
351 {
353
354 std::set<uint32> livingAddEntries;
355 // Full House achievement
356 for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
357 if (Unit* unit = ObjectAccessor::GetUnit(*me, *itr))
358 if (unit->IsAlive() && unit->GetEntry() != NPC_VENGEFUL_SHADE)
359 livingAddEntries.insert(unit->GetEntry());
360
361 if (livingAddEntries.size() >= 5)
363
365 {
366 if (darnavan->IsAlive())
367 {
368 darnavan->SetFaction(FACTION_FRIENDLY);
369 darnavan->CombatStop(true);
370 darnavan->GetMotionMaster()->MoveIdle();
371 darnavan->SetReactState(REACT_PASSIVE);
372 darnavan->m_Events.AddEvent(new DaranavanMoveEvent(*darnavan), darnavan->m_Events.CalculateTime(10s));
373 darnavan->AI()->Talk(SAY_DARNAVAN_RESCUED);
374
375 if (!killer)
376 return;
377
378 if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
379 {
380 if (Group* group = owner->GetGroup())
381 {
382 for (GroupReference const& itr : group->GetMembers())
383 if (itr.GetSource()->IsInMap(owner))
384 itr.GetSource()->KilledMonsterCredit(NPC_DARNAVAN_CREDIT);
385 }
386 else
387 owner->KilledMonsterCredit(NPC_DARNAVAN_CREDIT);
388 }
389 }
390 }
391
392 _JustDied();
393 }
394
395 void EnterEvadeMode(EvadeReason /*why*/) override
396 {
400 darnavan->DespawnOrUnsummon();
401
403 }
404
405 void KilledUnit(Unit* victim) override
406 {
407 if (victim->GetTypeId() == TYPEID_PLAYER)
408 Talk(SAY_KILL);
409 }
410
411 void DamageTaken(Unit* /*damageDealer*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
412 {
413 // phase transition
414 if (_phase == PHASE_ONE && damage > uint32(me->GetPower(POWER_MANA)))
415 {
421 damage -= me->GetPower(POWER_MANA);
424 me->SetCanMelee(true);
426
428 .Schedule(Seconds(12), GROUP_TWO, [this](TaskContext& frostbolt)
429 {
431 frostbolt.Repeat();
432 })
433 .Schedule(Seconds(20), GROUP_TWO, [this](TaskContext& frostboldVolley)
434 {
436 frostboldVolley.Repeat();
437 })
438 .Schedule(Seconds(6), Seconds(9), GROUP_TWO, [this](TaskContext& touch)
439 {
440 if (me->GetVictim())
442 touch.Repeat();
443 })
444 .Schedule(Seconds(12), GROUP_TWO, [this](TaskContext& summonShade)
445 {
448 me->CastSpell(nullptr, SPELL_SUMMON_SPIRITS, args);
449 summonShade.Repeat();
450 });
451
452 // on heroic mode Lady Deathwhisper is immune to taunt effects in phase 2 and continues summoning adds
453 if (IsHeroic())
454 {
457 scheduler.Schedule(Seconds(), GROUP_TWO, [this](TaskContext& context)
458 {
459 SummonWaveP2();
460 context.Repeat(Seconds(45));
461 });
462 }
463 }
464 }
465
466 void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
467 {
468 if (spellInfo->Id == SPELL_SUMMON_SPIRITS)
469 _nextVengefulShadeTargetGUID.push_back(target->GetGUID());
470 }
471
472 void JustSummoned(Creature* summon) override
473 {
474 switch (summon->GetEntry())
475 {
476 case NPC_DARNAVAN_10:
477 case NPC_DARNAVAN_25:
478 _darnavanGUID = summon->GetGUID();
480 return;
483 break;
486 break;
488 case NPC_CULT_FANATIC:
489 _cultistQueue.push_back(summon->GetGUID());
491 break;
492 default:
493 break;
494 }
495 summons.Summon(summon);
496 }
497
498 void UpdateAI(uint32 diff) override
499 {
500 if (!UpdateVictim() && _phase != PHASE_INTRO)
501 return;
502
503 scheduler.Update(diff);
504 }
505
506 // summoning function for first phase
508 {
509 uint8 addIndex = _waveCounter & 1;
510 uint8 addIndexOther = uint8(addIndex ^ 1);
511
512 // Summon first add, replace it with Darnavan if weekly quest is active
513 if (_waveCounter || !sQuestPoolMgr->IsQuestActive(QUEST_DEPROGRAMMING))
514 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3]);
515 else
516 Summon(NPC_DARNAVAN, SummonPositions[addIndex * 3]);
517
518 Summon(SummonEntries[addIndexOther], SummonPositions[addIndex * 3 + 1]);
519 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3 + 2]);
520 if (Is25ManRaid())
521 {
522 Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3]);
523 Summon(SummonEntries[addIndex], SummonPositions[addIndexOther * 3 + 1]);
524 Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3 + 2]);
526 }
527
528 ++_waveCounter;
529 }
530
531 // summoning function for second phase
533 {
534 if (Is25ManRaid())
535 {
536 uint8 addIndex = _waveCounter & 1;
537 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3]);
538 Summon(SummonEntries[addIndex ^ 1], SummonPositions[addIndex * 3 + 1]);
539 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3+ 2]);
540 }
541 else
543
544 ++_waveCounter;
545 }
546
547 // helper for summoning wave mobs
548 void Summon(uint32 entry, Position const& pos)
549 {
550 if (TempSummon* summon = me->SummonCreature(entry, pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s))
551 summon->CastSpell(summon, SPELL_TELEPORT_VISUAL);
552 }
553
554 void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
555 {
556 if (summon->GetEntry() == NPC_CULT_ADHERENT || summon->GetEntry() == NPC_CULT_FANATIC)
557 _cultistQueue.remove(summon->GetGUID());
558 }
559
561 {
562 if (_cultistQueue.empty())
563 return;
564
568 if (!cultist)
569 return;
570
571 if (RAND(0,1))
573 else
574 {
577 }
578 }
579
580private:
588};
589
591{
592 npc_cult_fanatic(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
593
594 void Reset() override
595 {
598 .SetValidator([this]
599 {
601 })
602 .Schedule(Seconds(17), [this](TaskContext& vampiric_might)
603 {
605 vampiric_might.Repeat(Seconds(25));
606 })
607 .Schedule(Seconds(12), [this](TaskContext& shadow_cleave)
608 {
610 shadow_cleave.Repeat(Seconds(14));
611 })
612 .Schedule(Seconds(10), [this](TaskContext& necrotic_strike)
613 {
615 necrotic_strike.Repeat(Seconds(17));
616 });
617 }
618
619 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
620 {
621 switch (spellInfo->Id)
622 {
626 break;
630 break;
634 me->AttackStop();
636 break;
642 .Schedule(Seconds(2), [this](TaskContext const& /*context*/)
643 {
648 me->SetUninteractible(true);
649 })
650 .Schedule(Seconds(6), [this](TaskContext const& /*context*/)
651 {
653 me->SetUninteractible(false);
656
658 ladyDeathwhisper->AI()->Talk(SAY_ANIMATE_DEAD);
659 });
660 break;
661 default:
662 break;
663 }
664 }
665
666 void UpdateAI(uint32 diff) override
667 {
669 return;
670
671 _scheduler.Update(diff);
672 }
673
674protected:
677};
678
680{
681 npc_cult_adherent(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
682
683 void Reset() override
684 {
687 .SetValidator([this]
688 {
690 })
691 .Schedule(Seconds(5), [this](TaskContext& deathchill)
692 {
695 else
697 deathchill.Repeat(Milliseconds(2500));
698 })
699 .Schedule(Seconds(15), [this](TaskContext& shroud_of_the_occult)
700 {
702 shroud_of_the_occult.Repeat(Seconds(10));
703 })
704 .Schedule(Seconds(15), [this](TaskContext& curse_of_torpor)
705 {
708 curse_of_torpor.Repeat(Seconds(18));
709 });
710 }
711
712 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
713 {
714 switch (spellInfo->Id)
715 {
718 break;
722 me->AttackStop();
724 break;
730 .Schedule(Seconds(2), [this](TaskContext const& /*context*/)
731 {
736 me->SetUninteractible(true);
737 })
738 .Schedule(Seconds(6), [this](TaskContext const& /*context*/)
739 {
741 me->SetUninteractible(false);
745
747 ladyDeathwhisper->AI()->Talk(SAY_ANIMATE_DEAD);
748 });
749 break;
750 default:
751 break;
752 }
753 }
754
755 void UpdateAI(uint32 diff) override
756 {
758 return;
759
760 _scheduler.Update(diff);
761 }
762
763protected:
766};
767
769{
770 npc_vengeful_shade(Creature* creature) : ScriptedAI(creature) { }
771
772 void Reset() override
773 {
776
778 .Schedule(Seconds(2), [this](TaskContext const& /*context*/)
779 {
782 })
783 .Schedule(Seconds(7), [this](TaskContext const& /*context*/)
784 {
785 me->KillSelf();
786 });
787 }
788
789 void SetGUID(ObjectGuid const& guid, int32 id) override
790 {
792 return;
793
794 _targetGUID = guid;
795 }
796
797 void SpellHitTarget(WorldObject* /*target*/, SpellInfo const* spellInfo) override
798 {
799 switch (spellInfo->Id)
800 {
805 me->KillSelf();
806 break;
807 default:
808 break;
809 }
810 }
811
812 void UpdateAI(uint32 diff) override
813 {
814 _scheduler.Update(diff);
815 }
816
817private:
820};
821
823{
824 npc_darnavan(Creature* creature) : ScriptedAI(creature)
825 {
826 Initialize();
827 }
828
830 {
831 _canCharge = true;
832 _canShatter = true;
833 }
834
844
845 void JustDied(Unit* killer) override
846 {
847 _events.Reset();
848
849 if (!killer)
850 return;
851
852 if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
853 {
854 if (Group* group = owner->GetGroup())
855 {
856 for (GroupReference const& itr : group->GetMembers())
857 if (itr.GetSource()->IsInMap(owner))
858 itr.GetSource()->FailQuest(QUEST_DEPROGRAMMING);
859 }
860 else
861 owner->FailQuest(QUEST_DEPROGRAMMING);
862 }
863 }
864
865 void MovementInform(uint32 type, uint32 id) override
866 {
867 if (type != POINT_MOTION_TYPE || id != POINT_DESPAWN)
868 return;
869
871 }
872
873 void JustEngagedWith(Unit* /*victim*/) override
874 {
876 }
877
878 void UpdateAI(uint32 diff) override
879 {
880 if (!UpdateVictim())
881 return;
882
883 _events.Update(diff);
884
886 return;
887
889 {
891 _canShatter = false;
893 return;
894 }
895
897 {
899 _canCharge = false;
901 return;
902 }
903
904 while (uint32 eventId = _events.ExecuteEvent())
905 {
906 switch (eventId)
907 {
911 break;
913 _canCharge = true;
914 break;
918 break;
922 break;
924 _canShatter = true;
925 break;
929 break;
930 }
931 }
932 }
933
934private:
938};
939
940// 70842 - Mana Barrier
942{
943 void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
944 {
946 if (Unit* caster = GetCaster())
947 {
948 int32 missingHealth = int32(caster->GetMaxHealth() - caster->GetHealth());
949 caster->ModifyHealth(missingHealth);
950 caster->ModifyPower(POWER_MANA, -missingHealth);
951 }
952 }
953
958};
959
960// 71289 - Dominate Mind
962{
963 bool Validate(SpellInfo const* /*spell*/) override
964 {
966 }
967
968 void HandleApply(AuraEffect const* /*eff*/, AuraEffectHandleModes /*mode*/)
969 {
970 Unit* target = GetTarget();
971 target->CastSpell(target, SPELL_DOMINATE_MIND_SCALE, true);
972 }
973
978};
979
980// 72478 - Summon Spirits
998
999// 70674 - Vampiric Might
1001{
1002 bool Validate(SpellInfo const* /*spell*/) override
1003 {
1005 }
1006
1007 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1008 {
1010 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1011 if (!damageInfo || !damageInfo->GetDamage())
1012 return;
1013
1014 Unit* target = GetTarget();
1015 uint32 damage = damageInfo->GetDamage();
1016 ApplyPct(damage, aurEff->GetAmount());
1017 CastSpellExtraArgs args(aurEff);
1018 args.AddSpellBP0(damage);
1019 target->CastSpell(target, SPELL_VAMPIRIC_MIGHT_PROC, args);
1020 }
1021
1026};
1027
1028// 69483 - Dark Reckoning
1030{
1031 bool Validate(SpellInfo const* spell) override
1032 {
1033 return ValidateSpellEffect({ { spell->Id, EFFECT_0 } })
1034 && ValidateSpellInfo({ spell->GetEffect(EFFECT_0).TriggerSpell });
1035 }
1036
1037 void OnPeriodic(AuraEffect const* aurEff)
1038 {
1040 if (Unit* caster = GetCaster())
1041 {
1042 uint32 spellId = aurEff->GetSpellEffectInfo().TriggerSpell;
1043 caster->CastSpell(GetTarget(), spellId, aurEff);
1044 }
1045 }
1046
1051};
1052
1054{
1055 public:
1056 at_lady_deathwhisper_entrance() : OnlyOnceAreaTriggerScript("at_lady_deathwhisper_entrance") { }
1057
1058 bool TryHandleOnce(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
1059 {
1060 if (InstanceScript* instance = player->GetInstanceScript())
1061 if (instance->GetBossState(DATA_LADY_DEATHWHISPER) != DONE)
1062 if (Creature* ladyDeathwhisper = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_LADY_DEATHWHISPER)))
1063 ladyDeathwhisper->AI()->DoAction(ACTION_START_INTRO);
1064
1065 return true;
1066 }
1067};
1068
First const & RAND(First const &first, Second const &second, Rest const &... rest)
@ DIFFICULTY_10_N
Definition DBCEnums.h:936
uint8_t uint8
Definition Define.h:156
int32_t int32
Definition Define.h:150
uint64_t uint64
Definition Define.h:153
uint32_t uint32
Definition Define.h:154
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:24
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition Duration.h:28
std::chrono::minutes Minutes
Minutes shorthand typedef.
Definition Duration.h:32
@ IN_PROGRESS
@ DONE
@ POINT_MOTION_TYPE
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
std::list< ObjectGuid > GuidList
Definition ObjectGuid.h:433
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
Spells
Definition PlayerAI.cpp:32
@ SPELL_BERSERK
Definition PlayerAI.cpp:371
#define sQuestPoolMgr
Definition QuestPools.h:68
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ 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
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
EvadeReason
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
DamageEffectType
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_STATE_CASTING
Definition Unit.h:276
T ApplyPct(T &base, U pct)
Definition Util.h:91
#define NPC_DARNAVAN_CREDIT
@ ACTION_COMPLETE_QUEST
@ NPC_DARNAVAN_CREDIT_25
@ NPC_DARNAVAN_CREDIT_10
@ DATA_VENGEFUL_SHADE_TARGET_GUID
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_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
@ 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_DARNAVAN_RESCUED
@ SAY_DARK_TRANSFORMATION
@ SAY_DARK_EMPOWERMENT
Position const SummonPositions[7]
#define QUEST_DEPROGRAMMING
SpellEffectInfo const & GetSpellEffectInfo() const
SpellEffectValue GetAmount() const
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
Unit * GetCaster() const
Unit * GetTarget() const
HookList< EffectProcHandler > OnEffectProc
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
TypeID GetTypeId() const
Definition BaseEntity.h:166
InstanceScript *const instance
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
TaskScheduler scheduler
SummonList summons
void DoZoneInCombat()
Definition CreatureAI.h:169
bool UpdateVictim()
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
Creature *const me
Definition CreatureAI.h:63
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
void SetReactState(ReactStates st)
Definition Creature.h:174
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool UpdateEntry(uint32 entry, CreatureData const *data=nullptr, bool updateLevel=true)
Definition Creature.cpp:593
CreatureAI * AI() const
Definition Creature.h:228
uint32 GetDamage() const
Definition Unit.h:452
bool Execute(uint64, uint32) override
DaranavanMoveEvent(Creature &darnavan)
uint32 ExecuteEvent()
Definition EventMap.cpp:77
void Update(uint32 time)
Definition EventMap.h:61
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
void Reset()
Definition EventMap.cpp:25
Definition Group.h:205
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={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void Clear()
Definition ObjectGuid.h:329
Player * ToPlayer()
Definition Object.h:126
uint32 GetEntry() const
Definition Object.h:89
DamageInfo * GetDamageInfo() const
Definition Unit.h:511
uint32 TriggerSpell
Definition SpellInfo.h:234
uint32 const Id
Definition SpellInfo.h:328
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:588
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Unit * GetCaster() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
iterator begin()
void Summon(Creature const *summon)
iterator end()
StorageType::iterator iterator
TaskScheduler::repeated_t GetRepeatCounter() const
Returns the repeat counter which increases every time the task is repeated.
TaskContext & Repeat(TaskScheduler::duration_t duration)
TaskScheduler & CancelGroup(group_t group)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
TaskScheduler & Update()
Update the scheduler to the current time.
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
virtual void SetGUID(ObjectGuid const &guid, int32 id)
Definition UnitAI.h:76
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
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:162
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
void ApplySpellImmune(uint32 spellId, SpellImmunity op, uint32 type, bool apply)
Definition Unit.cpp:8242
bool IsWithinMeleeRange(Unit const *obj) const
Definition Unit.h:710
void SetPower(Powers power, int32 val, bool withPowerUpdate=true)
Definition Unit.cpp:10046
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition Unit.cpp:3231
MotionMaster * GetMotionMaster()
Definition Unit.h:1723
bool HasUnitFlag(UnitFlags flags) const
Definition Unit.h:845
Aura * AddAura(uint32 spellId, Unit *target)
Definition Unit.cpp:12249
int32 GetMaxPower(Powers power) const
Definition Unit.cpp:10037
void SetUninteractible(bool apply)
Definition Unit.cpp:8564
Unit * EnsureVictim() const
Definition Unit.h:728
bool Attack(Unit *victim, bool meleeAttack)
Definition Unit.cpp:5853
Unit * GetVictim() const
Definition Unit.h:726
int32 GetPower(Powers power) const
Definition Unit.cpp:10028
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
Definition Unit.cpp:7855
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4804
void KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
Definition Unit.h:936
bool AttackStop()
Definition Unit.cpp:5965
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3974
InstanceScript * GetInstanceScript() const
Definition Object.cpp:396
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2217
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:1398
void setActive(bool isActiveObject)
Definition Object.cpp:276
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
Definition Object.cpp:1621
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) -> std::add_const_t< decltype(*std::ranges::begin(container))> &
Definition Containers.h:110
CastSpellExtraArgs & AddSpellBP0(SpellEffectValue val)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
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
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 SetGUID(ObjectGuid const &guid, int32 id) override
void SpellHitTarget(WorldObject *, SpellInfo const *spellInfo) override
void UpdateAI(uint32 diff) override