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

Public Member Functions

 boss_onyxia (Creature *creature)
 
void Initialize ()
 
void SetPhase (Phases phase)
 
void Reset () override
 
void DoAction (int32 param) override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void EnterEvadeMode (EvadeReason why) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDies (Creature *summon, Unit *) override
 
void MovementInform (uint32 type, uint32 id) override
 
void MoveToWaypoint (uint8 wp, float speed)
 
void SummonPointWhelp (uint8 point)
 
GuidVector GetEggsNearestFirst (Creature *whelp) const
 
void HatchNearestEgg (GuidVector const &eggGUIDs)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void OnSpellCast (SpellInfo const *spell) override
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void OnSpellCast (SpellInfo const *spell) override
 
void OnChannelFinished (SpellInfo const *spell) override
 
void OnSpellFailed (SpellInfo const *spell) override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 
void ProcessHealthCheck ()
 
void ScheduleEnrageTimer (uint32 spellId, Milliseconds timer, uint8 textId=0)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER) override
 
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
 Called at any Damage from any attacker (before damage apply)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
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 (Position const *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
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 DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
Unit * DoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
Player * GetPlayerAtMinimumRange (float minRange)
 
Creature * DoSpawnCreature (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=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, 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)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
T const & DUNGEON_MODE (T const &normal5, T const &heroic10) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25, T const &heroic10, T const &heroic25) const
 
Player * SelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObject * GetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool IsEscortNPC (bool=true) const
 
void JustEnteredCombat (Unit *who) override
 Called when the unit enters combat.
 
virtual void JustStartedThreateningMe (Unit *who)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
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 ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
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 *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
Unit * SelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
Unit * SelectTarget (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)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void OnDespawn ()
 Called when the unit is about to be removed from the world (despawn, grid unload, corpse disappearing, player logging out etc.)
 
virtual void EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
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)
 To specify the caster as target if the spell is self-cast.
 
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, bool withTank=true, int32 aura=0)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not 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)
 Called when a summon reaches a waypoint or point movement finished.
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Private Attributes

Phases _phase
 
uint8 _currentWP
 
uint8 _fireballsCast
 
uint8 _fireballsBeforeMoving
 
bool _landingPending
 
bool _manyWhelpsAvailable
 
bool _whelpsRespawn
 
std::array< ObjectGuid, std::size(WhelpSpawnPoints)> _pointWhelpGUIDs
 
ObjectGuid _lairGuardTriggerGUID
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from BossAI
float callForHelpRange
 
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creature * me
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoType * AISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
void TeleportCheaters ()
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
Creature * DoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummonFlyer (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
 
bool _isEngaged
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_onyxia()

boss_onyxia::boss_onyxia ( Creature *  creature)
inline
165 : BossAI(creature, DATA_ONYXIA)
166 {
167 // Whelp respawns and egg hatches must keep ticking through Deep Breath, so the scheduler may not pause while casting
169 Initialize();
170 }
Definition ScriptedCreature.h:485
TaskScheduler scheduler
Definition CreatureAI.h:74
TaskScheduler & ClearValidator()
Clears the validator which is asked if tasks are allowed to be executed.
Definition TaskScheduler.cpp:21
@ DATA_ONYXIA
Definition onyxias_lair.h:29
void Initialize()
Definition boss_onyxia.cpp:172

References TaskScheduler::ClearValidator(), Initialize(), and CreatureAI::scheduler.

Member Function Documentation

◆ DoAction()

void boss_onyxia::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

220 {
221 switch (param)
222 {
225 {
227 }
228 break;
229 default:
230 break;
231 }
232 }
InstanceScript *const instance
Definition ScriptedCreature.h:492
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
@ ACTION_WHELP_SUMMONED
Definition onyxias_lair.h:45
@ DATA_WHELP_SUMMONED
Definition onyxias_lair.h:31
bool _manyWhelpsAvailable
Definition boss_onyxia.cpp:628

References _manyWhelpsAvailable, ACTION_WHELP_SUMMONED, DATA_WHELP_SUMMONED, BossAI::instance, and ZoneScript::SetData().

◆ EnterEvadeMode()

void boss_onyxia::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

257 {
258 if (why == EVADE_REASON_BOUNDARY)
259 {
261 }
262
264 me->DespawnOnEvade(1min);
265 }
@ SAY_EVADE
Definition boss_onyxia.cpp:160
void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER) override
Definition ScriptedCreature.h:526
@ EVADE_REASON_BOUNDARY
Definition CreatureAI.h:89
void DespawnOnEvade(Seconds respawnDelay=20s)
Definition Creature.cpp:2229
Talk
Definition hyjal.cpp:82
Creature * me
Definition ScriptedCreature.h:281

