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)
177 {-578.7066f, 2154.167f, 51.01529f, 1.692969f},
178 {-598.9028f, 2155.005f, 51.01530f, 1.692969f},
179 {-619.2864f, 2154.460f, 51.01530f, 1.692969f},
180 {-578.6996f, 2269.856f, 51.01529f, 4.590216f},
181 {-598.9688f, 2269.264f, 51.01529f, 4.590216f},
182 {-619.4323f, 2268.523f, 51.01530f, 4.590216f},
183 {-524.2480f, 2211.920f, 62.90960f, 3.141592f},
308 death_and_decay.
Repeat(22s, 30s);
314 std::list<Unit*> targets;
316 for (
Unit* target : targets)
318 dominate_mind.
Repeat(40s, 45s);
331 shadow_bolt.
Repeat(2450ms, 3600ms);
350 std::set<uint32> livingAddEntries;
355 livingAddEntries.insert(unit->GetEntry());
357 if (livingAddEntries.size() >= 5)
362 if (darnavan->IsAlive())
365 darnavan->CombatStop(
true);
366 darnavan->GetMotionMaster()->MoveIdle();
368 darnavan->m_Events.AddEvent(
new DaranavanMoveEvent(*darnavan), darnavan->m_Events.CalculateTime(10s));
376 if (
Group* group = owner->GetGroup())
378 for (
GroupReference* itr = group->GetFirstMember(); itr !=
nullptr; itr = itr->
next())
379 if (
Player* member = itr->GetSource())
380 if (member->IsInMap(owner))
397 darnavan->DespawnOrUnsummon();
609 vampiric_might.
Repeat(25s);
614 shadow_cleave.
Repeat(14s);
619 necrotic_strike.
Repeat(17s);
625 switch (spellInfo->
Id)
707 deathchill.
Repeat(2500ms);
709 .Schedule(15s, [
this](
TaskContext shroud_of_the_occult)
712 shroud_of_the_occult.
Repeat(10s);
718 curse_of_torpor.
Repeat(18s);
724 switch (spellInfo->
Id)
807 switch (spellInfo->
Id)
866 if (
Group* group = owner->GetGroup())
868 for (
GroupReference* itr = group->GetFirstMember(); itr !=
nullptr; itr = itr->next())
869 if (
Player* member = itr->GetSource())
870 if (member->IsInMap(owner))
965 int32 missingHealth =
int32(caster->GetMaxHealth() - caster->GetHealth());
966 caster->ModifyHealth(missingHealth);
967 caster->ModifyPower(
POWER_MANA, -missingHealth);
1034 if (!damageInfo || !damageInfo->
GetDamage())
1067 caster->CastSpell(
GetTarget(), spellId, aurEff);
First const & RAND(First const &first, Second const &second, Rest const &... rest)
@ RAID_DIFFICULTY_10MAN_NORMAL
@ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET
@ 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
@ UNIT_FLAG_UNINTERACTIBLE
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
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
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectProcHandler > OnEffectProc
InstanceScript *const instance
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
@ EVADE_REASON_SEQUENCE_BREAK
void DoZoneInCombat(Creature *creature=nullptr)
void SetCombatPulseDelay(uint32 delay)
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)
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={})
static ObjectGuid GetGUID(Object const *o)
static Player * ToPlayer(Object *o)
DamageInfo * GetDamageInfo() const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
void Summon(Creature const *summon)
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()
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
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)
virtual void SetGUID(ObjectGuid const &, int32=0)
virtual void AttackStart(Unit *)
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
bool IsWithinMeleeRange(Unit const *obj) const
void KillSelf(bool durabilityLoss=true)
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
MotionMaster * GetMotionMaster()
bool HasUnitFlag(UnitFlags flags) const
Aura * AddAura(uint32 spellId, Unit *target)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Unit * EnsureVictim() const
bool Attack(Unit *victim, bool meleeAttack)
uint32 GetMaxPower(Powers power) const
void SetPower(Powers power, uint32 val, bool withPowerUpdate=true, bool force=false)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
bool HasUnitState(const uint32 f) const
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
uint32 GetPower(Powers power) const
void SetUnitFlag(UnitFlags flags)
void RemoveUnitFlag(UnitFlags flags)
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
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool TryHandleOnce(Player *player, AreaTriggerEntry const *) override
at_lady_deathwhisper_entrance()
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)
void HandleScriptEffect(SpellEffIndex)
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)
@ 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) -> typename std::add_const< decltype(*std::begin(container))>::type &
void DoStartNoMovement(Unit *target)
void AttackStart(Unit *) override
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 SpellHitTarget(WorldObject *, SpellInfo const *spellInfo) override
void SetGUID(ObjectGuid const &guid, int32) override
void UpdateAI(uint32 diff) override