TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boss_lady_deathwhisper::boss_lady_deathwhisperAI Struct Reference

Public Member Functions

 boss_lady_deathwhisperAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void DoAction (int32 action) override
 
void AttackStart (Unit *victim) override
 
void EnterCombat (Unit *who) override
 
void JustDied (Unit *killer) override
 
void JustReachedHome () override
 
void KilledUnit (Unit *victim) override
 
void DamageTaken (Unit *, uint32 &damage) override
 
void JustSummoned (Creature *summon) override
 
void UpdateAI (uint32 diff) override
 
void SummonWaveP1 ()
 
void SummonWaveP2 ()
 
void Summon (uint32 entry, const Position &pos)
 
void SetGUID (ObjectGuid guid, int32 id) override
 
void ReanimateCultist ()
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
void EmpowerCultist ()
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
virtual ~BossAI ()
 
void SummonedCreatureDespawn (Creature *summon) override
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
bool CanAIAttack (Unit const *target) const override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void SpellHit (Unit *, SpellInfo const *) override
 
void OnPossess (bool)
 
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 DoResetThreat ()
 
float DoGetThreat (Unit *unit)
 
void DoModifyThreatPercent (Unit *unit, int32 pct)
 
void DoTeleportTo (float x, float y, float z, uint32 time=0)
 
void DoTeleportTo (float const pos[4])
 
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 HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo constSelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, 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
 
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
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
 CreatureAI (Creature *creature)
 
virtual ~CreatureAI ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted () const
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
void OnCharmed (bool apply) override
 
void DoZoneInCombat (Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary constGetBoundary () const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual void InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectAggroTarget targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectAggroTarget targetType)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
void DoCast (uint32 spellId)
 
void DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
void DoCastVictim (uint32 spellId, bool triggered=false)
 
void DoCastAOE (uint32 spellId, bool triggered=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
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 sQuestReward (Player *, Quest const *, uint32)
 
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
 
virtual void sOnGameEvent (bool, uint16)
 

Private Attributes

ObjectGuid _nextVengefulShadeTargetGUID
 
ObjectGuid _darnavanGUID
 
GuidDeque _reanimationQueue
 
uint32 _waveCounter
 
uint8 const _dominateMindCount
 
bool _introDone
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason { EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_SEQUENCE_BREAK, EVADE_REASON_OTHER }
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _EnterCombat ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _DespawnAtEvade ()
 
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)
 
bool CheckBoundary (Position const *who=nullptr) const
 
void SetBoundary (CreatureBoundary const *boundary)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

boss_lady_deathwhisper::boss_lady_deathwhisperAI::boss_lady_deathwhisperAI ( Creature creature)
inline
223  : BossAI(creature, DATA_LADY_DEATHWHISPER),
224  _dominateMindCount(RAID_MODE<uint8>(0, 1, 1, 3)), _introDone(false)
225  {
226  Initialize();
227  }
void Initialize()
Definition: boss_lady_deathwhisper.cpp:229
bool _introDone
Definition: boss_lady_deathwhisper.cpp:634
Definition: icecrown_citadel.h:76
uint8 const _dominateMindCount
Definition: boss_lady_deathwhisper.cpp:633
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444

+ Here is the call graph for this function:

Member Function Documentation

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

Reimplemented from ScriptedAI.

273  {
275  return;
276 
277  if (victim && me->Attack(victim, true) && !events.IsInPhase(PHASE_ONE))
278  me->GetMotionMaster()->MoveChase(victim);
279  }
bool Attack(Unit *victim, bool meleeAttack)
Definition: Unit.cpp:7222
Definition: Unit.h:674
void MoveChase(Unit *target, float dist=0.0f, float angle=0.0f)
Definition: MotionMaster.cpp:241
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_lady_deathwhisper.cpp:162
Definition: UpdateFields.h:109
EventMap events
Definition: ScriptedCreature.h:371
bool HasFlag(uint16 index, uint32 flag) const
Definition: Object.cpp:1239

+ Here is the call graph for this function:

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