References Creature::DespawnOnEvade(), BossAI::EnterEvadeMode(), CreatureAI::EVADE_REASON_BOUNDARY, ScriptedAI::me, and SAY_EVADE.

◆ GetEggsNearestFirst()

GuidVector boss_onyxia::GetEggsNearestFirst ( Creature *  whelp) const
inline
371 {
372 std::list<GameObject*> eggs;
374 // The grid search pads the range with both object sizes
375 eggs.remove_if([whelp](GameObject* egg) { return whelp->GetExactDist(egg) > 4.0f; });
376 eggs.sort(Acore::ObjectDistanceOrderPred(whelp));
377
378 GuidVector eggGUIDs;
379 for (GameObject* egg : eggs)
380 eggGUIDs.push_back(egg->GetGUID());
381
382 return eggGUIDs;
383 }
std::vector< ObjectGuid > GuidVector
Definition ObjectGuid.h:260
Definition Object.h:860
Definition GameObject.h:120
virtual ObjectGuid GetGUID(int32=0) const
Definition UnitAI.h:221
void GetGameObjectListWithEntryInGrid(std::list< GameObject * > &lList, uint32 uiEntry, float fMaxSearchRange) const
Definition Object.cpp:2606
@ GO_ONYXIA_EGG
Definition onyxias_lair.h:51
float GetExactDist(float x, float y, float z) const
Definition Position.h:182

References Position::GetExactDist(), WorldObject::GetGameObjectListWithEntryInGrid(), Object::GetGUID(), and GO_ONYXIA_EGG.

Referenced by JustSummoned().

◆ HatchNearestEgg()

void boss_onyxia::HatchNearestEgg ( GuidVector const &  eggGUIDs)
inline
387 {
388 for (ObjectGuid const& eggGUID : eggGUIDs)
389 {
391 if (!egg || !egg->isSpawned())
392 continue;
393
394 Position const eggPos = egg->GetPosition();
395 egg->DespawnOrUnsummon();
396 scheduler.Schedule(2s, [this, eggPos](TaskContext)
397 {
399 });
400 return;
401 }
402 }
bool isSpawned() const
Definition GameObject.h:191
void DespawnOrUnsummon(Milliseconds delay=0ms, Seconds forcedRespawnTime=0s)
Definition GameObject.cpp:936
Definition ObjectGuid.h:121
Definition TaskScheduler.h:422
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
Definition TaskScheduler.h:233
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition Object.cpp:2454
GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:208
@ NPC_ONYXIAN_WHELP
Definition onyxias_lair.h:38
Definition Position.h:27
void GetPosition(float &x, float &y) const
Definition Position.h:126

References GameObject::DespawnOrUnsummon(), ObjectAccessor::GetGameObject(), Position::GetPosition(), GameObject::isSpawned(), ScriptedAI::me, NPC_ONYXIAN_WHELP, TaskScheduler::Schedule(), CreatureAI::scheduler, and WorldObject::SummonCreature().

Referenced by JustSummoned().

◆ Initialize()

void boss_onyxia::Initialize ( )
inline
173 {
176 _fireballsCast = 0;
178 _landingPending = false;
179 _manyWhelpsAvailable = false;
180 _whelpsRespawn = false;
183 }
@ PHASE_NONE
Definition boss_onyxia.cpp:83
@ WP_GROUND_SOUTH
Definition boss_onyxia.cpp:92
static ObjectGuid const Empty
Definition ObjectGuid.h:123
void Clear()
Definition ObjectGuid.h:141
bool _whelpsRespawn
Definition boss_onyxia.cpp:629
ObjectGuid _lairGuardTriggerGUID
Definition boss_onyxia.cpp:631
Phases _phase
Definition boss_onyxia.cpp:623
bool _landingPending
Definition boss_onyxia.cpp:627
std::array< ObjectGuid, std::size(WhelpSpawnPoints)> _pointWhelpGUIDs
Definition boss_onyxia.cpp:630
uint8 _currentWP
Definition boss_onyxia.cpp:624
uint8 _fireballsBeforeMoving
Definition boss_onyxia.cpp:626
uint8 _fireballsCast
Definition boss_onyxia.cpp:625

References _currentWP, _fireballsBeforeMoving, _fireballsCast, _lairGuardTriggerGUID, _landingPending, _manyWhelpsAvailable, _phase, _pointWhelpGUIDs, _whelpsRespawn, ObjectGuid::Clear(), ObjectGuid::Empty, PHASE_NONE, and WP_GROUND_SOUTH.

Referenced by boss_onyxia(), and Reset().

◆ JustEngagedWith()

void boss_onyxia::JustEngagedWith ( Unit *  )
inlineoverridevirtual

Called for reaction when initially engaged - this happens after JustEnteredCombat.

Reimplemented from CreatureAI.

235 {
238
239 instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); // just in case at reset some players already left the instance
242
244 {
246 });
247 // She keeps flying her route and lands at the next waypoint where she has cast a Fireball
249 {
250 _landingPending = true;
251 });
252
253 me->SummonCreature(NPC_ONYXIAN_LAIR_GUARD, -167.837936f, -200.549332f, -66.343231f, 5.598287f, TEMPSUMMON_MANUAL_DESPAWN);
254 }
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition DBCEnums.h:110
@ TEMPSUMMON_MANUAL_DESPAWN
Definition Object.h:57
@ SAY_AGGRO
Definition boss_onyxia.cpp:155
@ PHASE_AIRPHASE
Definition boss_onyxia.cpp:85
@ PHASE_GROUNDED
Definition boss_onyxia.cpp:84
void JustEngagedWith(Unit *) override
Called for reaction when initially engaged - this happens after JustEnteredCombat.
Definition ScriptedCreature.h:525
void ScheduleHealthCheckEvent(uint32 healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
Executes a function once the creature reaches the defined health point percent.
Definition ScriptedCreature.cpp:835
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition InstanceScript.cpp:689
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition InstanceScript.cpp:698
@ NPC_ONYXIAN_LAIR_GUARD
Definition onyxias_lair.h:40
@ ACHIEV_TIMED_START_EVENT
Definition onyxias_lair.h:65
void SetPhase(Phases phase)
Definition boss_onyxia.cpp:185

References _landingPending, ACHIEV_TIMED_START_EVENT, ACHIEVEMENT_TIMED_TYPE_EVENT, InstanceScript::DoStartTimedAchievement(), InstanceScript::DoStopTimedAchievement(), BossAI::instance, BossAI::JustEngagedWith(), ScriptedAI::me, NPC_ONYXIAN_LAIR_GUARD, PHASE_AIRPHASE, PHASE_GROUNDED, SAY_AGGRO, BossAI::ScheduleHealthCheckEvent(), SetPhase(), WorldObject::SummonCreature(), and TEMPSUMMON_MANUAL_DESPAWN.

◆ JustSummoned()

void boss_onyxia::JustSummoned ( Creature *  summon)
inlineoverridevirtual

Reimplemented from CreatureAI.

268 {
269 summons.Summon(summon);
270
271 if (summon->GetEntry() == NPC_ONYXIAN_WHELP)
272 {
273 // Candidates are taken where the whelp appears: by the time its spawn-in ends it may already have moved or teleported
274 GuidVector const eggGUIDs = GetEggsNearestFirst(summon);
275 scheduler.Schedule(500ms, [this, eggGUIDs](TaskContext)
276 {
277 HatchNearestEgg(eggGUIDs);
278 });
279 return;
280 }
281
283 {
284 return;
285 }
286
287 if (Unit* target = summon->SelectNearestTarget(300.0f))
288 {
289 summon->AI()->AttackStart(target);
290 DoZoneInCombat(summon);
291 }
292 }
SummonList summons
Definition ScriptedCreature.h:539
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition CreatureAI.cpp:117
Unit * SelectNearestTarget(float dist=0, bool playerOnly=false) const
Select nearest hostile unit within the given distance (regardless of threat list).
Definition Creature.cpp:2451
CreatureAI * AI() const
Definition Creature.h:144
uint32 GetEntry() const
Definition Object.h:123
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:29
Definition Unit.h:667
GuidVector GetEggsNearestFirst(Creature *whelp) const
Definition boss_onyxia.cpp:370
void HatchNearestEgg(GuidVector const &eggGUIDs)
Definition boss_onyxia.cpp:386

References _phase, Creature::AI(), UnitAI::AttackStart(), CreatureAI::DoZoneInCombat(), GetEggsNearestFirst(), Object::GetEntry(), HatchNearestEgg(), NPC_ONYXIAN_LAIR_GUARD, NPC_ONYXIAN_WHELP, PHASE_AIRPHASE, TaskScheduler::Schedule(), CreatureAI::scheduler, Creature::SelectNearestTarget(), SummonList::Summon(), and BossAI::summons.

◆ MovementInform()

void boss_onyxia::MovementInform ( uint32  type,
uint32  id 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

314 {
315 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
316 {
317 return;
318 }
319
320 if (id <= WP_SOUTH_EAST)
321 {
322 if (id >= WP_SOUTH && _phase == PHASE_AIRPHASE)
323 {
325 // The first stop, after the long flight north, waits longer before its first Fireball
326 events.ScheduleEvent(EVENT_AIR_PHASE_ACTION, _currentWP == WP_GROUND_SOUTH ? 3250ms : 1400ms);
327 _currentWP = id;
328 _fireballsCast = 0;
330 }
331 return;
332 }
333
334 switch (id)
335 {
337 if (_phase != PHASE_AIRPHASE)
338 break;
340 events.ScheduleEvent(EVENT_LIFTOFF, 0ms);
341 break;
342 case POINT_TAKEOFF:
343 if (_phase != PHASE_AIRPHASE)
344 break;
346 events.ScheduleEvent(EVENT_FLY_S_TO_N, 0ms);
347 break;
348 case POINT_LAND:
349 me->SetCanFly(false);
350 me->SetDisableGravity(false);
351 events.ScheduleEvent(EVENT_PHASE_3_ATTACK, 2s);
352 break;
353 default:
354 break;
355 }
356 }
@ POINT_MOTION_TYPE
Definition MotionMaster.h:48
@ EFFECT_MOTION_TYPE
Definition MotionMaster.h:56
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
static OnyxiaMove const OnyxiaMoveData[]
Definition boss_onyxia.cpp:113
@ POINT_TAKEOFF
Definition boss_onyxia.cpp:101
@ POINT_LAND
Definition boss_onyxia.cpp:102
@ POINT_GROUND_SOUTH
Definition boss_onyxia.cpp:100
@ WP_SOUTH
Definition boss_onyxia.cpp:93
@ WP_SOUTH_EAST
Definition boss_onyxia.cpp:95
@ EVENT_FLY_S_TO_N
Definition boss_onyxia.cpp:78
@ EVENT_LIFTOFF
Definition boss_onyxia.cpp:77
@ EVENT_PHASE_3_ATTACK
Definition boss_onyxia.cpp:71
@ EVENT_AIR_PHASE_ACTION
Definition boss_onyxia.cpp:67
events
Definition boss_sartura.cpp:43
void SetFacingTo(float ori)
Definition Unit.cpp:16084
void SetCanFly(bool enable)
Add the movement flag: MOVEMENTFLAGCAN_FLY. Generaly only use by players, allowing them to fly by pre...
Definition Unit.cpp:16195
void SetDisableGravity(bool disable)
Definition Unit.cpp:16135

References _currentWP, _fireballsBeforeMoving, _fireballsCast, _phase, EFFECT_MOTION_TYPE, EVENT_AIR_PHASE_ACTION, EVENT_FLY_S_TO_N, EVENT_LIFTOFF, EVENT_PHASE_3_ATTACK, ScriptedAI::me, OnyxiaMoveData, PHASE_AIRPHASE, POINT_GROUND_SOUTH, POINT_LAND, POINT_MOTION_TYPE, POINT_TAKEOFF, Unit::SetCanFly(), Unit::SetDisableGravity(), Unit::SetFacingTo(), urand(), WP_GROUND_SOUTH, WP_SOUTH, and WP_SOUTH_EAST.

◆ MoveToWaypoint()

void boss_onyxia::MoveToWaypoint ( uint8  wp,
float  speed 
)
inline
359 {
360 OnyxiaMove const& point = OnyxiaMoveData[wp];
361 me->GetMotionMaster()->MovePoint(wp, point.X, point.Y, point.Z, FORCED_MOVEMENT_NONE, speed);
362 }
@ FORCED_MOVEMENT_NONE
Definition MotionMaster.h:86
void MovePoint(uint32 id, Position const &pos, ForcedMovement forcedMovement=FORCED_MOVEMENT_NONE, float speed=0.f, bool generatePath=true, bool forceDestination=true, std::optional< AnimTier > animTier=std::nullopt)
Definition MotionMaster.h:241
MotionMaster * GetMotionMaster()
Definition Unit.h:1764
Definition boss_onyxia.cpp:106
float Y
Definition boss_onyxia.cpp:109
float X
Definition boss_onyxia.cpp:109
float Z
Definition boss_onyxia.cpp:109

References FORCED_MOVEMENT_NONE, Unit::GetMotionMaster(), ScriptedAI::me, MotionMaster::MovePoint(), OnyxiaMoveData, OnyxiaMove::X, OnyxiaMove::Y, and OnyxiaMove::Z.

Referenced by UpdateAI().

◆ OnSpellCast()

void boss_onyxia::OnSpellCast ( SpellInfo const *  spell)
inlineoverridevirtual

Reimplemented from CreatureAI.

603 {
604 BossAI::OnSpellCast(spell);
605
606 if (spell->Id == OnyxiaMoveData[_currentWP].SpellId)
608 }
@ SPELL_HEATED_GROUND
Definition boss_onyxia.cpp:57
void OnSpellCast(SpellInfo const *spell) override
Definition ScriptedCreature.cpp:774
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:399
uint32 SpellId
Definition boss_onyxia.cpp:108

References _currentWP, UnitAI::DoCastSelf(), SpellInfo::Id, BossAI::OnSpellCast(), OnyxiaMoveData, SPELL_HEATED_GROUND, and OnyxiaMove::SpellId.

◆ Reset()

void boss_onyxia::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

210 {
211 Initialize();
213 me->SetCanFly(false);
214 me->SetDisableGravity(false);
217 }
@ REACT_AGGRESSIVE
Definition Unit.h:571
void Reset() override
Definition ScriptedCreature.h:524
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:100

References ACHIEV_TIMED_START_EVENT, ACHIEVEMENT_TIMED_TYPE_EVENT, InstanceScript::DoStopTimedAchievement(), Initialize(), BossAI::instance, ScriptedAI::me, REACT_AGGRESSIVE, BossAI::Reset(), Unit::SetCanFly(), Unit::SetDisableGravity(), and Creature::SetReactState().

◆ SetPhase()

void boss_onyxia::SetPhase ( Phases  phase)
inline
186 {
187 events.Reset();
188 _phase = phase;
189 switch (phase)
190 {
191 case PHASE_GROUNDED:
192 events.ScheduleEvent(EVENT_SPELL_WINGBUFFET, 10s, 20s);
193 events.ScheduleEvent(EVENT_SPELL_FLAMEBREATH, 10s, 20s);
194 events.ScheduleEvent(EVENT_SPELL_TAILSWEEP, 15s, 20s);
195 events.ScheduleEvent(EVENT_SPELL_CLEAVE, 2s, 5s);
196 break;
197 case PHASE_AIRPHASE:
198 events.ScheduleEvent(EVENT_START_PHASE_2, 0ms);
199 break;
200 case PHASE_LANDED:
201 // Runs once the current cast ends: the landing never cuts a Fireball short
202 events.ScheduleEvent(EVENT_START_PHASE_3, 0ms);
203 break;
204 default:
205 break;
206 }
207 }
@ PHASE_LANDED
Definition boss_onyxia.cpp:86
@ EVENT_SPELL_CLEAVE
Definition boss_onyxia.cpp:65
@ EVENT_START_PHASE_3
Definition boss_onyxia.cpp:70
@ EVENT_START_PHASE_2
Definition boss_onyxia.cpp:66
@ EVENT_SPELL_WINGBUFFET
Definition boss_onyxia.cpp:62
@ EVENT_SPELL_TAILSWEEP
Definition boss_onyxia.cpp:64
@ EVENT_SPELL_FLAMEBREATH
Definition boss_onyxia.cpp:63

References _phase, EVENT_SPELL_CLEAVE, EVENT_SPELL_FLAMEBREATH, EVENT_SPELL_TAILSWEEP, EVENT_SPELL_WINGBUFFET, EVENT_START_PHASE_2, EVENT_START_PHASE_3, PHASE_AIRPHASE, PHASE_GROUNDED, and PHASE_LANDED.

Referenced by JustEngagedWith(), and UpdateAI().

◆ SpellHitTarget()

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

Reimplemented from CreatureAI.

611 {
612 // Deep Breath is a chain of dozens of triggered spells with no shared id,
613 // so identify a hit by the shape common to all of them
614 if (target->IsPlayer() && spell->DurationEntry && spell->DurationEntry->ID == 328
615 && spell->Effects[EFFECT_1].TargetA.GetTarget() == TARGET_UNIT_CASTER
616 && (spell->Effects[EFFECT_1].Amplitude == 50 || spell->Effects[EFFECT_1].Amplitude == 215))
617 {
619 }
620 }
@ EFFECT_1
Definition SharedDefines.h:32
@ TARGET_UNIT_CASTER
Definition SharedDefines.h:1414
bool IsPlayer() const
Definition Object.h:207
@ DATA_DEEP_BREATH_FAILED
Definition onyxias_lair.h:32

References DATA_DEEP_BREATH_FAILED, SpellInfo::DurationEntry, EFFECT_1, SpellInfo::Effects, SpellDurationEntry::ID, BossAI::instance, Object::IsPlayer(), ZoneScript::SetData(), and TARGET_UNIT_CASTER.

◆ SummonedCreatureDies()

void boss_onyxia::SummonedCreatureDies ( Creature *  summon,
Unit *   
)
inlineoverridevirtual

Reimplemented from CreatureAI.

295 {
296 if (!_whelpsRespawn)
297 return;
298
299 for (uint8 point = 0; point < _pointWhelpGUIDs.size(); ++point)
300 {
301 if (_pointWhelpGUIDs[point] != summon->GetGUID())
302 continue;
303
304 _pointWhelpGUIDs[point].Clear();
305 scheduler.Schedule(30s, 60s, GROUP_WHELP_RESPAWN, [this, point](TaskContext)
306 {
307 SummonPointWhelp(point);
308 });
309 break;
310 }
311 }
std::uint8_t uint8
Definition Define.h:109
@ GROUP_WHELP_RESPAWN
Definition boss_onyxia.cpp:132
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:120
void SummonPointWhelp(uint8 point)
Definition boss_onyxia.cpp:364

References _pointWhelpGUIDs, _whelpsRespawn, Object::GetGUID(), GROUP_WHELP_RESPAWN, TaskScheduler::Schedule(), CreatureAI::scheduler, and SummonPointWhelp().

◆ SummonPointWhelp()

void boss_onyxia::SummonPointWhelp ( uint8  point)
inline
365 {
367 _pointWhelpGUIDs[point] = whelp->GetGUID();
368 }
static Position const WhelpSpawnPoints[]
Definition boss_onyxia.cpp:136
Definition Creature.h:47

References _pointWhelpGUIDs, ScriptedAI::me, NPC_ONYXIAN_WHELP, WorldObject::SummonCreature(), and WhelpSpawnPoints.

Referenced by SummonedCreatureDies(), and UpdateAI().

◆ UpdateAI()

void boss_onyxia::UpdateAI ( uint32  )
inlineoverridevirtual

Use to start attacking a target. Called just before JustEngagedWith()

Implements UnitAI.

405 {
406 if (!UpdateVictim() || !CheckInRoom())
407 {
408 return;
409 }
410
411 events.Update(diff);
412 scheduler.Update(diff);
413
415 {
416 return;
417 }
418
419 switch (events.ExecuteEvent())
420 {
422 {
424 events.Repeat(15s, 30s);
425 break;
426 }
428 {
430 events.Repeat(10s, 20s);
431 break;
432 }
434 {
436 events.Repeat(15s, 20s);
437 break;
438 }
440 {
442 events.Repeat(2s, 5s);
443 break;
444 }
446 {
448 me->AttackStop();
450 me->StopMoving();
453
455 _lairGuardTriggerGUID = trigger->GetGUID();
456
457 events.ScheduleEvent(EVENT_SUMMON_LAIR_GUARD, 46s);
458 events.ScheduleEvent(EVENT_DEEP_BREATH_TIMER, 25s, 35s);
459 break;
460 }
461 case EVENT_LIFTOFF:
462 {
465 me->DisableSpline();
466 me->SetCanFly(true);
467 me->SetDisableGravity(true);
470 // Straight up, 20y in 2s
473 // On the scheduler: reaching 40% during takeoff resets the event map before the window would close
474 scheduler.Schedule(10s, [this](TaskContext)
475 {
476 _manyWhelpsAvailable = false;
477 });
478
479 _whelpsRespawn = true;
480 for (uint8 point = 0; point < std::size(WhelpSpawnPoints); ++point)
481 SummonPointWhelp(point);
483 break;
484 }
485 case EVENT_FLY_S_TO_N:
486 {
488 break;
489 }
491 {
492 // Onyxia as original caster makes her the summoner, so the guard joins her summons and engages in JustSummoned
494 trigger->CastSpell(trigger, SPELL_SUMMON_LAIR_GUARD, CastSpellExtraArgs(true).SetOriginalCaster(me->GetGUID()));
495
496 events.Repeat(46s);
497 break;
498 }
500 {
502 events.Repeat(37s, 62s);
503 break;
504 }
505 // At a waypoint: Fireballs back to back, a pending Deep Breath once two are out, then on to a neighbour
507 {
509 {
512 break;
513 }
514
516 {
517 if (urand(0, 1))
519 else
521 break;
522 }
523
525 {
530 events.ScheduleEvent(EVENT_SPELL_BREATH, 8250ms);
531 break;
532 }
533
534 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 200.0f, true))
535 {
536 me->SetFacingToObject(target);
537 DoCast(target, SPELL_FIREBALL);
538 }
539
541 // The 3s cast plus a 0.6s pause
542 events.Repeat(3600ms);
543 break;
544 }
546 {
548 break;
549 }
551 {
555 me->StopMoving();
556
557 // Straight down from wherever the flight is; the whole descent takes about 10s
560 if (groundZ > INVALID_HEIGHT)
561 landPos.m_positionZ = groundZ;
562 else
564
566 break;
567 }
569 {
570 // Hatches already under way still finish
571 _whelpsRespawn = false;
573
575
576 if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 0, 0, false))
577 {
578 AttackStart(target);
579 }
580
582
583 events.ScheduleEvent(EVENT_SPELL_FLAMEBREATH, 10s, 20s);
584 events.ScheduleEvent(EVENT_SPELL_TAILSWEEP, 15s, 20s);
585 events.ScheduleEvent(EVENT_SPELL_CLEAVE, 2s, 5s);
586 events.ScheduleEvent(EVENT_SPELL_BELLOWINGROAR, 22s, 26s);
587 break;
588 }
590 {
592 events.Repeat(22s, 26s);
593 break;
594 }
595 default:
596 break;
597 }
598
600 }
#define INVALID_HEIGHT
Definition GridTerrainData.h:27
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ REACT_PASSIVE
Definition Unit.h:569
Position const landPos
Definition boss_nightbane.cpp:110
@ SAY_PHASE_2_TRANS
Definition boss_onyxia.cpp:157
@ EMOTE_BREATH
Definition boss_onyxia.cpp:159
@ SAY_PHASE_3_TRANS
Definition boss_onyxia.cpp:158
@ SPELL_CLEAVE
Definition boss_onyxia.cpp:33
@ SPELL_BELLOWINGROAR
Definition boss_onyxia.cpp:36
@ SPELL_FLAMEBREATH
Definition boss_onyxia.cpp:32
@ SPELL_FIREBALL
Definition boss_onyxia.cpp:35
@ SPELL_SUMMON_LAIR_GUARD
Definition boss_onyxia.cpp:39
@ SPELL_TAILSWEEP
Definition boss_onyxia.cpp:34
@ SPELL_DEEP_BREATH_TIMER
Definition boss_onyxia.cpp:37
@ SPELL_WINGBUFFET
Definition boss_onyxia.cpp:31
@ WP_NORTH
Definition boss_onyxia.cpp:94
Position const LairGuardTriggerPos
Definition boss_onyxia.cpp:128
static Position const WhelpLiftoffOnlyPoint
Definition boss_onyxia.cpp:151
@ EVENT_SPELL_BELLOWINGROAR
Definition boss_onyxia.cpp:72
@ EVENT_SPELL_BREATH
Definition boss_onyxia.cpp:69
@ EVENT_DEEP_BREATH_TIMER
Definition boss_onyxia.cpp:68
@ EVENT_SUMMON_LAIR_GUARD
Definition boss_onyxia.cpp:73
virtual bool CheckInRoom()
Definition CreatureAI.cpp:610
bool UpdateVictim()
Definition CreatureAI.cpp:350
void MoveTakeoff(uint32 id, Position const &pos, float speed=0.0f, bool skipAnimation=false)
Use to move the unit from the ground to the air. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:589
void MoveLand(uint32 id, Position const &pos, float speed=0.0f)
Use to move the unit from the air to the ground. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:554
void MoveIdle()
Definition MotionMaster.cpp:235
void DespawnEntry(uint32 entry)
Definition ScriptedCreature.cpp:55
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition TaskScheduler.cpp:27
TaskScheduler & CancelGroup(group_t const group)
Definition TaskScheduler.cpp:53
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:286
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:41
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:278
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:112
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:179
void SetFacingToObject(WorldObject *object, Milliseconds timed=0ms)
Definition Unit.cpp:16094
void StopMoving()
Definition Unit.cpp:12655
void DisableSpline()
Definition Unit.cpp:763
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5774
void SendMovementFlagUpdate(bool self=false)
Definition Unit.cpp:12709
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4946
Unit * GetVictim() const
Definition Unit.h:907
bool HasUnitState(const uint32 f) const
Definition Unit.h:739
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:7240
void SendMeleeAttackStop(Unit const *victim=nullptr) const
Send to the client SMSG_ATTACKSTOP but doesn't clear UNIT_STATE_MELEE_ATTACKING on server side or int...
Definition Unit.cpp:3277
float GetMapHeight(float x, float y, float z, bool vmap=true, float distanceToSearch=50.0f) const
Definition Object.cpp:3146
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:234
Definition SpellDefines.h:208
float m_positionZ
Definition Position.h:57
float GetPositionZ() const
Definition Position.h:123
void SetOrientation(float orientation)
Definition Position.h:116
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122
void Relocate(float x, float y)
Definition Position.h:77
void DoResetThreatList()
Definition ScriptedCreature.cpp:473
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:228
void MoveToWaypoint(uint8 wp, float speed)
Definition boss_onyxia.cpp:358
@ NPC_WORLD_TRIGGER
Definition zulaman.cpp:725

References _currentWP, _fireballsBeforeMoving, _fireballsCast, _lairGuardTriggerGUID, _landingPending, _manyWhelpsAvailable, _whelpsRespawn, ScriptedAI::AttackStart(), Unit::AttackStop(), TaskScheduler::CancelGroup(), CreatureAI::CheckInRoom(), SummonList::DespawnEntry(), Unit::DisableSpline(), UnitAI::DoCast(), UnitAI::DoCastAOE(), UnitAI::DoCastSelf(), UnitAI::DoCastVictim(), UnitAI::DoMeleeAttackIfReady(), ScriptedAI::DoResetThreatList(), EMOTE_BREATH, EVENT_AIR_PHASE_ACTION, EVENT_DEEP_BREATH_TIMER, EVENT_FLY_S_TO_N, EVENT_LIFTOFF, EVENT_PHASE_3_ATTACK, EVENT_SPELL_BELLOWINGROAR, EVENT_SPELL_BREATH, EVENT_SPELL_CLEAVE, EVENT_SPELL_FLAMEBREATH, EVENT_SPELL_TAILSWEEP, EVENT_SPELL_WINGBUFFET, EVENT_START_PHASE_2, EVENT_START_PHASE_3, EVENT_SUMMON_LAIR_GUARD, ObjectAccessor::GetCreature(), Object::GetGUID(), WorldObject::GetMapHeight(), Unit::GetMotionMaster(), Position::GetPosition(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::GetVictim(), GROUP_WHELP_RESPAWN, Unit::HasAura(), Unit::HasUnitState(), INVALID_HEIGHT, LairGuardTriggerPos, landPos, Position::m_positionZ, MaxThreat, ScriptedAI::me, MotionMaster::MoveIdle(), MotionMaster::MoveLand(), MotionMaster::MovePoint(), MotionMaster::MoveTakeoff(), MoveToWaypoint(), NPC_ONYXIAN_WHELP, NPC_WORLD_TRIGGER, OnyxiaMoveData, PHASE_LANDED, POINT_GROUND_SOUTH, POINT_LAND, POINT_TAKEOFF, Random, REACT_AGGRESSIVE, REACT_PASSIVE, Position::Relocate(), Unit::RemoveAurasDueToSpell(), SAY_PHASE_2_TRANS, SAY_PHASE_3_TRANS, TaskScheduler::Schedule(), CreatureAI::scheduler, UnitAI::SelectTarget(), Unit::SendMeleeAttackStop(), Unit::SendMovementFlagUpdate(), Unit::SetCanFly(), Unit::SetDisableGravity(), Unit::SetFacingTo(), Unit::SetFacingToObject(), Position::SetOrientation(), SetPhase(), Creature::SetReactState(), SPELL_BELLOWINGROAR, SPELL_CLEAVE, SPELL_DEEP_BREATH_TIMER, SPELL_FIREBALL, SPELL_FLAMEBREATH, SPELL_SUMMON_LAIR_GUARD, SPELL_TAILSWEEP, SPELL_WINGBUFFET, Unit::StopMoving(), WorldObject::SummonCreature(), SummonPointWhelp(), BossAI::summons, TEMPSUMMON_MANUAL_DESPAWN, UNIT_STATE_CASTING, TaskScheduler::Update(), CreatureAI::UpdateVictim(), urand(), WhelpLiftoffOnlyPoint, WhelpSpawnPoints, WP_GROUND_SOUTH, WP_NORTH, WP_SOUTH, and WP_SOUTH_EAST.

Member Data Documentation

◆ _currentWP

uint8 boss_onyxia::_currentWP
private

◆ _fireballsBeforeMoving

uint8 boss_onyxia::_fireballsBeforeMoving
private

◆ _fireballsCast

uint8 boss_onyxia::_fireballsCast
private

◆ _lairGuardTriggerGUID

ObjectGuid boss_onyxia::_lairGuardTriggerGUID
private

Referenced by Initialize(), and UpdateAI().

◆ _landingPending

bool boss_onyxia::_landingPending
private

◆ _manyWhelpsAvailable

bool boss_onyxia::_manyWhelpsAvailable
private

Referenced by DoAction(), Initialize(), and UpdateAI().

◆ _phase

Phases boss_onyxia::_phase
private

◆ _pointWhelpGUIDs

std::array<ObjectGuid, std::size(WhelpSpawnPoints)> boss_onyxia::_pointWhelpGUIDs
private

◆ _whelpsRespawn

bool boss_onyxia::_whelpsRespawn
private

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