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

InstanceScript * instance
 
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
Creature * me
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoType * AISpellInfo
 
- 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)
 
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
1567 : ScriptedAI(creature), _summons(me)
1568 {
1570 _isEvading = false;
1571 me->SetDisableGravity(true);
1572 }
void SetDisableGravity(bool disable)
Definition Unit.cpp:16208
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1247
Definition ScriptedCreature.h:202
Creature * me
Definition ScriptedCreature.h:292
InstanceScript * instance
Definition boss_mimiron.cpp:1824
bool _isEvading
Definition boss_mimiron.cpp:1827
SummonList _summons
Definition boss_mimiron.cpp:1826

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.

1585 {
1586 if (_phase == 3)
1587 AttackStartCaster(who, 30.0f);
1588 else
1590 }
void AttackStartCaster(Unit *victim, float dist)
Definition UnitAI.cpp:35
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:228
uint8 _phase
Definition boss_mimiron.cpp:1829

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.

1669 {
1670 if (damage >= me->GetHealth() || me->GetHealth() < 15000)
1671 {
1672 damage = 0;
1673 if (_isDefeated)
1674 return;
1675 _isDefeated = true;
1677 if (_phase == 3)
1678 {
1680 {
1682 me->GetMotionMaster()->Clear();
1683 me->StopMoving();
1684 me->AttackStop();
1686 SetData(1, 0);
1689
1690 me->SetDisableGravity(true);
1691 me->GetMotionMaster()->MovePoint(0, 2744.65f, 2569.46f, 381.34f);
1692
1693 if (Creature* c = GetMimiron())
1694 c->AI()->SetData(0, 3);
1695 }
1696 }
1697 else if (_phase == 4)
1698 {
1700 {
1704 me->CastSpell(me, SPELL_SELF_REPAIR, false);
1705 if (Creature* c = GetMimiron())
1706 {
1707 if (c->AI()->GetData(1))
1709 if (c->AI()->GetData(2))
1710 me->CastSpell(me, SPELL_BERSERK, true);
1711 c->AI()->SetData(0, 6);
1712 }
1713 }
1714 }
1715 }
1716 }
@ 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:574
#define GetMimiron()
Definition boss_mimiron.cpp:278
@ SPELL_EMERGENCY_MODE
Definition boss_mimiron.cpp:129
@ SPELL_SELF_REPAIR
Definition boss_mimiron.cpp:96
@ 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:99
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
void Clear(bool reset=true)
Definition MotionMaster.h:194
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition Unit.cpp:4079
void RemoveAllAurasExceptType(AuraType type)
Definition Unit.cpp:5467
MotionMaster * GetMotionMaster()
Definition Unit.h:1774
bool HasUnitFlag(UnitFlags flags) const
Definition Unit.h:753
void StopMoving()
Definition Unit.cpp:12709
uint32 GetHealth() const
Definition Unit.h:1122
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:1378
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:754
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:7270
bool _isDefeated
Definition boss_mimiron.cpp:1828
void SetData(uint32 id, uint32 value) override
Definition boss_mimiron.cpp:1592

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.

1634 {
1635 switch (param)
1636 {
1637 case DO_DISABLE_AERIAL:
1638 me->CastStop();
1639 me->AttackStop();
1641 // Raw flag removal first: MoveFall lands at ground + hover height, which would
1642 // keep the ACU airborne, and SetHover(false) would relocate it without a spline.
1643 // SetHover(false) afterwards is relocation-free and tells the client to stop
1644 // hovering, else it keeps floating the grounded unit back up
1647 me->SetHover(false);
1648 _events.DelayEvents(23s);
1649 break;
1650 case DO_ENABLE_AERIAL:
1651 if (_isDefeated)
1652 break;
1653 me->SetDisableGravity(true);
1654 // 16y: above hover height (15y) so SetHover does not relocate it further up
1657 me->SetDisableGravity(false);
1658 me->SetHover(true);
1660 }, 2s);
1661 break;
1662 case DO_DESPAWN_SUMMONS:
1664 break;
1665 }
1666 }
@ MOVEMENTFLAG_HOVER
Definition UnitDefines.h:402
@ REACT_AGGRESSIVE
Definition Unit.h:576
@ DO_ENABLE_AERIAL
Definition boss_mimiron.cpp:236
@ DO_DESPAWN_SUMMONS
Definition boss_mimiron.cpp:237
@ DO_DISABLE_AERIAL
Definition boss_mimiron.cpp:235
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:782
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:72
void SetHover(bool enable)
Definition Unit.cpp:16354
void CastStop(uint32 except_spellid=0, bool withInstant=true)
Interrupt the unit cast for all the current spells.
Definition Unit.cpp:1371
void RemoveUnitMovementFlag(uint32 f)
Definition Unit.h:779
EventProcessor m_Events
Definition Object.h:749
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:1825

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.