Reimplemented from ScriptedAI.

374  {
375  // phase transition
376  if (events.IsInPhase(PHASE_ONE) && damage > uint32(me->GetPower(POWER_MANA)))
377  {
378  Talk(SAY_PHASE_2);
381  damage -= me->GetPower(POWER_MANA);
382  me->SetPower(POWER_MANA, 0);
389  // on heroic mode Lady Deathwhisper is immune to taunt effects in phase 2 and continues summoning adds
390  if (IsHeroic())
391  {
395  }
396  }
397  }
Definition: boss_lady_deathwhisper.cpp:56
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
Definition: boss_lady_deathwhisper.cpp:163
Definition: SharedDefines.h:1861
Definition: SharedDefines.h:1124
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
Definition: Unit.cpp:9615
bool IsHeroic() const
Definition: ScriptedCreature.h:268
int32 GetPower(Powers power) const
Definition: Unit.cpp:11589
Definition: boss_lady_deathwhisper.cpp:39
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_lady_deathwhisper.cpp:133
Definition: boss_lady_deathwhisper.cpp:130
Unit * GetVictim() const
Definition: Unit.h:1379
Definition: boss_lady_deathwhisper.cpp:162
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: SpellAuraDefines.h:71
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
void SetPower(Powers power, int32 val)
Definition: Unit.cpp:11607
Definition: boss_lady_deathwhisper.cpp:129
EventMap events
Definition: ScriptedCreature.h:371
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
Definition: ScriptedCreature.cpp:134
Definition: boss_lady_deathwhisper.cpp:131
uint32_t uint32
Definition: g3dmath.h:168
Definition: SharedDefines.h:1860
Definition: boss_lady_deathwhisper.cpp:38
Definition: boss_lady_deathwhisper.cpp:132
Definition: SharedDefines.h:248

+ Here is the call graph for this function:

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

Reimplemented from UnitAI.

250  {
251  switch (action)
252  {
253  case ACTION_START_INTRO:
254  if (!_introDone)
255  {
256  _introDone = true;
257  Talk(SAY_INTRO_1);
265  }
266  break;
267  default:
268  break;
269  }
270  }
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
Definition: boss_lady_deathwhisper.cpp:30
Definition: boss_lady_deathwhisper.cpp:114
Definition: boss_lady_deathwhisper.cpp:116
Definition: boss_lady_deathwhisper.cpp:113
Definition: boss_lady_deathwhisper.cpp:112
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
bool _introDone
Definition: boss_lady_deathwhisper.cpp:634
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_lady_deathwhisper.cpp:161
Definition: boss_lady_deathwhisper.cpp:179
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_lady_deathwhisper.cpp:117
Definition: boss_lady_deathwhisper.cpp:115

+ Here is the call graph for this function:

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::EmpowerCultist ( )
inline
608  {
609  if (summons.empty())
610  return;
611 
612  std::list<Creature*> temp;
613  for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
614  if (Creature* cre = ObjectAccessor::GetCreature(*me, *itr))
615  if (cre->IsAlive() && (cre->GetEntry() == NPC_CULT_FANATIC || cre->GetEntry() == NPC_CULT_ADHERENT))
616  temp.push_back(cre);
617 
618  // noone to empower
619  if (temp.empty())
620  return;
621 
622  // select random cultist
626  }
Definition: boss_lady_deathwhisper.cpp:66
C::value_type const & SelectRandomContainerElement(C const &container)
Definition: Containers.h:68
iterator begin()
Definition: ScriptedCreature.h:57
Definition: icecrown_citadel.h:173
Definition: boss_lady_deathwhisper.cpp:41
Definition: Creature.h:467
Creature *const me
Definition: CreatureAI.h:71
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
SummonList summons
Definition: ScriptedCreature.h:372
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
uint8_t uint8
Definition: g3dmath.h:164
Definition: boss_lady_deathwhisper.cpp:65
uint32 GetEntry() const
Definition: Object.h:107
Definition: icecrown_citadel.h:170
StorageType::iterator iterator
Definition: ScriptedCreature.h:45
Definition: boss_lady_deathwhisper.cpp:42
bool empty() const
Definition: ScriptedCreature.h:82
iterator end()
Definition: ScriptedCreature.h:67

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::EnterCombat ( Unit who)
inlineoverridevirtual

