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.
 
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 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 HealDone (Unit *, uint32 &)
 
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
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
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:456
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
421 {
422 // Cast finger of death below 10% health
423 if (BelowTenPercent)
424 return true;
425
426 if (me->IsAlive())
427 {
428 /* Reset the list before checking for new targets
429 * else we will be using old targets that could have
430 * been distant but are no longer.*/
431 fingerOfDeathTargets.clear();
432
433 // First we check if our current victim is in melee range or not.
434 Unit* victim = me->GetVictim();
435 if (victim && me->IsWithinMeleeRange(victim))
436 return false;
437
439 if (threatlist.empty())
440 return false;
441
442 auto itr = threatlist.begin();
443 for (; itr != threatlist.end(); ++itr)
444 {
445 Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
446 if (unit && unit->IsAlive() && me->IsWithinMeleeRange(unit))
447 fingerOfDeathTargets.push_back(unit);
448 }
449
450 /* Previous check searched for targets in meele range and
451 * added it to targets list. If there are no targets in meele
452 * range return true, which makes Archimonde cast Finger of Death.
453 */
454 return fingerOfDeathTargets.empty();
455 }
456 return false;
457 }
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:204
std::list< HostileReference * > StorageType
Definition: ThreatMgr.h:148
ThreatContainer::StorageType const & GetThreatList() const
Definition: ThreatMgr.h:274
Definition: Unit.h:1290
bool IsAlive() const
Definition: Unit.h:1808
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition: Unit.cpp:683
Unit * GetVictim() const
Definition: Unit.h:1386
ThreatMgr & GetThreatMgr()
Definition: Unit.h:2145
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
490 {
491 // Three doomfire can be up at the same time
493 Unit* temp = SelectTarget(SelectTargetMethod::Random, 1);
494 if (!temp)
495 temp = me->GetVictim();
496
497 //replace with spell cast 31903 once implicitTarget 73 implemented
498 SummonDoomfire(temp);
499 }
@ SAY_DOOMFIRE
Definition: boss_archimonde.cpp:35
Talk
Definition: boss_fathomlord_karathress.cpp:23
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:111
void SummonDoomfire(Unit *target)
Definition: boss_archimonde.cpp:502

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

Referenced by UpdateAI().

◆ DoCastProtection()