1786 {
1787 if (_isEvading)
1788 return;
1789 _isEvading = true;
1790
1791 me->RemoveAllAuras();
1792 me->ExitVehicle();
1794 Reset();
1795 if (Creature* mimiron = GetMimiron())
1796 mimiron->AI()->EnterEvadeMode(why);
1797
1798 _isEvading = false;
1799 }
bool _EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:383
void RemoveAllAuras()
Definition Unit.cpp:5393
void ExitVehicle(Position const *exitPosition=nullptr)
Definition Unit.cpp:15393
void Reset() override
Definition boss_mimiron.cpp:1574

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.

1802 {
1803 _summons.Summon(s);
1804 if (s->GetEntry() == NPC_BOMB_BOT)
1805 s->m_positionZ = 364.34f;
1806 }
@ NPC_BOMB_BOT
Definition boss_mimiron.cpp:109
uint32 GetEntry() const
Definition Object.h:123
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.

1770 {
1771 if (who->IsPlayer())
1772 if (Creature* c = GetMimiron())
1773 {
1774 if (_phase == 3)
1775 {
1776 c->AI()->Talk(SAY_AERIAL_SLAY);
1777 }
1778 else
1779 {
1780 c->AI()->Talk(SAY_V07TRON_SLAY);
1781 }
1782 }
1783 }
@ SAY_AERIAL_SLAY
Definition boss_mimiron.cpp:252
@ SAY_V07TRON_SLAY
Definition boss_mimiron.cpp:255
bool IsPlayer() const
Definition Object.h:207

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.

1767{}

◆ Reset()

void npc_ulduar_aerial_command_unit::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

1575 {
1576 _phase = 0;
1577 _isDefeated = false;
1578 _events.Reset();
1580 me->SetHover(false);
1581 me->SetDisableGravity(true);
1582 }
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.

1593 {
1594 if (id == 1) // setting phase to start fighting
1595 {
1596 switch (value)
1597 {
1598 case 0:
1599 _phase = 0;
1600 _events.Reset();
1601 break;
1602 case 3:
1603 _phase = 3;
1604 // Hover instead of disabled gravity: chase then keeps the ACU at
1605 // HoverHeight above ground instead of dragging it to ground level.
1606 me->SetDisableGravity(false);
1607 me->SetHover(true);
1609 me->SetImmuneToPC(false);
1611 _events.Reset();
1615 if (Creature* c = GetMimiron())
1616 if (c->AI()->GetData(1))
1618 break;
1619 case 4:
1622 _phase = 4;
1624 if (Unit* target = SelectTargetFromPlayerList(75.0f))
1625 AttackStart(target);
1627 _events.Reset();
1629 }
1630 }
1631 }
@ EVENT_SUMMON_JUNK_BOT
Definition boss_mimiron.cpp:214
@ EVENT_SUMMON_ASSAULT_BOT
Definition boss_mimiron.cpp:213
@ EVENT_SUMMON_BOMB_BOT
Definition boss_mimiron.cpp:210
@ EVENT_SUMMON_EMERGENCY_FIRE_BOTS
Definition boss_mimiron.cpp:225
@ EVENT_SPELL_PLASMA_BALL
Definition boss_mimiron.cpp:209
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:670
void SetImmuneToPC(bool apply, bool keepCombat=false)
Definition Unit.cpp:10423
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:755
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:1584

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.

1809 {
1810 _summons.Despawn(s);
1811 }
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.

1719 {
1721 return;
1722
1723 if (!UpdateVictim())
1724 return;
1725
1726 _events.Update(diff);
1727
1729 return;
1730
1731 switch (_events.ExecuteEvent())
1732 {
1733 case 0:
1734 break;
1737 _events.Repeat(15s);
1738 break;
1740 if (GameObject* pad = me->FindNearestGameObject(RAND(194742, 194746, 194745), 200.0f))
1742 trigger->AI()->DoAction(2);
1743 _events.Repeat(30s);
1744 break;
1746 if (GameObject* pad = me->FindNearestGameObject(RAND(194741, 194744, 194747), 200.0f))
1748 trigger->AI()->DoAction(1);
1749 _events.Repeat(10s);
1750 break;
1752 {
1753 uint32 ids[3] = {194740, 194743, 194748};
1754 for( uint8 i = 0; i < 3; ++i )
1755 if (GameObject* pad = me->FindNearestGameObject(ids[i], 200.0f))
1757 trigger->AI()->DoAction(3);
1758 _events.Repeat(45s);
1759 }
1760 break;
1761 }
1762
1765 }
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:57
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:52
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ NPC_BOT_SUMMON_TRIGGER
Definition boss_mimiron.cpp:110
@ SPELL_PLASMA_BALL_P2
Definition boss_mimiron.cpp:79
@ SPELL_PLASMA_BALL_P1
Definition boss_mimiron.cpp:78
@ SPELL_SUMMON_BOMB_BOT
Definition boss_mimiron.cpp:85
@ SPELL_MAGNETIC_CORE
Definition boss_mimiron.cpp:81
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:125
bool DoSpellAttackIfReady(uint32 spell)
Definition UnitAI.cpp:72
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5798
bool HasUnitState(const uint32 f) const
Definition Unit.h:742
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition Object.cpp:2574
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:2460

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: