AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_lady_deathwhisper::boss_lady_deathwhisperAI Struct Reference
Inheritance diagram for boss_lady_deathwhisper::boss_lady_deathwhisperAI:
BossAI ScriptedAI CreatureAI UnitAI

Public Member Functions

 boss_lady_deathwhisperAI (Creature *creature)
 
void Reset () override
 
void AttackStart (Unit *victim) override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged.
 
void DamageTaken (Unit *, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 
void UpdateAI (uint32 diff) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void JustDied (Unit *killer) override
 
void KilledUnit (Unit *victim) override
 
void DoAction (int32 action) override
 
void SummonWaveP1 ()
 
void SummonWaveP2 ()
 
void Summon (uint32 entry, const Position &pos)
 
void EmpowerCultist ()
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 
void UpdateAI (uint32 diff) override
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () const
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged.
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Private Attributes

bool _introDone
 
ObjectGuid _darnavanGUID
 
uint32 _waveCounter
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
bool _ProccessHealthCheckEvent (uint8 healthPct, uint32 damage, std::function< void()> exec) const
 
void TeleportCheaters ()
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
SummonList summons
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_lady_deathwhisperAI()

boss_lady_deathwhisper::boss_lady_deathwhisperAI::boss_lady_deathwhisperAI ( Creature creature)
inline
248: BossAI(creature, DATA_LADY_DEATHWHISPER), _introDone(false) { }
@ DATA_LADY_DEATHWHISPER
Definition: icecrown_citadel.h:95
Definition: ScriptedCreature.h:469
bool _introDone
Definition: boss_lady_deathwhisper.cpp:659

Member Function Documentation

◆ AttackStart()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::AttackStart ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

265 {
266 if (victim && me->Attack(victim, true) && !(events.GetPhaseMask() & PHASE_ONE_MASK))
267 me->GetMotionMaster()->MoveChase(victim);
268 }
events
Definition: boss_sartura.cpp:43
@ PHASE_ONE_MASK
Definition: boss_lady_deathwhisper.cpp:176
Creature * me
Definition: ScriptedCreature.h:282
MotionMaster * GetMotionMaster()
Definition: Unit.h:2276
bool Attack(Unit *victim, bool meleeAttack)
Definition: Unit.cpp:10280
void MoveChase(Unit *target, std::optional< ChaseRange > dist={}, std::optional< ChaseAngle > angle={})
Definition: MotionMaster.cpp:300

References Unit::Attack(), Unit::GetMotionMaster(), ScriptedAI::me, MotionMaster::MoveChase(), and PHASE_ONE_MASK.

◆ DamageTaken()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::DamageTaken ( Unit ,
uint32 damage,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Reimplemented from BossAI.

300 {
301 if (events.GetPhaseMask() & PHASE_ONE_MASK && damage >= me->GetPower(POWER_MANA))
302 {
303 // reset threat
305 for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
306 {
307 Unit* unit = ObjectAccessor::GetUnit((*me), (*itr)->getUnitGuid());
308
309 if (unit && DoGetThreat(unit))
310 DoModifyThreatByPercent(unit, -100);
311 }
312
316 damage -= me->GetPower(POWER_MANA);
319 events.SetPhase(PHASE_TWO);
320 events.ScheduleEvent(EVENT_SPELL_FROSTBOLT, 10s, 12s, 0, PHASE_TWO);
321 events.ScheduleEvent(EVENT_SPELL_FROSTBOLT_VOLLEY, 19s, 21s, 0, PHASE_TWO);
322 events.ScheduleEvent(EVENT_SPELL_TOUCH_OF_INSIGNIFICANCE, 6s, 9s, 0, PHASE_TWO);
323 events.ScheduleEvent(EVENT_SPELL_SUMMON_SHADE, 12s, 15s, 0, PHASE_TWO);
324 if (IsHeroic())
325 {
328 events.ScheduleEvent(EVENT_SUMMON_WAVE_P2, 45s, 0, PHASE_TWO);
329 }
330 }
331 }
@ SPELL_AURA_MOD_TAUNT
Definition: SpellAuraDefines.h:74
@ SPELL_MANA_BARRIER
Definition: boss_lady_deathwhisper.cpp:59
@ PHASE_TWO
Definition: boss_lady_deathwhisper.cpp:173
@ EVENT_SPELL_FROSTBOLT_VOLLEY
Definition: boss_lady_deathwhisper.cpp:139
@ EVENT_SPELL_SUMMON_SHADE
Definition: boss_lady_deathwhisper.cpp:141
@ EVENT_SPELL_FROSTBOLT
Definition: boss_lady_deathwhisper.cpp:138
@ EVENT_SPELL_TOUCH_OF_INSIGNIFICANCE
Definition: boss_lady_deathwhisper.cpp:140
@ EVENT_SUMMON_WAVE_P2
Definition: boss_lady_deathwhisper.cpp:142
@ SAY_PHASE_2
Definition: boss_lady_deathwhisper.cpp:40
@ EMOTE_PHASE_2
Definition: boss_lady_deathwhisper.cpp:41
Talk
Definition: boss_fathomlord_karathress.cpp:25
@ POWER_MANA
Definition: SharedDefines.h:269
@ SPELL_EFFECT_ATTACK_ME
Definition: SharedDefines.h:892
@ IMMUNITY_STATE
Definition: SharedDefines.h:1395
@ IMMUNITY_EFFECT
Definition: SharedDefines.h:1394
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:202
bool IsHeroic() const
Definition: ScriptedCreature.h:391
void DoModifyThreatByPercent(Unit *unit, int32 pct)
Definition: ScriptedCreature.cpp:422
float DoGetThreat(Unit *unit)
Definition: ScriptedCreature.cpp:449
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
Definition: ScriptedCreature.cpp:227
std::list< HostileReference * > StorageType
Definition: ThreatMgr.h:148
ThreatContainer::StorageType const & GetThreatList() const
Definition: ThreatMgr.h:274
Definition: Unit.h:1302
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition: Unit.cpp:13383
void SetPower(Powers power, uint32 val, bool withPowerUpdate=true, bool fromRegenerate=false)
Definition: Unit.cpp:15552
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4855
Unit * GetVictim() const
Definition: Unit.h:1398
ThreatMgr & GetThreatMgr()
Definition: Unit.h:2159
uint32 GetPower(Powers power) const
Definition: Unit.h:1475

References Unit::ApplySpellImmune(), ScriptedAI::DoGetThreat(), ScriptedAI::DoModifyThreatByPercent(), ScriptedAI::DoStartMovement(), EMOTE_PHASE_2, EVENT_SPELL_FROSTBOLT, EVENT_SPELL_FROSTBOLT_VOLLEY, EVENT_SPELL_SUMMON_SHADE, EVENT_SPELL_TOUCH_OF_INSIGNIFICANCE, EVENT_SUMMON_WAVE_P2, Unit::GetPower(), ThreatMgr::GetThreatList(), Unit::GetThreatMgr(), ObjectAccessor::GetUnit(), Unit::GetVictim(), IMMUNITY_EFFECT, IMMUNITY_STATE, ScriptedAI::IsHeroic(), ScriptedAI::me, PHASE_ONE_MASK, PHASE_TWO, POWER_MANA, Unit::RemoveAurasDueToSpell(), SAY_PHASE_2, Unit::SetPower(), SPELL_AURA_MOD_TAUNT, SPELL_EFFECT_ATTACK_ME, and SPELL_MANA_BARRIER.

◆ DoAction()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

552 {
553 if (action != ACTION_START_INTRO)
554 return;
555
556 if (!_introDone && !me->IsInCombat())
557 {
558 _introDone = true;
560 events.SetPhase(PHASE_INTRO);
561 events.ScheduleEvent(EVENT_INTRO_2, 11s, 0, PHASE_INTRO);
562 events.ScheduleEvent(EVENT_INTRO_3, 21s, 0, PHASE_INTRO);
563 events.ScheduleEvent(EVENT_INTRO_4, 31s + 500ms, 0, PHASE_INTRO);
564 events.ScheduleEvent(EVENT_INTRO_5, 39s + 500ms, 0, PHASE_INTRO);
565 events.ScheduleEvent(EVENT_INTRO_6, 48s + 500ms, 0, PHASE_INTRO);
566 events.ScheduleEvent(EVENT_INTRO_7, 58s, 0, PHASE_INTRO);
567 }
568 }
@ ACTION_START_INTRO
Definition: boss_lady_deathwhisper.cpp:192
@ PHASE_INTRO
Definition: boss_lady_deathwhisper.cpp:171
@ EVENT_INTRO_4
Definition: boss_lady_deathwhisper.cpp:123
@ EVENT_INTRO_2
Definition: boss_lady_deathwhisper.cpp:121
@ EVENT_INTRO_5
Definition: boss_lady_deathwhisper.cpp:124
@ EVENT_INTRO_6
Definition: boss_lady_deathwhisper.cpp:125
@ EVENT_INTRO_7
Definition: boss_lady_deathwhisper.cpp:126
@ EVENT_INTRO_3
Definition: boss_lady_deathwhisper.cpp:122
@ SAY_INTRO_1
Definition: boss_lady_deathwhisper.cpp:32
bool IsInCombat() const
Definition: Unit.h:1702

References _introDone, ACTION_START_INTRO, EVENT_INTRO_2, EVENT_INTRO_3, EVENT_INTRO_4, EVENT_INTRO_5, EVENT_INTRO_6, EVENT_INTRO_7, Unit::IsInCombat(), ScriptedAI::me, PHASE_INTRO, and SAY_INTRO_1.

◆ EmpowerCultist()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::EmpowerCultist ( )
inline
621 {
622 if (summons.empty())
623 return;
624
625 std::list<Creature*> temp;
626 for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
627 if (Creature* cre = ObjectAccessor::GetCreature(*me, *itr))
628 if (cre->IsAlive() && (cre->GetEntry() == NPC_CULT_FANATIC || cre->GetEntry() == NPC_CULT_ADHERENT))
629 temp.push_back(cre);
630
631 // noone to empower
632 if (temp.empty())
633 return;
634
635 // select random cultist
637 if (!cultist)
638 return;
639
640 if (RAND(0, 1))
642 else
643 {
646 }
647 }
std::uint8_t uint8
Definition: Define.h:110
static First const & RAND(First const &first, Second const &second, Rest const &... rest)
Definition: CreatureAIImpl.h:30
@ SPELL_DARK_TRANSFORMATION_T
Definition: boss_lady_deathwhisper.cpp:64
@ SPELL_DARK_EMPOWERMENT_T
Definition: boss_lady_deathwhisper.cpp:65
@ SPELL_DARK_MARTYRDOM_T
Definition: boss_lady_deathwhisper.cpp:63
@ SAY_DARK_TRANSFORMATION
Definition: boss_lady_deathwhisper.cpp:44
@ SAY_DARK_EMPOWERMENT
Definition: boss_lady_deathwhisper.cpp:43
@ NPC_CULT_ADHERENT
Definition: icecrown_citadel.h:212
@ NPC_CULT_FANATIC
Definition: icecrown_citadel.h:209
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition: Containers.h:135
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
bool empty() const
Definition: ScriptedCreature.h:75
iterator begin()
Definition: ScriptedCreature.h:50
iterator end()
Definition: ScriptedCreature.h:60
StorageType::iterator iterator
Definition: ScriptedCreature.h:38
SummonList summons
Definition: ScriptedCreature.h:510
Definition: Creature.h:46
uint32 GetEntry() const
Definition: Object.h:109
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1169

References SummonList::begin(), Unit::CastSpell(), SummonList::empty(), SummonList::end(), ObjectAccessor::GetCreature(), Object::GetEntry(), ScriptedAI::me, NPC_CULT_ADHERENT, NPC_CULT_FANATIC, RAND(), SAY_DARK_EMPOWERMENT, SAY_DARK_TRANSFORMATION, Acore::Containers::SelectRandomContainerElement(), SPELL_DARK_EMPOWERMENT_T, SPELL_DARK_MARTYRDOM_T, SPELL_DARK_TRANSFORMATION_T, and BossAI::summons.

Referenced by UpdateAI().

◆ JustDied()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::JustDied ( Unit killer)
inlineoverridevirtual

Reimplemented from BossAI.

501 {
503
504 std::set<uint32> livingAddEntries;
505 // Full House achievement
506 for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
507 if (Unit* unit = ObjectAccessor::GetUnit(*me, *itr))
508 if (unit->IsAlive() && unit->GetEntry() != NPC_VENGEFUL_SHADE)
509 livingAddEntries.insert(unit->GetEntry());
510
511 if (livingAddEntries.size() >= 5)
513
515 {
516 if (darnavan->IsAlive())
517 {
518 darnavan->RemoveAllAuras();
519 darnavan->SetFaction(FACTION_FRIENDLY);
520 darnavan->GetThreatMgr().ClearAllThreat();
521 darnavan->CombatStop(true);
522 darnavan->GetMotionMaster()->MoveIdle();
523 darnavan->StopMoving();
524 darnavan->SetReactState(REACT_PASSIVE);
525 darnavan->m_Events.AddEvent(new DaranavanMoveEvent(*darnavan), darnavan->m_Events.CalculateTime(10000));
526 darnavan->AI()->Talk(SAY_DARNAVAN_RESCUED);
527 if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
528 {
529 if (Group* group = owner->GetGroup())
530 {
531 for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
532 if (Player* member = itr->GetSource())
533 if (member->IsInMap(owner))
534 member->KilledMonsterCredit(NPC_DARNAVAN_CREDIT);
535 }
536 else
537 owner->KilledMonsterCredit(NPC_DARNAVAN_CREDIT);
538 }
539 }
540 }
541
542 _JustDied();
543 }
@ REACT_PASSIVE
Definition: Unit.h:1035
#define NPC_DARNAVAN_CREDIT
Definition: boss_lady_deathwhisper.cpp:196
@ SPELL_FULL_HOUSE
Definition: boss_lady_deathwhisper.cpp:111
@ SAY_DEATH
Definition: boss_lady_deathwhisper.cpp:48
@ SAY_DARNAVAN_RESCUED
Definition: boss_lady_deathwhisper.cpp:52
@ NPC_VENGEFUL_SHADE
Definition: icecrown_citadel.h:215
@ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET
Definition: DBCEnums.h:150
@ FACTION_FRIENDLY
Definition: SharedDefines.h:201
InstanceScript *const instance
Definition: ScriptedCreature.h:474
void _JustDied()
Definition: ScriptedCreature.cpp:620
Definition: Player.h:1056
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
Definition: Unit.cpp:10615
Definition: Group.h:169
Definition: GroupReference.h:27
GroupReference * next()
Definition: GroupReference.h:36
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
Definition: InstanceScript.cpp:611
Definition: boss_lady_deathwhisper.cpp:212
ObjectGuid _darnavanGUID
Definition: boss_lady_deathwhisper.cpp:660

References _darnavanGUID, BossAI::_JustDied(), ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SummonList::begin(), InstanceScript::DoUpdateAchievementCriteria(), SummonList::end(), FACTION_FRIENDLY, Unit::GetCharmerOrOwnerPlayerOrPlayerItself(), ObjectAccessor::GetCreature(), ObjectAccessor::GetUnit(), BossAI::instance, ScriptedAI::me, GroupReference::next(), NPC_DARNAVAN_CREDIT, NPC_VENGEFUL_SHADE, REACT_PASSIVE, SAY_DARNAVAN_RESCUED, SAY_DEATH, SPELL_FULL_HOUSE, and BossAI::summons.

◆ JustEngagedWith()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

271 {
273 {
276 return;
277 }
278
279 me->setActive(true);
281
282 events.Reset();
283 events.SetPhase(PHASE_ONE);
284 events.ScheduleEvent(EVENT_BERSERK, 10min);
285 events.ScheduleEvent(EVENT_SPELL_DEATH_AND_DECAY, 10s);
287 events.ScheduleEvent(EVENT_SPELL_DOMINATE_MIND_25, 30s);
288 events.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, 2s, 0, PHASE_ONE);
289 events.ScheduleEvent(EVENT_SUMMON_WAVE_P1, 5s, 0, PHASE_ONE);
290 events.ScheduleEvent(EVENT_EMPOWER_CULTIST, 20s, 30s, 0, PHASE_ONE);
291
295
297 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ SPELL_SHADOW_CHANNELING
Definition: boss_lady_deathwhisper.cpp:58
@ PHASE_ONE
Definition: boss_lady_deathwhisper.cpp:172
@ EVENT_SPELL_DEATH_AND_DECAY
Definition: boss_lady_deathwhisper.cpp:129
@ EVENT_EMPOWER_CULTIST
Definition: boss_lady_deathwhisper.cpp:135
@ EVENT_SPELL_DOMINATE_MIND_25
Definition: boss_lady_deathwhisper.cpp:130
@ EVENT_BERSERK
Definition: boss_lady_deathwhisper.cpp:128
@ EVENT_SPELL_SHADOW_BOLT
Definition: boss_lady_deathwhisper.cpp:133
@ EVENT_SUMMON_WAVE_P1
Definition: boss_lady_deathwhisper.cpp:134
@ SAY_AGGRO
Definition: boss_lady_deathwhisper.cpp:39
@ LIGHT_S_HAMMER_TELEPORT
Definition: icecrown_citadel.h:82
@ RAID_DIFFICULTY_10MAN_NORMAL
Definition: DBCEnums.h:281
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:94
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:196
Difficulty GetDifficulty() const
Definition: ScriptedCreature.h:394
void setActive(bool isActiveObject)
Definition: Object.cpp:1085
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:350
void DoCastSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:649
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition: InstanceScript.h:244

References Unit::CastSpell(), InstanceScript::CheckRequiredBosses(), DATA_LADY_DEATHWHISPER, InstanceScript::DoCastSpellOnPlayers(), CreatureAI::DoZoneInCombat(), CreatureAI::EnterEvadeMode(), EVENT_BERSERK, EVENT_EMPOWER_CULTIST, EVENT_SPELL_DEATH_AND_DECAY, EVENT_SPELL_DOMINATE_MIND_25, EVENT_SPELL_SHADOW_BOLT, EVENT_SUMMON_WAVE_P1, ScriptedAI::GetDifficulty(), IN_PROGRESS, BossAI::instance, LIGHT_S_HAMMER_TELEPORT, ScriptedAI::me, PHASE_ONE, RAID_DIFFICULTY_10MAN_NORMAL, Unit::RemoveAurasDueToSpell(), SAY_AGGRO, WorldObject::setActive(), InstanceScript::SetBossState(), SPELL_MANA_BARRIER, SPELL_SHADOW_CHANNELING, and Object::ToPlayer().

◆ JustSummoned()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

466 {
467 if (summon->GetEntry() == NPC_DARNAVAN)
468 _darnavanGUID = summon->GetGUID();
469 else
470 summons.Summon(summon);
471
472 Unit* target = nullptr;
473 if (summon->GetEntry() == NPC_VENGEFUL_SHADE)
474 {
475 float minrange = 250.0f;
476 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
477 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
478 if (Player* p = itr->GetSource())
479 if (p != me->GetVictim() && summon->GetExactDist(p) < minrange && me->CanCreatureAttack(p))
480 {
481 target = p;
482 minrange = summon->GetExactDist(p);
483 }
484
485 summon->ToTempSummon()->DespawnOrUnsummon(30000);
486 }
487 else
488 {
489 target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true);
490 }
491
492 summon->AI()->AttackStart(target);
493 }
#define NPC_DARNAVAN
Definition: boss_lady_deathwhisper.cpp:195
Definition: LinkedList.h:139
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:110
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:27
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90
bool CanCreatureAttack(Unit const *victim, bool skipDistCheck=false) const
Definition: Creature.cpp:2558
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2117
CreatureAI * AI() const
Definition: Creature.h:136
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
Map * GetMap() const
Definition: Object.h:517
float GetExactDist(float x, float y, float z) const
Definition: Position.h:178
TempSummon * ToTempSummon()
Definition: Unit.h:2414
PlayerList const & GetPlayers() const
Definition: Map.h:485
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37

References _darnavanGUID, Creature::AI(), UnitAI::AttackStart(), MapRefMgr::begin(), Creature::CanCreatureAttack(), Creature::DespawnOrUnsummon(), MapRefMgr::end(), Object::GetEntry(), Position::GetExactDist(), Object::GetGUID(), WorldObject::GetMap(), Map::GetPlayers(), Unit::GetVictim(), ScriptedAI::me, NPC_DARNAVAN, NPC_VENGEFUL_SHADE, UnitAI::SelectTarget(), SummonList::Summon(), BossAI::summons, and Unit::ToTempSummon().

◆ KilledUnit()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

546 {
547 if (victim->GetTypeId() == TYPEID_PLAYER)
548 Talk(SAY_KILL);
549 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
@ SAY_KILL
Definition: boss_lady_deathwhisper.cpp:46
TypeID GetTypeId() const
Definition: Object.h:121

References Object::GetTypeId(), SAY_KILL, and TYPEID_PLAYER.

◆ Reset()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

251 {
253 darnavan->DespawnOrUnsummon();
255 _waveCounter = 0;
256 _Reset();
258 events.SetPhase(PHASE_ONE);
262 }
void _Reset()
Definition: ScriptedCreature.cpp:604
void Clear()
Definition: ObjectGuid.h:140
uint32 GetMaxPower(Powers power) const
Definition: Unit.h:1476
uint32 _waveCounter
Definition: boss_lady_deathwhisper.cpp:661

References _darnavanGUID, BossAI::_Reset(), _waveCounter, Unit::ApplySpellImmune(), Unit::CastSpell(), ObjectGuid::Clear(), ObjectAccessor::GetCreature(), Unit::GetMaxPower(), IMMUNITY_EFFECT, IMMUNITY_STATE, ScriptedAI::me, PHASE_ONE, POWER_MANA, Unit::SetPower(), SPELL_AURA_MOD_TAUNT, SPELL_EFFECT_ATTACK_ME, and SPELL_SHADOW_CHANNELING.

◆ SpellHitTarget()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::SpellHitTarget ( Unit target,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

650 {
651 if (spell->Id == SPELL_DOMINATE_MIND_25)
652 {
653 const int32 val = 100;
654 target->CastCustomSpell(target, 73261, &val, nullptr, nullptr, true); // scale aura, +100% size
655 }
656 }
std::int32_t int32
Definition: Define.h:104
@ SPELL_DOMINATE_MIND_25
Definition: boss_lady_deathwhisper.cpp:61
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1226

References Unit::CastCustomSpell(), SpellInfo::Id, and SPELL_DOMINATE_MIND_25.

◆ Summon()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::Summon ( uint32  entry,
const Position pos 
)
inline
611 {
612 if (me->SummonCreature(entry, pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000))
614 {
616 trigger->CastSpell(trigger, SPELL_TELEPORT_VISUAL, true);
617 }
618 }
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:44
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: Object.h:47
#define WORLD_TRIGGER
Definition: Unit.h:36
@ UNIT_FLAG_NON_ATTACKABLE
Definition: Unit.h:449
@ UNIT_FLAG_NOT_SELECTABLE
Definition: Unit.h:473
@ SPELL_TELEPORT_VISUAL
Definition: boss_lady_deathwhisper.cpp:112
Definition: TemporarySummon.h:40
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2343

References ScriptedAI::me, SPELL_TELEPORT_VISUAL, WorldObject::SummonCreature(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, TEMPSUMMON_TIMED_DESPAWN, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_NOT_SELECTABLE, and WORLD_TRIGGER.

Referenced by SummonWaveP1(), and SummonWaveP2().

◆ SummonedCreatureDespawn()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::SummonedCreatureDespawn ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

496 {
497 summons.Despawn(summon);
498 }
void Despawn(Creature const *summon)
Definition: ScriptedCreature.h:91

References SummonList::Despawn(), and BossAI::summons.

◆ SummonWaveP1()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::SummonWaveP1 ( )
inline
571 {
572 uint8 addIndex = _waveCounter & 1;
573 uint8 addIndexOther = uint8(addIndex ^ 1);
574
575 // Summon first add, replace it with Darnavan if weekly quest is active
577 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3]);
578 else
579 Summon(NPC_DARNAVAN, SummonPositions[addIndex * 3]);
580
581 Summon(SummonEntries[addIndexOther], SummonPositions[addIndex * 3 + 1]);
582 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3 + 2]);
583 if (Is25ManRaid())
584 {
585 Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3]);
586 Summon(SummonEntries[addIndex], SummonPositions[addIndexOther * 3 + 1]);
587 Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3 + 2]);
589 }
590
591 ++_waveCounter;
592 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
uint32 const SummonEntries[2]
Definition: boss_lady_deathwhisper.cpp:199
Position const SummonPositions[7]
Definition: boss_lady_deathwhisper.cpp:200
@ DATA_WEEKLY_QUEST_ID
Definition: icecrown_citadel.h:143
@ QUEST_DEPROGRAMMING_10
Definition: icecrown_citadel.h:549
bool Is25ManRaid() const
Definition: ScriptedCreature.h:397
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:52
void Summon(uint32 entry, const Position &pos)
Definition: boss_lady_deathwhisper.cpp:610