Reimplemented from BossAI.

282  {
284  {
285  EnterEvadeMode();
287  return;
288  }
289 
290  me->setActive(true);
291  DoZoneInCombat();
292 
293  events.Reset();
295  // phase-independent events
298  // phase one only
304 
305  Talk(SAY_AGGRO);
306  DoStartNoMovement(who);
308  DoCast(me, SPELL_MANA_BARRIER, true);
309 
311  }
void DoCastSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:558
Definition: boss_lady_deathwhisper.cpp:56
Definition: DBCEnums.h:407
Definition: boss_lady_deathwhisper.cpp:125
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
void Reset()
Definition: EventMap.cpp:20
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
Definition: boss_lady_deathwhisper.cpp:118
Player * ToPlayer()
Definition: Object.h:191
Definition: boss_lady_deathwhisper.cpp:64
Difficulty GetDifficulty() const
Definition: ScriptedCreature.h:271
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_lady_deathwhisper.cpp:119
Definition: boss_lady_deathwhisper.cpp:120
void DoStartNoMovement(Unit *target)
Definition: ScriptedCreature.cpp:140
Definition: InstanceScript.h:59
Definition: boss_lady_deathwhisper.cpp:162
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_lady_deathwhisper.cpp:37
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: boss_lady_deathwhisper.cpp:123
Definition: icecrown_citadel.h:76
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
EventMap events
Definition: ScriptedCreature.h:371
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition: InstanceScript.h:236
Definition: icecrown_citadel.h:63
Definition: boss_lady_deathwhisper.cpp:124
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::Initialize ( void  )
inline
230  {
231  _waveCounter = 0;
234  }
uint32 _waveCounter
Definition: boss_lady_deathwhisper.cpp:632
ObjectGuid _nextVengefulShadeTargetGUID
Definition: boss_lady_deathwhisper.cpp:629
void Clear()
Definition: ObjectGuid.h:215
ObjectGuid _darnavanGUID
Definition: boss_lady_deathwhisper.cpp:630

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented from BossAI.

314  {
315  Talk(SAY_DEATH);
316 
317  std::set<uint32> livingAddEntries;
318  // Full House achievement
319  for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
320  if (Unit* unit = ObjectAccessor::GetUnit(*me, *itr))
321  if (unit->IsAlive() && unit->GetEntry() != NPC_VENGEFUL_SHADE)
322  livingAddEntries.insert(unit->GetEntry());
323 
324  if (livingAddEntries.size() >= 5)
326 
328  {
329  if (darnavan->IsAlive())
330  {
331  darnavan->setFaction(35);
332  darnavan->CombatStop(true);
333  darnavan->GetMotionMaster()->MoveIdle();
334  darnavan->SetReactState(REACT_PASSIVE);
335  darnavan->m_Events.AddEvent(new DaranavanMoveEvent(*darnavan), darnavan->m_Events.CalculateTime(10000));
336  darnavan->AI()->Talk(SAY_DARNAVAN_RESCUED);
337  if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
338  {
339  if (Group* group = owner->GetGroup())
340  {
341  for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
342  if (Player* member = itr->GetSource())
343  member->KilledMonsterCredit(NPC_DARNAVAN_CREDIT);
344  }
345  else
346  owner->KilledMonsterCredit(NPC_DARNAVAN_CREDIT);
347  }
348  }
349  }
350 
351  _JustDied();
352  }
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
iterator begin()
Definition: ScriptedCreature.h:57
Definition: Unit.h:1129
Definition: boss_lady_deathwhisper.cpp:70
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: boss_lady_deathwhisper.cpp:50
void _JustDied()
Definition: ScriptedCreature.cpp:471
Definition: Creature.h:467
Creature *const me
Definition: CreatureAI.h:71
#define NPC_DARNAVAN_CREDIT
Definition: boss_lady_deathwhisper.cpp:183
Definition: icecrown_citadel.h:176
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
SummonList summons
Definition: ScriptedCreature.h:372
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: boss_lady_deathwhisper.cpp:201
ObjectGuid _darnavanGUID
Definition: boss_lady_deathwhisper.cpp:630
Definition: boss_lady_deathwhisper.cpp:46
StorageType::iterator iterator
Definition: ScriptedCreature.h:45
Definition: Unit.h:1305
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=NULL)
Definition: InstanceScript.cpp:507
InstanceScript *const instance
Definition: ScriptedCreature.h:340
Definition: Group.h:191
Definition: GroupReference.h:27
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
Definition: Unit.cpp:7560
iterator end()
Definition: ScriptedCreature.h:67

+ Here is the call graph for this function:

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from BossAI.

355  {
358 
361  {
362  darnavan->DespawnOrUnsummon();
364  }
365  }
void DespawnAll()
Definition: ScriptedCreature.cpp:66
Definition: Creature.h:467
Definition: InstanceScript.h:60
Creature *const me
Definition: CreatureAI.h:71
void _JustReachedHome()
Definition: ScriptedCreature.h:366
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
SummonList summons
Definition: ScriptedCreature.h:372
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: icecrown_citadel.h:76
void Clear()
Definition: ObjectGuid.h:215
ObjectGuid _darnavanGUID
Definition: boss_lady_deathwhisper.cpp:630
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

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

Reimplemented from BossAI.

400  {
401  if (summon->GetEntry() == NPC_DARNAVAN)
402  _darnavanGUID = summon->GetGUID();
403  else
404  summons.Summon(summon);
405 
406  Unit* target = NULL;
407  if (summon->GetEntry() == NPC_VENGEFUL_SHADE)
408  {
409  target = ObjectAccessor::GetUnit(*me, _nextVengefulShadeTargetGUID); // Vengeful Shade
411  }
412  else
413  target = SelectTarget(SELECT_TARGET_RANDOM); // Wave adds
414 
415  summon->AI()->AttackStart(target); // CAN be NULL
416  if (summon->GetEntry() == NPC_REANIMATED_FANATIC)
417  summon->CastSpell(summon, SPELL_FANATIC_S_DETERMINATION, true);
418  else if (summon->GetEntry() == NPC_REANIMATED_ADHERENT)
419  summon->CastSpell(summon, SPELL_ADHERENT_S_DETERMINATION, true);
420  }
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:92
arena_t NULL
Definition: jemalloc_internal.h:624
Creature *const me
Definition: CreatureAI.h:71
Definition: icecrown_citadel.h:172
Definition: UnitAI.h:35
Definition: boss_lady_deathwhisper.cpp:80
CreatureAI * AI() const
Definition: Creature.h:525
Definition: icecrown_citadel.h:176
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
Definition: boss_lady_deathwhisper.cpp:90
ObjectGuid _nextVengefulShadeTargetGUID
Definition: boss_lady_deathwhisper.cpp:629
SummonList summons
Definition: ScriptedCreature.h:372
void Clear()
Definition: ObjectGuid.h:215
ObjectGuid const & GetGUID() const
Definition: Object.h:105
ObjectGuid _darnavanGUID
Definition: boss_lady_deathwhisper.cpp:630
uint32 GetEntry() const
Definition: Object.h:107
#define NPC_DARNAVAN
Definition: boss_lady_deathwhisper.cpp:182
Definition: Unit.h:1305
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29
Definition: icecrown_citadel.h:175

+ Here is the call graph for this function:

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

Reimplemented from ScriptedAI.

368  {
369  if (victim->GetTypeId() == TYPEID_PLAYER)
370  Talk(SAY_KILL);
371  }
TypeID GetTypeId() const
Definition: Object.h:113
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: ObjectGuid.h:33
Definition: boss_lady_deathwhisper.cpp:44