void boss_archimonde::boss_archimondeAI::DoCastProtection ( )
inline
320 {
321 // lets get spell info
322 SpellInfo const* info = sSpellMgr->GetSpellInfo(SPELL_PROTECTION_OF_ELUNE);
323
324 if (!info)
325 return;
326
327 // Now lets get archimode threat list
329
330 if (t_list.empty())
331 return;
332
333 ThreatContainer::StorageType::const_iterator itr = t_list.begin();
334
335 if (Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
336 if (target->IsAlive() && target->GetTypeId() == TYPEID_PLAYER)
337 spellEffectTargets.push_back(target);
338
339 for (auto iter = spellEffectTargets.begin(); iter != spellEffectTargets.end(); ++iter)
340 if (Unit* target = *iter)
341 {
342 target->AddAura(SPELL_PROTECTION_OF_ELUNE, target);
343
344 // Immunity against Hand of death
345 target->ApplySpellImmune(SPELL_HAND_OF_DEATH, IMMUNITY_ID, SPELL_HAND_OF_DEATH, true);
346 target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_HAND_OF_DEATH, true);
347 }
348 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
#define sSpellMgr
Definition: SpellMgr.h:818
@ SPELL_PROTECTION_OF_ELUNE
Definition: boss_archimonde.cpp:47
@ SPELL_HAND_OF_DEATH
Definition: boss_archimonde.cpp:54
@ IMMUNITY_ID
Definition: SharedDefines.h:1372
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
373 {
374 switch (victim->getClass())
375 {
376 case CLASS_PRIEST:
377 case CLASS_PALADIN:
378 case CLASS_WARLOCK:
379 victim->CastSpell(me, SPELL_SOUL_CHARGE_RED, true);
380 break;
381 case CLASS_MAGE:
382 case CLASS_ROGUE:
383 case CLASS_WARRIOR:
384 victim->CastSpell(me, SPELL_SOUL_CHARGE_YELLOW, true);
385 break;
386 case CLASS_DRUID:
387 case CLASS_SHAMAN:
388 case CLASS_HUNTER:
389 victim->CastSpell(me, SPELL_SOUL_CHARGE_GREEN, true);
390 break;
391 }
392
393 events.ScheduleEvent(EVENT_SPELL_UNLEASH_SOUL_CHARGES, urand(2000, 10000));
395 }
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:115
@ CLASS_DRUID
Definition: SharedDefines.h:123
@ CLASS_SHAMAN
Definition: SharedDefines.h:119
@ CLASS_PRIEST
Definition: SharedDefines.h:117
@ CLASS_WARRIOR
Definition: SharedDefines.h:113
@ CLASS_WARLOCK
Definition: SharedDefines.h:121
@ CLASS_MAGE
Definition: SharedDefines.h:120
@ CLASS_PALADIN
Definition: SharedDefines.h:114
@ CLASS_ROGUE
Definition: SharedDefines.h:116
uint8 getClass() const
Definition: Unit.h:1426
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.

398 {
400
403
404 // Reset scheduled events
405 events.CancelEvent(EVENT_SPELL_FEAR);
406 events.CancelEvent(EVENT_SPELL_AIR_BURST);
409 events.CancelEvent(EVENT_SPELL_DOOMFIRE);
413 events.CancelEvent(EVENT_ENRAGE);
414
415 spellEffectTargets.clear();
416 fingerOfDeathTargets.clear();
418 }
@ DONE
Definition: InstanceScript.h:59
@ 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:128
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:67
uint32 GetEntry() const
Definition: Object.h:109
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
Definition: InstanceScript.cpp:554
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.

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

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.

460 {
461 summons.Summon(summoned);
462 if (summoned->GetEntry() == CREATURE_ANCIENT_WISP)
463 summoned->AI()->AttackStart(me);
464 else
465 {
466 summoned->SetFaction(me->GetFaction());
469 }
470
471 if (summoned->GetEntry() == CREATURE_DOOMFIRE_SPIRIT)
472 {
473 DoomfireSpiritGUID = summoned->GetGUID();
474 }
475
476 if (summoned->GetEntry() == CREATURE_DOOMFIRE)
477 {
478 summoned->CastSpell(summoned, SPELL_DOOMFIRE_SPAWN, false);
479 summoned->CastSpell(summoned, SPELL_DOOMFIRE, true, 0, 0, me->GetGUID());
480
481 if (Unit* DoomfireSpirit = ObjectAccessor::GetUnit(*me, DoomfireSpiritGUID))
482 {
483 summoned->GetMotionMaster()->MoveFollow(DoomfireSpirit, 0.0f, 0.0f);
485 }
486 }
487 }
@ 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:28
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90
CreatureAI * AI() const
Definition: Creature.h:135
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
void Clear()
Definition: ObjectGuid.h:140
void SetFaction(uint32 faction)
Definition: Unit.cpp:10029
MotionMaster * GetMotionMaster()
Definition: Unit.h:2262
uint32 GetFaction() const
Definition: Unit.h:1495
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:1481
void MoveFollow(Unit *target, float dist, float angle, MovementSlot slot=MOTION_SLOT_ACTIVE)
Definition: MotionMaster.cpp:367
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.

365 {
366 Talk(SAY_SLAY);
367
368 if (victim && victim->GetTypeId() == TYPEID_PLAYER)
369 GainSoulCharge(victim->ToPlayer());
370 }
@ 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:372

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

◆ Reset()

void boss_archimonde::boss_archimondeAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

292 {
294
297 WispCount = 0;
298 Enraged = false;
299 BelowTenPercent = false;
300 HasProtected = false;
301 IsChanneling = false;
302
303 // Reset player's immunity to Spells
304 for (auto it = spellEffectTargets.begin(); it != spellEffectTargets.end(); ++it)
305 {
306 Unit* affected_unit = ObjectAccessor::GetUnit(*me, (*it)->GetGUID());
307
308 // Remove Immunity against Hand of death
310 affected_unit->ApplySpellImmune(0, IMMUNITY_ID, SPELL_HAND_OF_DEATH, false);
311 }
312
313 spellEffectTargets.clear();
314 fingerOfDeathTargets.clear();
316 events.ScheduleEvent(EVENT_DRAIN_WORLD_TREE, 0);
317 }
@ NOT_STARTED
Definition: InstanceScript.h:56
@ EVENT_DRAIN_WORLD_TREE
Definition: boss_archimonde.cpp:79
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition: Unit.cpp:13300
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, ZoneScript::SetData(), SPELL_HAND_OF_DEATH, spellEffectTargets, summons, WispCount, and WorldTreeGUID.

◆ SummonDoomfire()

void boss_archimonde::boss_archimondeAI::SummonDoomfire ( Unit target)
inline
503 {
505 target->GetPositionX() + 15.0f, target->GetPositionY() + 15.0f, target->GetPositionZ(), 0,
507
509 target->GetPositionX() - 15.0f, target->GetPositionY() - 15.0f, target->GetPositionZ(), 0,
511
512 doomfire1->SetVisible(false);
513 doomfire2->SetVisible(false);
514 }
@ 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:2318
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:14129

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
517 {
519
520 uint32 chargeSpell = 0;
521 uint32 unleashSpell = 0;
522
523 switch (urand(0, 2))
524 {
525 case 0:
526 chargeSpell = SPELL_SOUL_CHARGE_RED;
527 unleashSpell = SPELL_UNLEASH_SOUL_RED;
528 break;
529 case 1:
530 chargeSpell = SPELL_SOUL_CHARGE_YELLOW;
531 unleashSpell = SPELL_UNLEASH_SOUL_YELLOW;
532 break;
533 case 2:
534 chargeSpell = SPELL_SOUL_CHARGE_GREEN;
535 unleashSpell = SPELL_UNLEASH_SOUL_GREEN;
536 break;
537 }
538
539 if (me->HasAura(chargeSpell))
540 {
541 me->RemoveAuraFromStack(chargeSpell);
542 DoCastVictim(unleashSpell);
544 }
545 }
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:241
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4069
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5610
void RemoveAuraFromStack(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4851

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.

548 {
549 events.Update(diff);
550
551 // Event for draining the tree
552 if (!me->IsInCombat())
553 {
554 // Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished.
556 {
557 me->SetVisible(false);
559 }
560
562 {
564 me->SetVisible(true);
565 }
566
567 switch (events.ExecuteEvent())
568 {
570 if (!IsChanneling)
571 {
573
574 if (temp)
575 WorldTreeGUID = temp->GetGUID();
576
577 if (Unit* Nordrassil = ObjectAccessor::GetUnit(*me, WorldTreeGUID))
578 {
579 Nordrassil->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
580 Nordrassil->SetDisplayId(11686);
581 DoCast(Nordrassil, SPELL_DRAIN_WORLD_TREE);
582 IsChanneling = true;
583 }
584 }
585
586 if (Unit* Nordrassil = ObjectAccessor::GetUnit(*me, WorldTreeGUID))
587 Nordrassil->CastSpell(me, SPELL_DRAIN_WORLD_TREE_2, true);
588 break;
589 }
590 }
591
592 if (!UpdateVictim())
593 return;
594
596 return;
597
598 if (me->HealthBelowPct(10) && !BelowTenPercent)
599 events.ScheduleEvent(EVENT_BELOW_10_PERCENT_HP, 0);
600
601 switch (events.ExecuteEvent())
602 {
604 {
605 // If Archimonde is too close to the world tree this will ENRAGE him
607 if (Check)
608 {
609 Check->SetVisible(false);
610
611 if (me->IsWithinDistInMap(Check, 75))
612 {
613 events.ScheduleEvent(EVENT_TOO_CLOSE_TO_WORLD_TREE, 0);
614 break;
615 }
616 }
617 events.RepeatEvent(5000);
618 break;
619 }
621 DoCastProtection(); // Protection of Elune against Finger and Hand of Death
622 BelowTenPercent = true;
623 me->GetMotionMaster()->Clear(false);
625 events.ScheduleEvent(EVENT_ENRAGE, 0);
626 events.ScheduleEvent(EVENT_ENRAGE_ROOT, 0);
627 events.ScheduleEvent(EVENT_SUMMON_WISPS, 1000);
628 events.ScheduleEvent(EVENT_SPELL_HAND_OF_DEATH, 1500);
629 events.ScheduleEvent(EVENT_SPELL_FINGER_OF_DEATH, 2500);
630 break;
632 // If there are more than 30 Wisps then kill Archimonde
633 if (WispCount >= 30)
634 {
636 return; // Finish the encounter and no more event repeat
637 }
638 DoSpawnCreature(CREATURE_ANCIENT_WISP, float(rand() % 40), float(rand() % 40), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
639 ++WispCount;
640 events.ScheduleEvent(EVENT_SUMMON_WISPS, 1500);
641 break;
645 events.ScheduleEvent(EVENT_SPELL_HAND_OF_DEATH, 3000);
646 break;
649 {
650 Unit* target = SelectTarget(SelectTargetMethod::Random, 0);
653 }
654 events.ScheduleEvent(EVENT_SPELL_FINGER_OF_DEATH, 3500);
655 break;
657 DoCast(SelectTarget(SelectTargetMethod::Random, 0), SPELL_GRIP_OF_THE_LEGION);
658 events.ScheduleEvent(EVENT_SPELL_GRIP_OF_THE_LEGION, urand(5000, 25000));
659 break;
662 DoCast(SelectTarget(SelectTargetMethod::Random, 0), SPELL_AIR_BURST);
663 events.ScheduleEvent(EVENT_SPELL_AIR_BURST, urand(25000, 40000));
664 break;
665 case EVENT_SPELL_FEAR:
667 events.ScheduleEvent(EVENT_SPELL_FEAR, 42000);
668 break;
671 events.ScheduleEvent(EVENT_SPELL_DOOMFIRE, 20000);
672 break;
675 break;
676 case EVENT_ENRAGE:
678 break;
680 // People dragged the boss near the check and now wipe
681 events.ScheduleEvent(EVENT_ENRAGE, 0);
682 events.ScheduleEvent(EVENT_SPELL_HAND_OF_DEATH, 1000);
683 break;
685 me->GetMotionMaster()->Clear(false);
687 break;
688 }
689
691 }
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: Object.h:45
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ DIRECT_DAMAGE
Definition: Unit.h:435
@ 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:198
@ FACTION_FRIENDLY
Definition: SharedDefines.h:173
@ SPELL_SCHOOL_MASK_NORMAL
Definition: SharedDefines.h:269
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:178
bool UpdateVictim()
Definition: CreatureAI.cpp:269
Creature * DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
Definition: ScriptedCreature.cpp:305
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:1444
uint32 GetHealth() const
Definition: Unit.h:1440
bool IsVisible() const
Definition: Unit.h:2127
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398
bool IsInCombat() const
Definition: Unit.h:1688
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:231
void Clear(bool reset=true)
Definition: MotionMaster.h:165
void DoCastDoomfire()
Definition: boss_archimonde.cpp:489
void DoCastProtection()
Definition: boss_archimonde.cpp:319
void UnleashSoulCharge()
Definition: boss_archimonde.cpp:516
bool CanUseFingerOfDeath()
Definition: boss_archimonde.cpp:420

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, SAY_AIR_BURST, SAY_ENRAGE, UnitAI::SelectTarget(), Unit::SetFaction(), 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().