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)
182 {-578.7066f, 2154.167f, 51.01529f, 1.692969f},
183 {-598.9028f, 2155.005f, 51.01530f, 1.692969f},
184 {-619.2864f, 2154.460f, 51.01530f, 1.692969f},
185 {-578.6996f, 2269.856f, 51.01529f, 4.590216f},
186 {-598.9688f, 2269.264f, 51.01529f, 4.590216f},
187 {-619.4323f, 2268.523f, 51.01530f, 4.590216f},
188 {-524.2480f, 2211.920f, 62.90960f, 3.141592f},
308 .Schedule(17s, [
this](
TaskContext& death_and_decay)
312 death_and_decay.
Repeat(22s, 30s);
318 std::list<Unit*> targets;
320 for (
Unit* target : targets)
322 dominate_mind.
Repeat(40s, 45s);
335 shadow_bolt.
Repeat(2450ms, 3600ms);
355 std::set<uint32> livingAddEntries;
360 livingAddEntries.insert(unit->GetEntry());
362 if (livingAddEntries.size() >= 5)
367 if (darnavan->IsAlive())
370 darnavan->CombatStop(
true);
371 darnavan->GetMotionMaster()->MoveIdle();
373 darnavan->m_Events.AddEvent(
new DaranavanMoveEvent(*darnavan), darnavan->m_Events.CalculateTime(10s));
381 if (
Group* group = owner->GetGroup())
384 if (itr.GetSource()->IsInMap(owner))
401 darnavan->DespawnOrUnsummon();
609 vampiric_might.
Repeat(25s);
614 shadow_cleave.
Repeat(14s);
616 .Schedule(10s, [
this](
TaskContext& necrotic_strike)
619 necrotic_strike.
Repeat(17s);
625 switch (spellInfo->
Id)
704 deathchill.
Repeat(2500ms);
706 .Schedule(15s, [
this](
TaskContext& shroud_of_the_occult)
709 shroud_of_the_occult.
Repeat(10s);
711 .Schedule(15s, [
this](
TaskContext& curse_of_torpor)
715 curse_of_torpor.
Repeat(18s);
721 switch (spellInfo->
Id)
807 switch (spellInfo->
Id)
863 if (
Group* group = owner->GetGroup())
866 if (itr.GetSource()->IsInMap(owner))
957 int32 missingHealth =
int32(caster->GetMaxHealth() - caster->GetHealth());
958 caster->ModifyHealth(missingHealth);
959 caster->ModifyPower(
POWER_MANA, -missingHealth);
1020 if (!damageInfo || !damageInfo->
GetDamage())
1052 caster->CastSpell(
GetTarget(), spellId, aurEff);
First const & RAND(First const &first, Second const &second, Rest const &... rest)
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
std::list< ObjectGuid > GuidList
uint32 urand(uint32 min, uint32 max)
#define RegisterSpellScript(spell_script)
@ SPELL_SCHOOL_MASK_NORMAL
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
@ UNIT_FLAG_NON_ATTACKABLE
T ApplyPct(T &base, U pct)
#define NPC_DARNAVAN_CREDIT
@ SPELL_DARK_MARTYRDOM_ADHERENT_25H
@ SPELL_DARK_MARTYRDOM_ADHERENT
@ SPELL_CLEAR_ALL_DEBUFFS
@ SPELL_DARK_TRANSFORMATION_T
@ SPELL_VENGEFUL_BLAST_10H
@ SPELL_FANATIC_S_DETERMINATION
@ SPELL_DARK_TRANSFORMATION
@ 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_DARK_MARTYRDOM_FANATIC_10H
@ SPELL_ADHERENT_S_DETERMINATION
@ SPELL_VENGEFUL_BLAST_25H
@ SPELL_DARK_MARTYRDOM_FANATIC_25H
@ SPELL_DOMINATE_MIND_SCALE
@ SPELL_DARK_MARTYRDOM_ADHERENT_25N
@ SPELL_VAMPIRIC_MIGHT_PROC
@ SPELL_INTIMIDATING_SHOUT
@ SPELL_PERMANENT_FEIGN_DEATH
@ SPELL_SHADOW_CHANNELING
@ SPELL_DARK_MARTYRDOM_FANATIC_25N
@ DATA_VENGEFUL_SHADE_TARGET_GUID
void AddSC_boss_lady_deathwhisper()
uint32 const SummonEntries[2]
@ SAY_DARK_TRANSFORMATION
@ EVENT_DARNAVAN_INTIMIDATING_SHOUT
@ EVENT_DARNAVAN_SHATTERING_THROW
@ EVENT_DARNAVAN_MORTAL_STRIKE
@ EVENT_DARNAVAN_SUNDER_ARMOR
@ EVENT_DARNAVAN_BLADESTORM
Position const SummonPositions[7]
#define QUEST_DEPROGRAMMING
SpellEffectInfo const & GetSpellEffectInfo() const
SpellEffectValue GetAmount() const
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectProcHandler > OnEffectProc
ObjectGuid const & GetGUID() const
InstanceScript *const instance
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool UpdateEntry(uint32 entry, CreatureData const *data=nullptr, bool updateLevel=true)
bool Execute(uint64, uint32) override
DaranavanMoveEvent(Creature &darnavan)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
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={})
DamageInfo * GetDamageInfo() const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
void Summon(Creature const *summon)
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={})
virtual void SetGUID(ObjectGuid const &guid, int32 id)
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
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)
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
void ApplySpellImmune(uint32 spellId, SpellImmunity op, uint32 type, bool apply)
bool IsWithinMeleeRange(Unit const *obj) const
void SetPower(Powers power, int32 val, bool withPowerUpdate=true)
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
MotionMaster * GetMotionMaster()
bool HasUnitFlag(UnitFlags flags) const
Aura * AddAura(uint32 spellId, Unit *target)
int32 GetMaxPower(Powers power) const
void SetUninteractible(bool apply)
Unit * EnsureVictim() const
bool Attack(Unit *victim, bool meleeAttack)
int32 GetPower(Powers power) const
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
bool HasUnitState(const uint32 f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
InstanceScript * GetInstanceScript() const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
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)
void setActive(bool isActiveObject)
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
bool TryHandleOnce(Player *player, AreaTriggerEntry const *) override
at_lady_deathwhisper_entrance()
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 *)
void HandleScriptEffect(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
@ LIGHT_S_HAMMER_TELEPORT
#define RegisterIcecrownCitadelCreatureAI(ai_name)
@ NPC_REANIMATED_ADHERENT
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))> &
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
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)
GuidList _nextVengefulShadeTargetGUID
void DoAction(int32 action) override
boss_lady_deathwhisper(Creature *creature)
void AttackStart(Unit *victim) override
void SpellHitTarget(WorldObject *target, SpellInfo const *spellInfo) override
uint8 const _dominateMindCount
void EnterEvadeMode(EvadeReason) override
npc_cult_adherent(Creature *creature)
InstanceScript * _instance
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 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