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

Public Member Functions

 boss_archimondeAI (Creature *creature)
 
void Reset () override
 
void DoCastProtection ()
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void KilledUnit (Unit *victim) override
 
void GainSoulCharge (Player *victim)
 
void JustDied (Unit *) override
 
bool CanUseFingerOfDeath ()
 
void JustSummoned (Creature *summoned) override
 
void DoCastDoomfire ()
 
void SummonDoomfire (Unit *target)
 
void UnleashSoulCharge ()
 
void UpdateAI (uint32 diff) 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
 

Public Attributes

InstanceScriptinstance
 
EventMap events
 
ObjectGuid DoomfireSpiritGUID
 
ObjectGuid WorldTreeGUID
 
uint8 SoulChargeCount
 
uint8 WispCount
 
SummonList summons
 
bool Enraged
 
bool BelowTenPercent
 
bool HasProtected
 
bool IsChanneling
 
std::list< Unit * > fingerOfDeathTargets
 
std::list< Unit * > spellEffectTargets
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 

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 ()
 
- 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_archimondeAI()

boss_archimonde::boss_archimondeAI::boss_archimondeAI ( Creature creature)
inline
267 : BossAI(creature, BOSS_ARCHIMONDE), summons(me),
268 Enraged(false), BelowTenPercent(false), HasProtected(false), IsChanneling(false)
269 {
270 instance = creature->GetInstanceScript();
271 }
@ BOSS_ARCHIMONDE
Definition: hyjal.h:32
Creature * me
Definition: ScriptedCreature.h:282
Definition: ScriptedCreature.h:469
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
InstanceScript * instance
Definition: boss_archimonde.cpp:273
bool Enraged
Definition: boss_archimonde.cpp:283
SummonList summons
Definition: boss_archimonde.cpp:281
bool BelowTenPercent
Definition: boss_archimonde.cpp:284
bool HasProtected
Definition: boss_archimonde.cpp:285
bool IsChanneling
Definition: boss_archimonde.cpp:286

References WorldObject::GetInstanceScript(), and instance.

Member Function Documentation

◆ CanUseFingerOfDeath()

bool boss_archimonde::boss_archimondeAI::CanUseFingerOfDeath ( )
inline
422 {
423 // Cast finger of death below 10% health
424 if (BelowTenPercent)
425 return true;
426
427 if (me->IsAlive())
428 {
429 /* Reset the list before checking for new targets
430 * else we will be using old targets that could have
431 * been distant but are no longer.*/
432 fingerOfDeathTargets.clear();
433
434 // First we check if our current victim is in melee range or not.
435 Unit* victim = me->GetVictim();
436 if (victim && me->IsWithinMeleeRange(victim))
437 return false;
438
440 if (threatlist.empty())
441 return false;
442
443 auto itr = threatlist.begin();
444 for (; itr != threatlist.end(); ++itr)
445 {
446 Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
447 if (unit && unit->IsAlive() && me->IsWithinMeleeRange(unit))
448 fingerOfDeathTargets.push_back(unit);
449 }
450
451 /* Previous check searched for targets in meele range and
452 * added it to targets list. If there are no targets in meele
453 * range return true, which makes Archimonde cast Finger of Death.
454 */
455 return fingerOfDeathTargets.empty();
456 }
457 return false;
458 }
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:202
std::list< HostileReference * > StorageType
Definition: ThreatMgr.h:148
ThreatContainer::StorageType const & GetThreatList() const
Definition: ThreatMgr.h:274
Definition: Unit.h:1302
bool IsAlive() const
Definition: Unit.h:1822
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition: Unit.cpp:683
Unit * GetVictim() const
Definition: Unit.h:1398
ThreatMgr & GetThreatMgr()
Definition: Unit.h:2159
std::list< Unit * > fingerOfDeathTargets
Definition: boss_archimonde.cpp:288

References BelowTenPercent, fingerOfDeathTargets, ThreatMgr::GetThreatList(), Unit::GetThreatMgr(), ObjectAccessor::GetUnit(), Unit::GetVictim(), Unit::IsAlive(), Unit::IsWithinMeleeRange(), and ScriptedAI::me.

Referenced by UpdateAI().

◆ DoCastDoomfire()