+ Here is the call graph for this function:

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::ReanimateCultist ( )
inline
578  {
579  if (_reanimationQueue.empty())
580  return;
581 
582  ObjectGuid cultistGUID = _reanimationQueue.front();
583  Creature* cultist = ObjectAccessor::GetCreature(*me, cultistGUID);
584  _reanimationQueue.pop_front();
585  if (!cultist)
586  return;
587 
589  DoCast(cultist, SPELL_DARK_MARTYRDOM_T);
590  }
Definition: boss_lady_deathwhisper.cpp:43
Definition: Creature.h:467
Creature *const me
Definition: CreatureAI.h:71
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: ObjectGuid.h:189
GuidDeque _reanimationQueue
Definition: boss_lady_deathwhisper.cpp:631
Definition: boss_lady_deathwhisper.cpp:67

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

237  {
238  _Reset();
241  Initialize();
247  }
Definition: boss_lady_deathwhisper.cpp:56
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
void Initialize()
Definition: boss_lady_deathwhisper.cpp:229
Definition: SharedDefines.h:1861
Definition: SharedDefines.h:1124
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
Definition: Unit.cpp:9615
Definition: boss_lady_deathwhisper.cpp:64
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_lady_deathwhisper.cpp:162
void _Reset()
Definition: ScriptedCreature.cpp:457
Definition: SpellAuraDefines.h:71
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
#define SPELL_BERSERK
Definition: boss_four_horsemen.cpp:74
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
void SetPower(Powers power, int32 val)
Definition: Unit.cpp:11607
EventMap events
Definition: ScriptedCreature.h:371
int32 GetMaxPower(Powers power) const
Definition: Unit.cpp:11598
Definition: SharedDefines.h:1860
Definition: SharedDefines.h:248

+ Here is the call graph for this function:

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::SetGUID ( ObjectGuid  guid,
int32  id 
)
inlineoverridevirtual

Reimplemented from UnitAI.

569  {
570  if (id != GUID_CULTIST)
571  return;
572 
573  _reanimationQueue.push_back(guid);
575  }
Definition: boss_lady_deathwhisper.cpp:162
#define GUID_CULTIST
Definition: boss_lady_deathwhisper.cpp:188
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
EventMap events
Definition: ScriptedCreature.h:371
GuidDeque _reanimationQueue
Definition: boss_lady_deathwhisper.cpp:631
Definition: boss_lady_deathwhisper.cpp:126

+ Here is the call graph for this function:

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

Reimplemented from ScriptedAI.