References _waveCounter, DATA_WEEKLY_QUEST_ID, ZoneScript::GetData(), BossAI::instance, ScriptedAI::Is25ManRaid(), NPC_DARNAVAN, QUEST_DEPROGRAMMING_10, Summon(), SummonEntries, SummonPositions, and urand().

Referenced by UpdateAI().

◆ SummonWaveP2()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::SummonWaveP2 ( )
inline
595 {
596 if (Is25ManRaid())
597 {
598 uint8 addIndex = _waveCounter & 1;
599 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3]);
600 Summon(SummonEntries[addIndex ^ 1], SummonPositions[addIndex * 3 + 1]);
601 Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3 + 2]);
602 }
603 else
605
606 ++_waveCounter;
607 }

References _waveCounter, ScriptedAI::Is25ManRaid(), Summon(), SummonEntries, SummonPositions, and urand().

Referenced by UpdateAI().

◆ UpdateAI()

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

334 {
335 if (!UpdateVictim() && !(events.GetPhaseMask() & PHASE_INTRO_MASK))
336 return;
337
338 events.Update(diff);
339
340 if (me->HasUnitState(UNIT_STATE_CASTING) && !(events.GetPhaseMask() & PHASE_INTRO_MASK))
341 return;
342
343 switch (events.ExecuteEvent())
344 {
345 case 0:
346 break;
347 case EVENT_INTRO_2:
349 break;
350 case EVENT_INTRO_3:
352 break;
353 case EVENT_INTRO_4:
355 break;
356 case EVENT_INTRO_5:
358 break;
359 case EVENT_INTRO_6:
361 break;
362 case EVENT_INTRO_7:
364 break;
365 case EVENT_BERSERK:
366 me->CastSpell(me, SPELL_BERSERK, true);
368 break;
370 if (Unit* target = SelectTarget(SelectTargetMethod::Random))
371 me->CastSpell(target, SPELL_DEATH_AND_DECAY, false);
372 events.Repeat(22s, 30s);
373 break;
375 {
377
378 std::vector<Player*> validPlayers;
379 Map::PlayerList const& pList = me->GetMap()->GetPlayers();
380 for (Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
381 if (Player* plr = itr->GetSource())
382 if (plr->IsAlive() && !plr->IsGameMaster() && plr->GetExactDist2dSq(me) < (150.0f * 150.0f))
383 if (!me->GetVictim() || me->GetVictim()->GetGUID() != plr->GetGUID())
384 {
385 // shouldn't be casted on any victim of summoned mobs
386 bool valid = true;
387 for (ObjectGuid const& guid : summons)
388 if (Creature* c = ObjectAccessor::GetCreature(*me, guid))
389 if (c->IsAlive() && c->GetVictim() && c->GetVictim()->GetGUID() == plr->GetGUID())
390 {
391 valid = false;
392 break;
393 }
394 if (valid)
395 validPlayers.push_back(plr);
396 }
397
398 std::vector<Player*>::iterator begin = validPlayers.begin(), end = validPlayers.end();
399
400 std::random_device rd;
401 std::shuffle(begin, end, std::default_random_engine{rd()});
402
403 for (uint8 i = 0; i < RAID_MODE<uint8>(0, 1, 1, 3) && i < validPlayers.size(); i++)
404 {
405 Unit* target = validPlayers[i];
406 me->CastSpell(target, SPELL_DOMINATE_MIND_25, true);
407 }
408
409 events.Repeat(40s, 45s);
410 }
411 break;
413 if (Unit* target = SelectTarget(SelectTargetMethod::Random))
414 me->CastSpell(target, SPELL_SHADOW_BOLT, false);
415 events.Repeat(2100ms);
416 break;
418 SummonWaveP1();
419 events.Repeat(IsHeroic() ? 45s : 60s);
420 break;
423 events.Repeat(18s, 25s);
424 break;
427 events.Repeat(12s);
428 break;
430 me->CastSpell((Unit*)nullptr, SPELL_FROSTBOLT_VOLLEY, false);
431 events.Repeat(13s, 15s);
432 break;
435 events.Repeat(6s, 9s);
436 break;
438 SummonWaveP2();
439 events.Repeat(45s);
440 break;
442 {
443 uint8 count = 1;
445 count = 2;
447 count = 3;
448
449 std::list<Unit*> targets;
450 SelectTargetList(targets, count, SelectTargetMethod::Random, 0, NonTankTargetSelector(me, true));
451 if (!targets.empty())
452 for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
453 me->CastSpell(*itr, SPELL_SUMMON_SHADE, true);
454 }
455 events.Repeat(12s);
456 break;
457 }
458
460 return;
461
463 }
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ SPELL_FROSTBOLT
Definition: boss_lady_deathwhisper.cpp:66
@ SPELL_SUMMON_SHADE
Definition: boss_lady_deathwhisper.cpp:69
@ SPELL_TOUCH_OF_INSIGNIFICANCE
Definition: boss_lady_deathwhisper.cpp:68
@ SPELL_DEATH_AND_DECAY
Definition: boss_lady_deathwhisper.cpp:60
@ SPELL_SHADOW_BOLT
Definition: boss_lady_deathwhisper.cpp:62
@ SPELL_FROSTBOLT_VOLLEY
Definition: boss_lady_deathwhisper.cpp:67
@ PHASE_INTRO_MASK
Definition: boss_lady_deathwhisper.cpp:175
@ SAY_INTRO_6
Definition: boss_lady_deathwhisper.cpp:37
@ SAY_INTRO_2
Definition: boss_lady_deathwhisper.cpp:33
@ SAY_DOMINATE_MIND
Definition: boss_lady_deathwhisper.cpp:42
@ SAY_INTRO_3
Definition: boss_lady_deathwhisper.cpp:34
@ SAY_INTRO_4
Definition: boss_lady_deathwhisper.cpp:35
@ SAY_INTRO_7
Definition: boss_lady_deathwhisper.cpp:38
@ SAY_BERSERK
Definition: boss_lady_deathwhisper.cpp:47
@ SAY_INTRO_5
Definition: boss_lady_deathwhisper.cpp:36
#define SPELL_BERSERK
Definition: boss_ignis.cpp:41
@ RAID_DIFFICULTY_25MAN_HEROIC
Definition: DBCEnums.h:284
@ RAID_DIFFICULTY_25MAN_NORMAL
Definition: DBCEnums.h:282
Definition: UnitAI.h:112
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
void SelectTargetList(std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:115
bool UpdateVictim()
Definition: CreatureAI.cpp:268
Definition: ObjectGuid.h:120
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5636
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1410
void SummonWaveP2()
Definition: boss_lady_deathwhisper.cpp:594
void SummonWaveP1()
Definition: boss_lady_deathwhisper.cpp:570
void EmpowerCultist()
Definition: boss_lady_deathwhisper.cpp:620

References MapRefMgr::begin(), Unit::CastSpell(), UnitAI::DoMeleeAttackIfReady(), EmpowerCultist(), MapRefMgr::end(), EVENT_BERSERK, EVENT_EMPOWER_CULTIST, EVENT_INTRO_2, EVENT_INTRO_3, EVENT_INTRO_4, EVENT_INTRO_5, EVENT_INTRO_6, EVENT_INTRO_7, EVENT_SPELL_DEATH_AND_DECAY, EVENT_SPELL_DOMINATE_MIND_25, EVENT_SPELL_FROSTBOLT, EVENT_SPELL_FROSTBOLT_VOLLEY, EVENT_SPELL_SHADOW_BOLT, EVENT_SPELL_SUMMON_SHADE, EVENT_SPELL_TOUCH_OF_INSIGNIFICANCE, EVENT_SUMMON_WAVE_P1, EVENT_SUMMON_WAVE_P2, ObjectAccessor::GetCreature(), ScriptedAI::GetDifficulty(), Object::GetGUID(), WorldObject::GetMap(), Map::GetPlayers(), Unit::GetVictim(), Unit::HasAura(), Unit::HasUnitState(), ScriptedAI::IsHeroic(), ScriptedAI::me, PHASE_INTRO_MASK, RAID_DIFFICULTY_25MAN_HEROIC, RAID_DIFFICULTY_25MAN_NORMAL, SAY_BERSERK, SAY_DOMINATE_MIND, SAY_INTRO_2, SAY_INTRO_3, SAY_INTRO_4, SAY_INTRO_5, SAY_INTRO_6, SAY_INTRO_7, UnitAI::SelectTarget(), UnitAI::SelectTargetList(), SPELL_BERSERK, SPELL_DEATH_AND_DECAY, SPELL_DOMINATE_MIND_25, SPELL_FROSTBOLT, SPELL_FROSTBOLT_VOLLEY, SPELL_MANA_BARRIER, SPELL_SHADOW_BOLT, SPELL_SUMMON_SHADE, SPELL_TOUCH_OF_INSIGNIFICANCE, BossAI::summons, SummonWaveP1(), SummonWaveP2(), UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _darnavanGUID

ObjectGuid boss_lady_deathwhisper::boss_lady_deathwhisperAI::_darnavanGUID
private

Referenced by JustDied(), JustSummoned(), and Reset().

◆ _introDone

bool boss_lady_deathwhisper::boss_lady_deathwhisperAI::_introDone
private

Referenced by DoAction().

◆ _waveCounter

uint32 boss_lady_deathwhisper::boss_lady_deathwhisperAI::_waveCounter
private

Referenced by Reset(), SummonWaveP1(), and SummonWaveP2().