void boss_archimonde::boss_archimondeAI::DoCastDoomfire ( )
inline
491 {
492 // Three doomfire can be up at the same time
494 Unit* temp = SelectTarget(SelectTargetMethod::Random, 1);
495 if (!temp)
496 temp = me->GetVictim();
497
498 //replace with spell cast 31903 once implicitTarget 73 implemented
499 SummonDoomfire(temp);
500 }
@ SAY_DOOMFIRE
Definition: boss_archimonde.cpp:35
Talk
Definition: boss_fathomlord_karathress.cpp:25
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:110
void SummonDoomfire(Unit *target)
Definition: boss_archimonde.cpp:503

References Unit::GetVictim(), ScriptedAI::me, SAY_DOOMFIRE, UnitAI::SelectTarget(), and SummonDoomfire().

Referenced by UpdateAI().

◆ DoCastProtection()

void boss_archimonde::boss_archimondeAI::DoCastProtection ( )
inline
321 {
322 // lets get spell info
323 SpellInfo const* info = sSpellMgr->GetSpellInfo(SPELL_PROTECTION_OF_ELUNE);
324
325 if (!info)
326 return;
327
328 // Now lets get archimode threat list
330
331 if (t_list.empty())
332 return;
333
334 ThreatContainer::StorageType::const_iterator itr = t_list.begin();
335
336 if (Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
337 if (target->IsAlive() && target->GetTypeId() == TYPEID_PLAYER)
338 spellEffectTargets.push_back(target);
339
340 for (auto iter = spellEffectTargets.begin(); iter != spellEffectTargets.end(); ++iter)
341 if (Unit* target = *iter)
342 {
343 target->AddAura(SPELL_PROTECTION_OF_ELUNE, target);
344
345 // Immunity against Hand of death
346 target->ApplySpellImmune(SPELL_HAND_OF_DEATH, IMMUNITY_ID, SPELL_HAND_OF_DEATH, true);
347 target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_HAND_OF_DEATH, true);
348 }
349 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
#define sSpellMgr
Definition: SpellMgr.h:825
@ SPELL_PROTECTION_OF_ELUNE
Definition: boss_archimonde.cpp:47
@ SPELL_HAND_OF_DEATH
Definition: boss_archimonde.cpp:54
@ IMMUNITY_ID
Definition: SharedDefines.h:1400
Definition: SpellInfo.h:314
std::list< Unit * > spellEffectTargets
Definition: boss_archimonde.cpp:289

References ThreatMgr::GetThreatList(), Unit::GetThreatMgr(), ObjectAccessor::GetUnit(), IMMUNITY_ID, ScriptedAI::me, SPELL_HAND_OF_DEATH, SPELL_PROTECTION_OF_ELUNE, spellEffectTargets, sSpellMgr, and TYPEID_PLAYER.

Referenced by UpdateAI().

◆ GainSoulCharge()

void boss_archimonde::boss_archimondeAI::GainSoulCharge ( Player victim)
inline
374 {
375 switch (victim->getClass())
376 {
377 case CLASS_PRIEST:
378 case CLASS_PALADIN:
379 case CLASS_WARLOCK:
380 victim->CastSpell(me, SPELL_SOUL_CHARGE_RED, true);
381 break;
382 case CLASS_MAGE:
383 case CLASS_ROGUE:
384 case CLASS_WARRIOR:
385 victim->CastSpell(me, SPELL_SOUL_CHARGE_YELLOW, true);
386 break;
387 case CLASS_DRUID:
388 case CLASS_SHAMAN:
389 case CLASS_HUNTER:
390 victim->CastSpell(me, SPELL_SOUL_CHARGE_GREEN, true);
391 break;
392 }
393
394 events.ScheduleEvent(EVENT_SPELL_UNLEASH_SOUL_CHARGES, urand(2000, 10000));
396 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ SPELL_SOUL_CHARGE_RED
Definition: boss_archimonde.cpp:62
@ SPELL_SOUL_CHARGE_GREEN
Definition: boss_archimonde.cpp:61
@ SPELL_SOUL_CHARGE_YELLOW
Definition: boss_archimonde.cpp:60
@ EVENT_SPELL_UNLEASH_SOUL_CHARGES
Definition: boss_archimonde.cpp:83
events
Definition: boss_sartura.cpp:43
@ CLASS_HUNTER
Definition: SharedDefines.h:143
@ CLASS_DRUID
Definition: SharedDefines.h:151
@ CLASS_SHAMAN
Definition: SharedDefines.h:147
@ CLASS_PRIEST
Definition: SharedDefines.h:145
@ CLASS_WARRIOR
Definition: SharedDefines.h:141
@ CLASS_WARLOCK
Definition: SharedDefines.h:149
@ CLASS_MAGE
Definition: SharedDefines.h:148
@ CLASS_PALADIN
Definition: SharedDefines.h:142
@ CLASS_ROGUE
Definition: SharedDefines.h:144
uint8 getClass() const
Definition: Unit.h:1438
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
uint8 SoulChargeCount
Definition: boss_archimonde.cpp:279

References Unit::CastSpell(), CLASS_DRUID, CLASS_HUNTER, CLASS_MAGE, CLASS_PALADIN, CLASS_PRIEST, CLASS_ROGUE, CLASS_SHAMAN, CLASS_WARLOCK, CLASS_WARRIOR, EVENT_SPELL_UNLEASH_SOUL_CHARGES, Unit::getClass(), ScriptedAI::me, SoulChargeCount, SPELL_SOUL_CHARGE_GREEN, SPELL_SOUL_CHARGE_RED, SPELL_SOUL_CHARGE_YELLOW, and urand().

Referenced by KilledUnit().

◆ JustDied()

void boss_archimonde::boss_archimondeAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

399 {
401
404
405 // Reset scheduled events
406 events.CancelEvent(EVENT_SPELL_FEAR);
407 events.CancelEvent(EVENT_SPELL_AIR_BURST);
410 events.CancelEvent(EVENT_SPELL_DOOMFIRE);
414 events.CancelEvent(EVENT_ENRAGE);
415
416 spellEffectTargets.clear();
417 fingerOfDeathTargets.clear();
419 }
@ DONE
Definition: InstanceScript.h:60
@ SAY_DEATH
Definition: boss_archimonde.cpp:39
@ EVENT_SPELL_PROTECTION_OF_ELUNE
Definition: boss_archimonde.cpp:87
@ EVENT_ENRAGE
Definition: boss_archimonde.cpp:88
@ EVENT_SPELL_FEAR
Definition: boss_archimonde.cpp:80
@ EVENT_SPELL_AIR_BURST
Definition: boss_archimonde.cpp:81
@ EVENT_SPELL_FINGER_OF_DEATH
Definition: boss_archimonde.cpp:85
@ EVENT_SPELL_DOOMFIRE
Definition: boss_archimonde.cpp:84
@ EVENT_SPELL_HAND_OF_DEATH
Definition: boss_archimonde.cpp:86
@ EVENT_SPELL_GRIP_OF_THE_LEGION
Definition: boss_archimonde.cpp:82
@ DATA_ARCHIMONDEEVENT
Definition: hyjal.h:40
@ ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE
Definition: DBCEnums.h:130
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
uint32 GetEntry() const
Definition: Object.h:109
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
Definition: InstanceScript.cpp:611
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

References ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, DATA_ARCHIMONDEEVENT, SummonList::DespawnAll(), DONE, InstanceScript::DoUpdateAchievementCriteria(), EVENT_ENRAGE, EVENT_SPELL_AIR_BURST, EVENT_SPELL_DOOMFIRE, EVENT_SPELL_FEAR, EVENT_SPELL_FINGER_OF_DEATH, EVENT_SPELL_GRIP_OF_THE_LEGION, EVENT_SPELL_HAND_OF_DEATH, EVENT_SPELL_PROTECTION_OF_ELUNE, EVENT_SPELL_UNLEASH_SOUL_CHARGES, fingerOfDeathTargets, Object::GetEntry(), instance, ScriptedAI::me, SAY_DEATH, ZoneScript::SetData(), spellEffectTargets, and summons.

◆ JustEngagedWith()

void boss_archimonde::boss_archimondeAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

352 {
356
358 events.ScheduleEvent(EVENT_SPELL_AIR_BURST, urand(25000, 35000));
359 events.ScheduleEvent(EVENT_SPELL_DOOMFIRE, urand(10000, 20000));
360 events.ScheduleEvent(EVENT_SPELL_FEAR, 42000);
361 events.ScheduleEvent(EVENT_SPELL_GRIP_OF_THE_LEGION, 2000);
362 events.ScheduleEvent(EVENT_SPELL_FINGER_OF_DEATH, 1000);
363 }
@ CURRENT_CHANNELED_SPELL
Definition: Unit.h:992
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ SAY_AGGRO
Definition: boss_archimonde.cpp:34
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:94
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed=true, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4014

References CURRENT_CHANNELED_SPELL, DATA_ARCHIMONDEEVENT, CreatureAI::DoZoneInCombat(), EVENT_SPELL_AIR_BURST, EVENT_SPELL_DOOMFIRE, EVENT_SPELL_FEAR, EVENT_SPELL_FINGER_OF_DEATH, EVENT_SPELL_GRIP_OF_THE_LEGION, IN_PROGRESS, instance, Unit::InterruptSpell(), ScriptedAI::me, SAY_AGGRO, ZoneScript::SetData(), and urand().

◆ JustSummoned()

void boss_archimonde::boss_archimondeAI::JustSummoned ( Creature summoned)
inlineoverridevirtual

Reimplemented from BossAI.

461 {
462 summons.Summon(summoned);
463 if (summoned->GetEntry() == CREATURE_ANCIENT_WISP)
464 summoned->AI()->AttackStart(me);
465 else
466 {
467 summoned->SetFaction(me->GetFaction());
470 }
471
472 if (summoned->GetEntry() == CREATURE_DOOMFIRE_SPIRIT)
473 {
474 DoomfireSpiritGUID = summoned->GetGUID();
475 }
476
477 if (summoned->GetEntry() == CREATURE_DOOMFIRE)
478 {
479 summoned->CastSpell(summoned, SPELL_DOOMFIRE_SPAWN, false);
480 summoned->CastSpell(summoned, SPELL_DOOMFIRE, true, 0, 0, me->GetGUID());
481
482 if (Unit* DoomfireSpirit = ObjectAccessor::GetUnit(*me, DoomfireSpiritGUID))
483 {
484 summoned->GetMotionMaster()->MoveFollow(DoomfireSpirit, 0.0f, 0.0f);
486 }
487 }
488 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition: Unit.h:449
@ UNIT_FLAG_NOT_SELECTABLE
Definition: Unit.h:473
@ SPELL_DOOMFIRE
Definition: boss_archimonde.cpp:59
@ SPELL_DOOMFIRE_SPAWN
Definition: boss_archimonde.cpp:58
@ CREATURE_DOOMFIRE_SPIRIT
Definition: boss_archimonde.cpp:72
@ CREATURE_ANCIENT_WISP
Definition: boss_archimonde.cpp:73
@ CREATURE_DOOMFIRE
Definition: boss_archimonde.cpp:71
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:27
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90
CreatureAI * AI() const
Definition: Creature.h:136
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
void Clear()
Definition: ObjectGuid.h:140
void SetFaction(uint32 faction)
Definition: Unit.cpp:10064
MotionMaster * GetMotionMaster()
Definition: Unit.h:2276
uint32 GetFaction() const
Definition: Unit.h:1509
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:1495
void MoveFollow(Unit *target, float dist, float angle, MovementSlot slot=MOTION_SLOT_ACTIVE)
Definition: MotionMaster.cpp:394
ObjectGuid DoomfireSpiritGUID
Definition: boss_archimonde.cpp:276

References Creature::AI(), UnitAI::AttackStart(), Unit::CastSpell(), ObjectGuid::Clear(), CREATURE_ANCIENT_WISP, CREATURE_DOOMFIRE, CREATURE_DOOMFIRE_SPIRIT, DoomfireSpiritGUID, Object::GetEntry(), Unit::GetFaction(), Object::GetGUID(), Unit::GetMotionMaster(), ObjectAccessor::GetUnit(), ScriptedAI::me, MotionMaster::MoveFollow(), Unit::SetFaction(), Unit::SetUnitFlag(), SPELL_DOOMFIRE, SPELL_DOOMFIRE_SPAWN, SummonList::Summon(), summons, UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_NOT_SELECTABLE.

◆ KilledUnit()

void boss_archimonde::boss_archimondeAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

366 {
367 Talk(SAY_SLAY);
368
369 if (victim && victim->GetTypeId() == TYPEID_PLAYER)
370 GainSoulCharge(victim->ToPlayer());
371 }
@ SAY_SLAY
Definition: boss_archimonde.cpp:37
Player * ToPlayer()
Definition: Object.h:195
TypeID GetTypeId() const
Definition: Object.h:121
void GainSoulCharge(Player *victim)
Definition: boss_archimonde.cpp:373

References GainSoulCharge(), Object::GetTypeId(), SAY_SLAY, Object::ToPlayer(), and TYPEID_PLAYER.

◆ Reset()

void boss_archimonde::boss_archimondeAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

292 {
294
298 WispCount = 0;
299 Enraged = false;
300 BelowTenPercent = false;
301 HasProtected = false;
302 IsChanneling = false;
303
304 // Reset player's immunity to Spells
305 for (auto it = spellEffectTargets.begin(); it != spellEffectTargets.end(); ++it)
306 {
307 Unit* affected_unit = ObjectAccessor::GetUnit(*me, (*it)->GetGUID());
308
309 // Remove Immunity against Hand of death
311 affected_unit->ApplySpellImmune(0, IMMUNITY_ID, SPELL_HAND_OF_DEATH, false);
312 }
313
314 spellEffectTargets.clear();
315 fingerOfDeathTargets.clear();
317 events.ScheduleEvent(EVENT_DRAIN_WORLD_TREE, 0);
318 }
@ REACT_AGGRESSIVE
Definition: Unit.h:1037
@ NOT_STARTED
Definition: InstanceScript.h:57
@ EVENT_DRAIN_WORLD_TREE
Definition: boss_archimonde.cpp:79
void SetReactState(ReactStates st)
Definition: Creature.h:90
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition: Unit.cpp:13383
ObjectGuid WorldTreeGUID
Definition: boss_archimonde.cpp:277
uint8 WispCount
Definition: boss_archimonde.cpp:280

References Unit::ApplySpellImmune(), BelowTenPercent, ObjectGuid::Clear(), DATA_ARCHIMONDEEVENT, SummonList::DespawnAll(), DoomfireSpiritGUID, Enraged, EVENT_DRAIN_WORLD_TREE, fingerOfDeathTargets, Object::GetGUID(), ObjectAccessor::GetUnit(), HasProtected, IMMUNITY_ID, instance, IsChanneling, ScriptedAI::me, NOT_STARTED, REACT_AGGRESSIVE, ZoneScript::SetData(), Creature::SetReactState(), SPELL_HAND_OF_DEATH, spellEffectTargets, summons, WispCount, and WorldTreeGUID.

◆ SummonDoomfire()

void boss_archimonde::boss_archimondeAI::SummonDoomfire ( Unit target)
inline
504 {
506 target->GetPositionX() + 15.0f, target->GetPositionY() + 15.0f, target->GetPositionZ(), 0,
508
510 target->GetPositionX() - 15.0f, target->GetPositionY() - 15.0f, target->GetPositionZ(), 0,
512
513 doomfire1->SetVisible(false);
514 doomfire2->SetVisible(false);
515 }
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:44
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
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
void SetVisible(bool x)
Definition: Unit.cpp:14220

References CREATURE_DOOMFIRE, CREATURE_DOOMFIRE_SPIRIT, Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), ScriptedAI::me, Unit::SetVisible(), WorldObject::SummonCreature(), and TEMPSUMMON_TIMED_DESPAWN.

Referenced by DoCastDoomfire().

◆ UnleashSoulCharge()

void boss_archimonde::boss_archimondeAI::UnleashSoulCharge ( )
inline
518 {
520
521 uint32 chargeSpell = 0;
522 uint32 unleashSpell = 0;
523
524 switch (urand(0, 2))
525 {
526 case 0:
527 chargeSpell = SPELL_SOUL_CHARGE_RED;
528 unleashSpell = SPELL_UNLEASH_SOUL_RED;
529 break;
530 case 1:
531 chargeSpell = SPELL_SOUL_CHARGE_YELLOW;
532 unleashSpell = SPELL_UNLEASH_SOUL_YELLOW;
533 break;
534 case 2:
535 chargeSpell = SPELL_SOUL_CHARGE_GREEN;
536 unleashSpell = SPELL_UNLEASH_SOUL_GREEN;
537 break;
538 }
539
540 if (me->HasAura(chargeSpell))
541 {
542 me->RemoveAuraFromStack(chargeSpell);
543 DoCastVictim(unleashSpell);
545 }
546 }
std::uint32_t uint32
Definition: Define.h:108
@ SPELL_UNLEASH_SOUL_GREEN
Definition: boss_archimonde.cpp:64
@ SPELL_UNLEASH_SOUL_RED
Definition: boss_archimonde.cpp:65
@ SPELL_UNLEASH_SOUL_YELLOW
Definition: boss_archimonde.cpp:63
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:240
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4081
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5636
void RemoveAuraFromStack(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4871

References UnitAI::DoCastVictim(), Unit::HasAura(), Unit::InterruptNonMeleeSpells(), ScriptedAI::me, Unit::RemoveAuraFromStack(), SoulChargeCount, SPELL_SOUL_CHARGE_GREEN, SPELL_SOUL_CHARGE_RED, SPELL_SOUL_CHARGE_YELLOW, SPELL_UNLEASH_SOUL_GREEN, SPELL_UNLEASH_SOUL_RED, SPELL_UNLEASH_SOUL_YELLOW, and urand().

Referenced by UpdateAI().

◆ UpdateAI()

void boss_archimonde::boss_archimondeAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

549 {
550 events.Update(diff);
551
552 // Event for draining the tree
553 if (!me->IsInCombat())
554 {
555 // Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished.
557 {
558 me->SetVisible(false);
560 }
561
563 {
565 me->SetVisible(true);
566 }
567
568 switch (events.ExecuteEvent())
569 {
571 if (!IsChanneling)
572 {
574
575 if (temp)
576 WorldTreeGUID = temp->GetGUID();
577
578 if (Unit* Nordrassil = ObjectAccessor::GetUnit(*me, WorldTreeGUID))
579 {
580 Nordrassil->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
581 Nordrassil->SetDisplayId(11686);
582 DoCast(Nordrassil, SPELL_DRAIN_WORLD_TREE);
583 IsChanneling = true;
584 }
585 }
586
587 if (Unit* Nordrassil = ObjectAccessor::GetUnit(*me, WorldTreeGUID))
588 Nordrassil->CastSpell(me, SPELL_DRAIN_WORLD_TREE_2, true);
589 break;
590 }
591 }
592
593 if (!UpdateVictim())
594 return;
595
597 return;
598
599 if (me->HealthBelowPct(10) && !BelowTenPercent)
600 events.ScheduleEvent(EVENT_BELOW_10_PERCENT_HP, 0);
601
602 switch (events.ExecuteEvent())
603 {
605 {
606 // If Archimonde is too close to the world tree this will ENRAGE him
608 if (Check)
609 {
610 Check->SetVisible(false);
611
612 if (me->IsWithinDistInMap(Check, 75))
613 {
614 events.ScheduleEvent(EVENT_TOO_CLOSE_TO_WORLD_TREE, 0);
615 break;
616 }
617 }
618 events.RepeatEvent(5000);
619 break;
620 }
623 DoCastProtection(); // Protection of Elune against Finger and Hand of Death
624 BelowTenPercent = true;
625 me->GetMotionMaster()->Clear(false);
627 events.ScheduleEvent(EVENT_ENRAGE, 0);
628 events.ScheduleEvent(EVENT_ENRAGE_ROOT, 0);
629 events.ScheduleEvent(EVENT_SUMMON_WISPS, 1000);
630 events.ScheduleEvent(EVENT_SPELL_HAND_OF_DEATH, 1500);
631 events.ScheduleEvent(EVENT_SPELL_FINGER_OF_DEATH, 2500);
632 break;
634 // If there are more than 30 Wisps then kill Archimonde
635 if (WispCount >= 30)
636 {
638 return; // Finish the encounter and no more event repeat
639 }
640 DoSpawnCreature(CREATURE_ANCIENT_WISP, float(rand() % 40), float(rand() % 40), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
641 ++WispCount;
642 events.ScheduleEvent(EVENT_SUMMON_WISPS, 1500);
643 break;
647 events.ScheduleEvent(EVENT_SPELL_HAND_OF_DEATH, 3000);
648 break;
651 {
652 Unit* target = SelectTarget(SelectTargetMethod::Random, 0);
655 }
656 events.ScheduleEvent(EVENT_SPELL_FINGER_OF_DEATH, 3500);
657 break;
659 DoCast(SelectTarget(SelectTargetMethod::Random, 0), SPELL_GRIP_OF_THE_LEGION);
660 events.ScheduleEvent(EVENT_SPELL_GRIP_OF_THE_LEGION, urand(5000, 25000));
661 break;
664 DoCast(SelectTarget(SelectTargetMethod::Random, 0), SPELL_AIR_BURST);
665 events.ScheduleEvent(EVENT_SPELL_AIR_BURST, urand(25000, 40000));
666 break;
667 case EVENT_SPELL_FEAR:
669 events.ScheduleEvent(EVENT_SPELL_FEAR, 42000);
670 break;
673 events.ScheduleEvent(EVENT_SPELL_DOOMFIRE, 20000);
674 break;
677 break;
678 case EVENT_ENRAGE:
680 break;
682 // People dragged the boss near the check and now wipe
683 events.ScheduleEvent(EVENT_ENRAGE, 0);
684 events.ScheduleEvent(EVENT_SPELL_HAND_OF_DEATH, 1000);
685 break;
687 me->GetMotionMaster()->Clear(false);
689 break;
690 }
691
693 }
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: Object.h:45
@ REACT_PASSIVE
Definition: Unit.h:1035
@ DIRECT_DAMAGE
Definition: Unit.h:435
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ SPELL_DRAIN_WORLD_TREE
Definition: boss_archimonde.cpp:49
@ SPELL_FINGER_OF_DEATH
Definition: boss_archimonde.cpp:52
@ SPELL_FEAR
Definition: boss_archimonde.cpp:66
@ SPELL_RED_SKY_EFFECT
Definition: boss_archimonde.cpp:53
@ SPELL_GRIP_OF_THE_LEGION
Definition: boss_archimonde.cpp:56
@ SPELL_DRAIN_WORLD_TREE_2
Definition: boss_archimonde.cpp:50
@ SPELL_AIR_BURST
Definition: boss_archimonde.cpp:55
@ SAY_AIR_BURST
Definition: boss_archimonde.cpp:36
@ SAY_ENRAGE
Definition: boss_archimonde.cpp:38
@ CREATURE_CHANNEL_TARGET
Definition: boss_archimonde.cpp:74
Position const NordrassilLoc
Definition: boss_archimonde.cpp:97
@ EVENT_SUMMON_WISPS
Definition: boss_archimonde.cpp:91
@ EVENT_BELOW_10_PERCENT_HP
Definition: boss_archimonde.cpp:90
@ EVENT_TOO_CLOSE_TO_WORLD_TREE
Definition: boss_archimonde.cpp:92
@ EVENT_CHECK_WORLD_TREE_DISTANCE
Definition: boss_archimonde.cpp:89
@ EVENT_ENRAGE_ROOT
Definition: boss_archimonde.cpp:93
@ DATA_AZGALOREVENT
Definition: hyjal.h:42
@ FACTION_DRAGONKIN
Definition: SharedDefines.h:226
@ FACTION_FRIENDLY
Definition: SharedDefines.h:201
@ SPELL_SCHOOL_MASK_NORMAL
Definition: SharedDefines.h:297
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:177
bool UpdateVictim()
Definition: CreatureAI.cpp:268
Creature * DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
Definition: ScriptedCreature.cpp:309
Definition: Creature.h:46
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition: Object.cpp:1321
bool HealthBelowPct(int32 pct) const
Definition: Unit.h:1458
uint32 GetHealth() const
Definition: Unit.h:1454
bool IsVisible() const
Definition: Unit.h:2141
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1410
bool IsInCombat() const
Definition: Unit.h:1702
static uint32 DealDamage(Unit *attacker, Unit *victim, uint32 damage, CleanDamage const *cleanDamage=nullptr, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=nullptr, bool durabilityLoss=true, bool allowGM=false, Spell const *spell=nullptr)
Definition: Unit.cpp:815
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:52
void MoveIdle()
Definition: MotionMaster.cpp:232
void Clear(bool reset=true)
Definition: MotionMaster.h:165
void DoCastDoomfire()
Definition: boss_archimonde.cpp:490
void DoCastProtection()
Definition: boss_archimonde.cpp:320
void UnleashSoulCharge()
Definition: boss_archimonde.cpp:517
bool CanUseFingerOfDeath()
Definition: boss_archimonde.cpp:421

References BelowTenPercent, CanUseFingerOfDeath(), MotionMaster::Clear(), CREATURE_ANCIENT_WISP, CREATURE_CHANNEL_TARGET, DATA_AZGALOREVENT, Unit::DealDamage(), DIRECT_DAMAGE, UnitAI::DoCast(), DoCastDoomfire(), DoCastProtection(), UnitAI::DoCastVictim(), UnitAI::DoMeleeAttackIfReady(), DONE, ScriptedAI::DoSpawnCreature(), EVENT_BELOW_10_PERCENT_HP, EVENT_CHECK_WORLD_TREE_DISTANCE, EVENT_DRAIN_WORLD_TREE, EVENT_ENRAGE, EVENT_ENRAGE_ROOT, EVENT_SPELL_AIR_BURST, EVENT_SPELL_DOOMFIRE, EVENT_SPELL_FEAR, EVENT_SPELL_FINGER_OF_DEATH, EVENT_SPELL_GRIP_OF_THE_LEGION, EVENT_SPELL_HAND_OF_DEATH, EVENT_SPELL_UNLEASH_SOUL_CHARGES, EVENT_SUMMON_WISPS, EVENT_TOO_CLOSE_TO_WORLD_TREE, FACTION_DRAGONKIN, FACTION_FRIENDLY, ZoneScript::GetData(), Unit::GetFaction(), Object::GetGUID(), Unit::GetHealth(), Unit::GetMotionMaster(), ObjectAccessor::GetUnit(), Unit::HasUnitState(), Unit::HealthBelowPct(), instance, IsChanneling, Unit::IsInCombat(), Unit::IsVisible(), WorldObject::IsWithinDistInMap(), ScriptedAI::me, MotionMaster::MoveIdle(), NordrassilLoc, REACT_PASSIVE, SAY_AIR_BURST, SAY_ENRAGE, UnitAI::SelectTarget(), Unit::SetFaction(), Creature::SetReactState(), Unit::SetVisible(), SPELL_AIR_BURST, SPELL_DRAIN_WORLD_TREE, SPELL_DRAIN_WORLD_TREE_2, SPELL_FEAR, SPELL_FINGER_OF_DEATH, SPELL_GRIP_OF_THE_LEGION, SPELL_HAND_OF_DEATH, SPELL_RED_SKY_EFFECT, SPELL_SCHOOL_MASK_NORMAL, WorldObject::SummonCreature(), TEMPSUMMON_TIMED_DESPAWN, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, UNIT_FLAG_NOT_SELECTABLE, UNIT_STATE_CASTING, UnleashSoulCharge(), CreatureAI::UpdateVictim(), urand(), WispCount, and WorldTreeGUID.

Member Data Documentation

◆ BelowTenPercent

bool boss_archimonde::boss_archimondeAI::BelowTenPercent

◆ DoomfireSpiritGUID

ObjectGuid boss_archimonde::boss_archimondeAI::DoomfireSpiritGUID

Referenced by JustSummoned(), and Reset().

◆ Enraged

bool boss_archimonde::boss_archimondeAI::Enraged

Referenced by Reset().

◆ events

EventMap boss_archimonde::boss_archimondeAI::events

◆ fingerOfDeathTargets

std::list<Unit*> boss_archimonde::boss_archimondeAI::fingerOfDeathTargets

◆ HasProtected

bool boss_archimonde::boss_archimondeAI::HasProtected

Referenced by Reset().

◆ instance

InstanceScript* boss_archimonde::boss_archimondeAI::instance

◆ IsChanneling

bool boss_archimonde::boss_archimondeAI::IsChanneling

Referenced by Reset(), and UpdateAI().

◆ SoulChargeCount

uint8 boss_archimonde::boss_archimondeAI::SoulChargeCount

◆ spellEffectTargets

std::list<Unit*> boss_archimonde::boss_archimondeAI::spellEffectTargets

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

◆ summons

SummonList boss_archimonde::boss_archimondeAI::summons

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

◆ WispCount

uint8 boss_archimonde::boss_archimondeAI::WispCount

Referenced by Reset(), and UpdateAI().

◆ WorldTreeGUID

ObjectGuid boss_archimonde::boss_archimondeAI::WorldTreeGUID

Referenced by Reset(), and UpdateAI().