593  {
594  if (spell->Id == SPELL_DARK_MARTYRDOM_T)
595  {
596  Position pos = target->GetPosition();
597  if (target->GetEntry() == NPC_CULT_FANATIC)
599  else
601 
602  if (TempSummon* summon = target->ToTempSummon())
603  summon->UnSummon();
604  }
605  }
Definition: TemporarySummon.h:40
TempSummon * ToTempSummon()
Definition: Unit.h:2206
virtual void UnSummon(uint32 msTime=0)
Definition: TemporarySummon.cpp:237
Creature *const me
Definition: CreatureAI.h:71
Definition: icecrown_citadel.h:172
void GetPosition(float &x, float &y) const
Definition: Position.h:109
Definition: Object.h:59
Definition: Position.h:27
uint32 GetEntry() const
Definition: Object.h:107
Definition: icecrown_citadel.h:170
Definition: boss_lady_deathwhisper.cpp:67
Definition: icecrown_citadel.h:175
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::Summon ( uint32  entry,
const Position pos 
)
inline
563  {
564  if (TempSummon* summon = me->SummonCreature(entry, pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000))
565  summon->CastSpell(summon, SPELL_TELEPORT_VISUAL);
566  }
Definition: TemporarySummon.h:40
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_lady_deathwhisper.cpp:73
Definition: Object.h:59
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::SummonWaveP1 ( )
inline
522  {
523  uint8 addIndex = _waveCounter & 1;
524  uint8 addIndexOther = uint8(addIndex ^ 1);
525 
526  // Summon first add, replace it with Darnavan if weekly quest is active
527  if (_waveCounter || !sPoolMgr->IsSpawnedObject<Quest>(QUEST_DEPROGRAMMING))
528  Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3]);
529  else
530  Summon(NPC_DARNAVAN, SummonPositions[addIndex * 3]);
531 
532  Summon(SummonEntries[addIndexOther], SummonPositions[addIndex * 3 + 1]);
533  Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3 + 2]);
534  if (Is25ManRaid())
535  {
536  Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3]);
537  Summon(SummonEntries[addIndex], SummonPositions[addIndexOther * 3 + 1]);
538  Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3 + 2]);
540  }
541 
542  ++_waveCounter;
543  }
Definition: QuestDef.h:279
Position const SummonPositions[7]
Definition: boss_lady_deathwhisper.cpp:190
uint32 _waveCounter
Definition: boss_lady_deathwhisper.cpp:632
#define sPoolMgr
Definition: PoolMgr.h:166
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
uint32 const SummonEntries[2]
Definition: boss_lady_deathwhisper.cpp:186
uint8_t uint8
Definition: g3dmath.h:164
#define QUEST_DEPROGRAMMING
Definition: boss_lady_deathwhisper.cpp:184
uint8_t uint8
Definition: Define.h:152
#define NPC_DARNAVAN
Definition: boss_lady_deathwhisper.cpp:182
void Summon(uint32 entry, const Position &pos)
Definition: boss_lady_deathwhisper.cpp:562
bool Is25ManRaid() const
Definition: ScriptedCreature.h:274

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_lady_deathwhisper::boss_lady_deathwhisperAI::SummonWaveP2 ( )
inline
547  {
548  if (Is25ManRaid())
549  {
550  uint8 addIndex = _waveCounter & 1;
551  Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3]);
552  Summon(SummonEntries[addIndex ^ 1], SummonPositions[addIndex * 3 + 1]);
553  Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3+ 2]);
554  }
555  else
557 
558  ++_waveCounter;
559  }
Position const SummonPositions[7]
Definition: boss_lady_deathwhisper.cpp:190
uint32 _waveCounter
Definition: boss_lady_deathwhisper.cpp:632
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
uint32 const SummonEntries[2]
Definition: boss_lady_deathwhisper.cpp:186
uint8_t uint8
Definition: Define.h:152
void Summon(uint32 entry, const Position &pos)
Definition: boss_lady_deathwhisper.cpp:562
bool Is25ManRaid() const
Definition: ScriptedCreature.h:274

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented from BossAI.

423  {
425  return;
426 
427  events.Update(diff);
428 
430  return;
431 
432  while (uint32 eventId = events.ExecuteEvent())
433  {
434  switch (eventId)
435  {
436  case EVENT_INTRO_2:
437  Talk(SAY_INTRO_2);
438  break;
439  case EVENT_INTRO_3:
440  Talk(SAY_INTRO_3);
441  break;
442  case EVENT_INTRO_4:
443  Talk(SAY_INTRO_4);
444  break;
445  case EVENT_INTRO_5:
446  Talk(SAY_INTRO_5);
447  break;
448  case EVENT_INTRO_6:
449  Talk(SAY_INTRO_6);
450  break;
451  case EVENT_INTRO_7:
452  Talk(SAY_INTRO_7);
453  break;
455  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
456  DoCast(target, SPELL_DEATH_AND_DECAY);
458  break;
461  for (uint8 i = 0; i < _dominateMindCount; i++)
462  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_DOMINATE_MIND_H))
463  DoCast(target, SPELL_DOMINATE_MIND_H);
465  break;
467  SummonWaveP1();
469  break;
471  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
472  DoCast(target, SPELL_SHADOW_BOLT);
474  break;
477  break;
479  EmpowerCultist();
481  break;
482  case EVENT_P2_FROSTBOLT:
485  break;
489  break;
493  break;
495  if (Unit* shadeTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
496  {
497  _nextVengefulShadeTargetGUID = shadeTarget->GetGUID();
498  DoCast(shadeTarget, SPELL_SUMMON_SHADE);
499  }
501  break;
503  SummonWaveP2();
505  break;
506  case EVENT_BERSERK:
508  Talk(SAY_BERSERK);
509  break;
510  }
511  }
512 
513  // We should not melee attack when barrier is up
515  return;
516 
518  }
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4240
Definition: boss_lady_deathwhisper.cpp:56
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
Definition: boss_lady_deathwhisper.cpp:35
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: boss_lady_deathwhisper.cpp:45
Definition: boss_lady_deathwhisper.cpp:125
Definition: Unit.h:565
Definition: boss_lady_deathwhisper.cpp:163
Definition: boss_lady_deathwhisper.cpp:31
Definition: boss_lady_deathwhisper.cpp:114
void SummonWaveP2()
Definition: boss_lady_deathwhisper.cpp:546
Definition: boss_lady_deathwhisper.cpp:57
void EmpowerCultist()
Definition: boss_lady_deathwhisper.cpp:607
Definition: boss_lady_deathwhisper.cpp:116
bool IsHeroic() const
Definition: ScriptedCreature.h:268
Definition: boss_lady_deathwhisper.cpp:63
Definition: boss_lady_deathwhisper.cpp:118
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
Definition: boss_lady_deathwhisper.cpp:36
Definition: boss_lady_deathwhisper.cpp:32
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_lady_deathwhisper.cpp:119
Definition: boss_lady_deathwhisper.cpp:120
Definition: UnitAI.h:35
Definition: boss_lady_deathwhisper.cpp:113
Definition: boss_lady_deathwhisper.cpp:59
Definition: boss_lady_deathwhisper.cpp:133
Definition: boss_lady_deathwhisper.cpp:130
Definition: boss_lady_deathwhisper.cpp:62
Definition: boss_lady_deathwhisper.cpp:162
Definition: boss_lady_deathwhisper.cpp:58
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
Definition: boss_lady_deathwhisper.cpp:112
uint32_t uint32
Definition: Define.h:150
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: boss_lady_deathwhisper.cpp:60
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void ReanimateCultist()
Definition: boss_lady_deathwhisper.cpp:577
#define SPELL_BERSERK
Definition: boss_four_horsemen.cpp:74
ObjectGuid _nextVengefulShadeTargetGUID
Definition: boss_lady_deathwhisper.cpp:629
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_lady_deathwhisper.cpp:123
Definition: boss_lady_deathwhisper.cpp:34
void Update(uint32 time)
Definition: EventMap.h:54
Definition: boss_lady_deathwhisper.cpp:161
Definition: boss_lady_deathwhisper.cpp:129
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
uint8 const _dominateMindCount
Definition: boss_lady_deathwhisper.cpp:633
void SummonWaveP1()
Definition: boss_lady_deathwhisper.cpp:521
Definition: boss_lady_deathwhisper.cpp:33
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
Definition: boss_lady_deathwhisper.cpp:61
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
uint8_t uint8
Definition: Define.h:152
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_lady_deathwhisper.cpp:117
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
Definition: boss_lady_deathwhisper.cpp:131
Definition: Unit.h:1305
Definition: boss_lady_deathwhisper.cpp:126
Definition: boss_lady_deathwhisper.cpp:124
Definition: boss_lady_deathwhisper.cpp:115
Definition: boss_lady_deathwhisper.cpp:40
Definition: boss_lady_deathwhisper.cpp:132

+ Here is the call graph for this function:

Member Data Documentation

ObjectGuid boss_lady_deathwhisper::boss_lady_deathwhisperAI::_darnavanGUID
private
uint8 const boss_lady_deathwhisper::boss_lady_deathwhisperAI::_dominateMindCount
private
bool boss_lady_deathwhisper::boss_lady_deathwhisperAI::_introDone
private
ObjectGuid boss_lady_deathwhisper::boss_lady_deathwhisperAI::_nextVengefulShadeTargetGUID
private
GuidDeque boss_lady_deathwhisper::boss_lady_deathwhisperAI::_reanimationQueue
private
uint32 boss_lady_deathwhisper::boss_lady_deathwhisperAI::_waveCounter
private

The documentation for this struct was generated from the following file: