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

Public Member Functions

 npc_ulduar_aerial_command_unit (Creature *creature)
 
void Reset () override
 
void AttackStart (Unit *who) override
 
void SetData (uint32 id, uint32 value) override
 
void DoAction (int32 param) override
 
void DamageTaken (Unit *, uint32 &damage, 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 MoveInLineOfSight (Unit *) override
 
void KilledUnit (Unit *who) override
 
void EnterEvadeMode (EvadeReason why) override
 
void JustSummoned (Creature *s) override
 
void SummonedCreatureDespawn (Creature *s) override
 
void SpellHit (Unit *, SpellInfo const *spell) 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)
 
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=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
 
PlayerSelectTargetFromPlayerList (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)
 
WorldObjectGetSummoner () 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 CanRespawn ()
 
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 SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnChannelFinished (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.
 
virtual void JustReachedHome ()
 
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 SetGUID (ObjectGuid const &, 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)
 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 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

InstanceScriptinstance
 
EventMap _events
 
SummonList _summons
 
bool _isEvading
 
bool _isDefeated
 
uint8 _phase
 

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 ScriptedAI
Creatureme
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- 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

◆ npc_ulduar_aerial_command_unit()

npc_ulduar_aerial_command_unit::npc_ulduar_aerial_command_unit ( Creature creature)
inline
1520 : ScriptedAI(creature), _summons(me)
1521 {
1523 _isEvading = false;
1524 me->SetDisableGravity(true);
1525 }
void SetDisableGravity(bool disable)
Definition Unit.cpp:16506
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1242
Definition ScriptedCreature.h:191
Creature * me
Definition ScriptedCreature.h:281
InstanceScript * instance
Definition boss_mimiron.cpp:1776
bool _isEvading
Definition boss_mimiron.cpp:1779
SummonList _summons
Definition boss_mimiron.cpp:1778

References _isEvading, WorldObject::GetInstanceScript(), instance, ScriptedAI::me, and Unit::SetDisableGravity().

Member Function Documentation

◆ AttackStart()

void npc_ulduar_aerial_command_unit::AttackStart ( Unit who)
inlineoverridevirtual

Reimplemented from UnitAI.

1538 {
1539 if (_phase == 3)
1540 AttackStartCaster(who, 30.0f);
1541 else
1543 }
void AttackStartCaster(Unit *victim, float dist)
Definition UnitAI.cpp:35
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:228
uint8 _phase
Definition boss_mimiron.cpp:1781

References _phase, ScriptedAI::AttackStart(), and UnitAI::AttackStartCaster().

Referenced by SetData().

◆ DamageTaken()

void npc_ulduar_aerial_command_unit::DamageTaken ( Unit ,
uint32 ,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Called at any Damage from any attacker (before damage apply)

Note
It use for recalculation damage or special reaction at damage for attack reaction use AttackedBy called for non DOT damage in Unit::DealDamage also

Reimplemented from UnitAI.

1622 {
1623 if (damage >= me->GetHealth() || me->GetHealth() < 15000)
1624 {
1625 damage = 0;
1626 if (_isDefeated)
1627 return;
1628 _isDefeated = true;
1630 if (_phase == 3)
1631 {
1633 {
1635 me->GetMotionMaster()->Clear();
1636 me->StopMoving();
1637 me->AttackStop();
1639 SetData(1, 0);
1642
1643 me->SetDisableGravity(true);
1644 me->GetMotionMaster()->MovePoint(0, 2744.65f, 2569.46f, 381.34f);
1645
1646 if (Creature* c = GetMimiron())
1647 c->AI()->SetData(0, 3);
1648 }
1649 }
1650 else if (_phase == 4)
1651 {
1653 {
1657 me->CastSpell(me, SPELL_SELF_REPAIR, false);
1658 if (Creature* c = GetMimiron())
1659 {
1660 if (c->AI()->GetData(1))
1662 if (c->AI()->GetData(2))
1663 me->CastSpell(me, SPELL_BERSERK, true);
1664 c->AI()->SetData(0, 6);
1665 }
1666 }
1667 }
1668 }
1669 }
@ SPELL_AURA_CONTROL_VEHICLE
Definition SpellAuraDefines.h:299
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:258
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:282
@ REACT_PASSIVE
Definition Unit.h:567
#define GetMimiron()
Definition boss_mimiron.cpp:274
@ SPELL_EMERGENCY_MODE
Definition boss_mimiron.cpp:127
@ SPELL_SELF_REPAIR
Definition boss_mimiron.cpp:94
@ SPELL_BERSERK
Definition boss_mimiron.cpp:39
Definition Creature.h:47
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:100
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:240
void Clear(bool reset=true)
Definition MotionMaster.h:193
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition Unit.cpp:4312
void RemoveAllAurasExceptType(AuraType type)
Definition Unit.cpp:5686
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
bool HasUnitFlag(UnitFlags flags) const
Definition Unit.h:748
void StopMoving()
Definition Unit.cpp:13034
uint32 GetHealth() const
Definition Unit.h:1109
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:1361
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:749
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:7499
bool _isDefeated
Definition boss_mimiron.cpp:1780
void SetData(uint32 id, uint32 value) override
Definition boss_mimiron.cpp:1545

References _isDefeated, _phase, Unit::AttackStop(), Unit::CastSpell(), MotionMaster::Clear(), Unit::GetHealth(), GetMimiron, Unit::GetMotionMaster(), Unit::HasUnitFlag(), Unit::InterruptNonMeleeSpells(), ScriptedAI::me, MotionMaster::MovePoint(), REACT_PASSIVE, Unit::RemoveAllAurasExceptType(), SetData(), Unit::SetDisableGravity(), Creature::SetReactState(), Unit::SetUnitFlag(), SPELL_AURA_CONTROL_VEHICLE, SPELL_BERSERK, SPELL_EMERGENCY_MODE, SPELL_SELF_REPAIR, Unit::StopMoving(), UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_NOT_SELECTABLE.

◆ DoAction()

void npc_ulduar_aerial_command_unit::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

1587 {
1588 switch (param)
1589 {
1590 case DO_DISABLE_AERIAL:
1591 me->CastStop();
1592 me->AttackStop();
1594 // Raw flag removal first: MoveFall lands at ground + hover height, which would
1595 // keep the ACU airborne, and SetHover(false) would relocate it without a spline.
1596 // SetHover(false) afterwards is relocation-free and tells the client to stop
1597 // hovering, else it keeps floating the grounded unit back up
1600 me->SetHover(false);
1601 _events.DelayEvents(25s);
1602 break;
1603 case DO_ENABLE_AERIAL:
1604 if (_isDefeated)
1605 break;
1606 me->SetDisableGravity(true);
1607 // 16y: above hover height (15y) so SetHover does not relocate it further up
1610 me->SetDisableGravity(false);
1611 me->SetHover(true);
1613 }, 2s);
1614 break;
1615 case DO_DESPAWN_SUMMONS:
1617 break;
1618 }
1619 }
@ MOVEMENTFLAG_HOVER
Definition UnitDefines.h:402
@ REACT_AGGRESSIVE
Definition Unit.h:569
@ DO_ENABLE_AERIAL
Definition boss_mimiron.cpp:232
@ DO_DESPAWN_SUMMONS
Definition boss_mimiron.cpp:233
@ DO_DISABLE_AERIAL
Definition boss_mimiron.cpp:231
void DelayEvents(Milliseconds delay)
Definition EventMap.cpp:108
void AddEventAtOffset(BasicEvent *event, Milliseconds offset, uint8 eventGroup=0)
Definition EventProcessor.h:108
void MoveFall(uint32 id=0, bool addFlagForNPC=false)
The unit will fall. Used when in the air. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:698
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:72
void SetHover(bool enable)
Definition Unit.cpp:16643
void CastStop(uint32 except_spellid=0, bool withInstant=true)
Interrupt the unit cast for all the current spells.
Definition Unit.cpp:1354
void RemoveUnitMovementFlag(uint32 f)
Definition Unit.h:774
EventProcessor m_Events
Definition Object.h:742
float GetPositionZ() const
Definition Position.h:123
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122
EventMap _events
Definition boss_mimiron.cpp:1777

References _events, _isDefeated, _summons, EventProcessor::AddEventAtOffset(), Unit::AttackStop(), Unit::CastStop(), EventMap::DelayEvents(), SummonList::DespawnAll(), DO_DESPAWN_SUMMONS, DO_DISABLE_AERIAL, DO_ENABLE_AERIAL, Unit::GetMotionMaster(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), WorldObject::m_Events, ScriptedAI::me, MotionMaster::MoveFall(), MOVEMENTFLAG_HOVER, MotionMaster::MovePoint(), REACT_AGGRESSIVE, REACT_PASSIVE, Unit::RemoveUnitMovementFlag(), Unit::SetDisableGravity(), Unit::SetHover(), and Creature::SetReactState().

◆ EnterEvadeMode()

void npc_ulduar_aerial_command_unit::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

1738 {
1739 if (_isEvading)
1740 return;
1741 _isEvading = true;
1742
1743 me->RemoveAllAuras();
1744 me->ExitVehicle();
1746 Reset();
1747 if (Creature* mimiron = GetMimiron())
1748 mimiron->AI()->EnterEvadeMode(why);
1749
1750 _isEvading = false;
1751 }
bool _EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:383
void RemoveAllAuras()
Definition Unit.cpp:5612
void ExitVehicle(Position const *exitPosition=nullptr)
Definition Unit.cpp:15705
void Reset() override
Definition boss_mimiron.cpp:1527

References CreatureAI::_EnterEvadeMode(), _isEvading, Unit::ExitVehicle(), GetMimiron, ScriptedAI::me, Unit::RemoveAllAuras(), and Reset().

◆ JustSummoned()

void npc_ulduar_aerial_command_unit::JustSummoned ( Creature s)
inlineoverridevirtual

Reimplemented from CreatureAI.

1754 {
1755 _summons.Summon(s);
1756 if (s->GetEntry() == NPC_BOMB_BOT)
1757 s->m_positionZ = 364.34f;
1758 }
@ NPC_BOMB_BOT
Definition boss_mimiron.cpp:107
uint32 GetEntry() const
Definition Object.h:117
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
float m_positionZ
Definition Position.h:57

References _summons, Object::GetEntry(), Position::m_positionZ, NPC_BOMB_BOT, and SummonList::Summon().

◆ KilledUnit()

void npc_ulduar_aerial_command_unit::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

1722 {
1723 if (who->IsPlayer())
1724 if (Creature* c = GetMimiron())
1725 {
1726 if (_phase == 3)
1727 {
1728 c->AI()->Talk(SAY_AERIAL_SLAY);
1729 }
1730 else
1731 {
1732 c->AI()->Talk(SAY_V07TRON_SLAY);
1733 }
1734 }
1735 }
@ SAY_AERIAL_SLAY
Definition boss_mimiron.cpp:248
@ SAY_V07TRON_SLAY
Definition boss_mimiron.cpp:251
bool IsPlayer() const
Definition Object.h:201

References _phase, GetMimiron, Object::IsPlayer(), SAY_AERIAL_SLAY, and SAY_V07TRON_SLAY.

◆ MoveInLineOfSight()

void npc_ulduar_aerial_command_unit::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

1719{}

◆ Reset()

void npc_ulduar_aerial_command_unit::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

1528 {
1529 _phase = 0;
1530 _isDefeated = false;
1531 _events.Reset();
1533 me->SetHover(false);
1534 me->SetDisableGravity(true);
1535 }
void Reset()
Definition EventMap.cpp:21

References _events, _isDefeated, _phase, _summons, SummonList::DespawnAll(), ScriptedAI::me, EventMap::Reset(), Unit::SetDisableGravity(), and Unit::SetHover().

Referenced by EnterEvadeMode().

◆ SetData()

void npc_ulduar_aerial_command_unit::SetData ( uint32  id,
uint32  value 
)
inlineoverridevirtual

Reimplemented from UnitAI.

1546 {
1547 if (id == 1) // setting phase to start fighting
1548 {
1549 switch (value)
1550 {
1551 case 0:
1552 _phase = 0;
1553 _events.Reset();
1554 break;
1555 case 3:
1556 _phase = 3;
1557 // Hover instead of disabled gravity: chase then keeps the ACU at
1558 // HoverHeight above ground instead of dragging it to ground level.
1559 me->SetDisableGravity(false);
1560 me->SetHover(true);
1562 me->SetImmuneToPC(false);
1564 _events.Reset();
1568 if (Creature* c = GetMimiron())
1569 if (c->AI()->GetData(1))
1571 break;
1572 case 4:
1575 _phase = 4;
1577 if (Unit* target = SelectTargetFromPlayerList(75.0f))
1578 AttackStart(target);
1580 _events.Reset();
1582 }
1583 }
1584 }
@ EVENT_SUMMON_JUNK_BOT
Definition boss_mimiron.cpp:210
@ EVENT_SUMMON_ASSAULT_BOT
Definition boss_mimiron.cpp:209
@ EVENT_SUMMON_BOMB_BOT
Definition boss_mimiron.cpp:206
@ EVENT_SUMMON_EMERGENCY_FIRE_BOTS
Definition boss_mimiron.cpp:221
@ EVENT_SPELL_PLASMA_BALL
Definition boss_mimiron.cpp:205
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition CreatureAI.cpp:117
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:48
Definition Unit.h:665
void SetImmuneToPC(bool apply, bool keepCombat=false)
Definition Unit.cpp:10631
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:750
void DoResetThreatList()
Definition ScriptedCreature.cpp:473
Player * SelectTargetFromPlayerList(float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
Definition ScriptedCreature.cpp:591
void AttackStart(Unit *who) override
Definition boss_mimiron.cpp:1537

References _events, _phase, AttackStart(), ScriptedAI::DoResetThreatList(), CreatureAI::DoZoneInCombat(), EVENT_SPELL_PLASMA_BALL, EVENT_SUMMON_ASSAULT_BOT, EVENT_SUMMON_BOMB_BOT, EVENT_SUMMON_EMERGENCY_FIRE_BOTS, EVENT_SUMMON_JUNK_BOT, GetMimiron, ScriptedAI::me, REACT_AGGRESSIVE, Unit::RemoveUnitFlag(), EventMap::Reset(), EventMap::ScheduleEvent(), ScriptedAI::SelectTargetFromPlayerList(), Unit::SetDisableGravity(), Unit::SetHover(), Unit::SetImmuneToPC(), Creature::SetReactState(), and UNIT_FLAG_NOT_SELECTABLE.

Referenced by DamageTaken().

◆ SpellHit()

void npc_ulduar_aerial_command_unit::SpellHit ( Unit ,
SpellInfo const *  spell 
)
inlineoverridevirtual

◆ SummonedCreatureDespawn()

void npc_ulduar_aerial_command_unit::SummonedCreatureDespawn ( Creature s)
inlineoverridevirtual

Reimplemented from CreatureAI.

1761 {
1762 _summons.Despawn(s);
1763 }
void Despawn(Creature const *summon)
Definition ScriptedCreature.h:89

References _summons, and SummonList::Despawn().

◆ UpdateAI()

void npc_ulduar_aerial_command_unit::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

1672 {
1674 return;
1675
1676 if (!UpdateVictim())
1677 return;
1678
1679 _events.Update(diff);
1680
1682 return;
1683
1684 switch (_events.ExecuteEvent())
1685 {
1686 case 0:
1687 break;
1690 _events.Repeat(15s);
1691 break;
1693 if (GameObject* pad = me->FindNearestGameObject(RAND(194742, 194746, 194745), 200.0f))
1695 trigger->AI()->DoAction(2);
1696 _events.Repeat(30s);
1697 break;
1699 if (GameObject* pad = me->FindNearestGameObject(RAND(194741, 194744, 194747), 200.0f))
1701 trigger->AI()->DoAction(1);
1702 _events.Repeat(10s);
1703 break;
1705 {
1706 uint32 ids[3] = {194740, 194743, 194748};
1707 for( uint8 i = 0; i < 3; ++i )
1708 if (GameObject* pad = me->FindNearestGameObject(ids[i], 200.0f))
1710 trigger->AI()->DoAction(3);
1711 _events.Repeat(45s);
1712 }
1713 break;
1714 }
1715
1717 }
static First const & RAND(First const &first, Second const &second, Rest const &... rest)
Definition CreatureAIImpl.h:25
std::uint8_t uint8
Definition Define.h:109
std::uint32_t uint32
Definition Define.h:107
@ TEMPSUMMON_MANUAL_DESPAWN
Definition Object.h:56
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:51
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ NPC_BOT_SUMMON_TRIGGER
Definition boss_mimiron.cpp:108
@ SPELL_PLASMA_BALL_P2
Definition boss_mimiron.cpp:77
@ SPELL_PLASMA_BALL_P1
Definition boss_mimiron.cpp:76
@ SPELL_SUMMON_BOMB_BOT
Definition boss_mimiron.cpp:83
@ SPELL_MAGNETIC_CORE
Definition boss_mimiron.cpp:79
bool UpdateVictim()
Definition CreatureAI.cpp:350
void Update(uint32 time)
Definition EventMap.h:67
void Repeat(Milliseconds time)
Definition EventMap.cpp:76
EventId ExecuteEvent()
Definition EventMap.cpp:86
Definition GameObject.h:120
bool DoSpellAttackIfReady(uint32 spell)
Definition UnitAI.cpp:76
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:6017
bool HasUnitState(const uint32 f) const
Definition Unit.h:737
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition Object.cpp:2562
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:2448

References _events, _phase, Unit::CastSpell(), UnitAI::DoSpellAttackIfReady(), EVENT_SUMMON_ASSAULT_BOT, EVENT_SUMMON_BOMB_BOT, EVENT_SUMMON_EMERGENCY_FIRE_BOTS, EVENT_SUMMON_JUNK_BOT, EventMap::ExecuteEvent(), WorldObject::FindNearestGameObject(), Unit::HasAura(), Unit::HasUnitFlag(), Unit::HasUnitState(), ScriptedAI::me, NPC_BOT_SUMMON_TRIGGER, RAND(), EventMap::Repeat(), SPELL_MAGNETIC_CORE, SPELL_PLASMA_BALL_P1, SPELL_PLASMA_BALL_P2, SPELL_SUMMON_BOMB_BOT, WorldObject::SummonCreature(), TEMPSUMMON_MANUAL_DESPAWN, TEMPSUMMON_TIMED_DESPAWN, UNIT_FLAG_NOT_SELECTABLE, UNIT_STATE_CASTING, EventMap::Update(), and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _events

EventMap npc_ulduar_aerial_command_unit::_events
private

Referenced by DoAction(), Reset(), SetData(), and UpdateAI().

◆ _isDefeated

bool npc_ulduar_aerial_command_unit::_isDefeated
private

Referenced by DamageTaken(), DoAction(), Reset(), and SpellHit().

◆ _isEvading

bool npc_ulduar_aerial_command_unit::_isEvading
private

◆ _phase

uint8 npc_ulduar_aerial_command_unit::_phase
private

◆ _summons

SummonList npc_ulduar_aerial_command_unit::_summons
private

◆ instance

InstanceScript* npc_ulduar_aerial_command_unit::instance
private

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