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 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 (const Position *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 >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
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 ()
 
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)
 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
1481 : ScriptedAI(creature), _summons(me)
1482 {
1484 _isEvading = false;
1485 me->SetDisableGravity(true);
1486 }
void SetDisableGravity(bool disable)
Definition Unit.cpp:16462
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1238
Definition ScriptedCreature.h:191
Creature * me
Definition ScriptedCreature.h:281
InstanceScript * instance
Definition boss_mimiron.cpp:1712
bool _isEvading
Definition boss_mimiron.cpp:1715
SummonList _summons
Definition boss_mimiron.cpp:1714

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

Member Function Documentation

◆ 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.

1559 {
1560 if (damage >= me->GetHealth() || me->GetHealth() < 15000)
1561 {
1562 damage = 0;
1563 if (_isDefeated)
1564 return;
1565 _isDefeated = true;
1567 if (_phase == 3)
1568 {
1570 {
1572 me->GetMotionMaster()->Clear();
1573 me->StopMoving();
1574 me->AttackStop();
1576 SetData(1, 0);
1579
1580 me->GetMotionMaster()->MovePoint(0, 2744.65f, 2569.46f, 381.34f);
1581
1582 if (Creature* c = GetMimiron())
1583 c->AI()->SetData(0, 3);
1584 }
1585 }
1586 else if (_phase == 4)
1587 {
1589 {
1593 me->CastSpell(me, SPELL_SELF_REPAIR, false);
1594 if (Creature* c = GetMimiron())
1595 {
1596 if (c->AI()->GetData(1))
1598 if (c->AI()->GetData(2))
1599 me->CastSpell(me, SPELL_BERSERK, true);
1600 c->AI()->SetData(0, 6);
1601 }
1602 }
1603 }
1604 }
1605 }
@ 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:566
#define GetMimiron()
Definition boss_mimiron.cpp:258
@ SPELL_EMERGENCY_MODE
Definition boss_mimiron.cpp:115
@ SPELL_SELF_REPAIR
Definition boss_mimiron.cpp:83
@ SPELL_BERSERK
Definition boss_mimiron.cpp:36
Definition Creature.h:47
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:99
void Clear(bool reset=true)
Definition MotionMaster.h:193
void MovePoint(uint32 id, const Position &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 InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition Unit.cpp:4302
void RemoveAllAurasExceptType(AuraType type)
Definition Unit.cpp:5654
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
bool HasUnitFlag(UnitFlags flags) const
Definition Unit.h:747
void StopMoving()
Definition Unit.cpp:12997
uint32 GetHealth() const
Definition Unit.h:1108
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:1350
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:748
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:7436
uint8 _phase
Definition boss_mimiron.cpp:1717
bool _isDefeated
Definition boss_mimiron.cpp:1716
void SetData(uint32 id, uint32 value) override
Definition boss_mimiron.cpp:1497

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(), 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.

1534 {
1535 switch (param)
1536 {
1537 case DO_DISABLE_AERIAL:
1538 me->CastStop();
1539 me->AttackStop();
1541 me->SetDisableGravity(false);
1543 _events.DelayEvents(25s);
1544 break;
1545 case DO_ENABLE_AERIAL:
1546 me->SetDisableGravity(true);
1550 }, 2s);
1551 break;
1552 case 1337:
1554 break;
1555 }
1556 }
@ REACT_AGGRESSIVE
Definition Unit.h:568
@ DO_ENABLE_AERIAL
Definition boss_mimiron.cpp:217
@ DO_DISABLE_AERIAL
Definition boss_mimiron.cpp:216
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:688
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:72
void CastStop(uint32 except_spellid=0, bool withInstant=true)
Interrupt the unit cast for all the current spells.
Definition Unit.cpp:1343
EventProcessor m_Events
Definition Object.h:736
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:1713

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

◆ EnterEvadeMode()

void npc_ulduar_aerial_command_unit::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

1674 {
1675 if (_isEvading)
1676 return;
1677 _isEvading = true;
1678
1679 me->RemoveAllAuras();
1680 me->ExitVehicle();
1682 Reset();
1683 if (Creature* mimiron = GetMimiron())
1684 mimiron->AI()->EnterEvadeMode(why);
1685
1686 _isEvading = false;
1687 }
bool _EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:382
void RemoveAllAuras()
Definition Unit.cpp:5580
void ExitVehicle(Position const *exitPosition=nullptr)
Definition Unit.cpp:15674
void Reset() override
Definition boss_mimiron.cpp:1488

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.

1690 {
1691 _summons.Summon(s);
1692 if (s->GetEntry() == NPC_BOMB_BOT)
1693 s->m_positionZ = 364.34f;
1694 }
@ NPC_BOMB_BOT
Definition boss_mimiron.cpp:96
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.

1658 {
1659 if (who->IsPlayer())
1660 if (Creature* c = GetMimiron())
1661 {
1662 if (_phase == 3)
1663 {
1664 c->AI()->Talk(SAY_AERIAL_SLAY);
1665 }
1666 else
1667 {
1668 c->AI()->Talk(SAY_V07TRON_SLAY);
1669 }
1670 }
1671 }
@ SAY_AERIAL_SLAY
Definition boss_mimiron.cpp:232
@ SAY_V07TRON_SLAY
Definition boss_mimiron.cpp:235
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.

1655{}

◆ Reset()

void npc_ulduar_aerial_command_unit::Reset ( )
inlineoverridevirtual
Todo:
: research ACU behaviour

Reimplemented from UnitAI.

1489 {
1490 _phase = 0;
1491 _isDefeated = false;
1492 _events.Reset();
1494 me->SetCombatMovement(false);
1495 }
void SetCombatMovement(bool allowMovement)
Definition Creature.cpp:3801
void Reset()
Definition EventMap.cpp:21

References _events, _isDefeated, _phase, _summons, SummonList::DespawnAll(), ScriptedAI::me, EventMap::Reset(), and Creature::SetCombatMovement().

Referenced by EnterEvadeMode().

◆ SetData()

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

Reimplemented from UnitAI.

1498 {
1499 if (id == 1) // setting phase to start fighting
1500 {
1501 switch (value)
1502 {
1503 case 0:
1504 _phase = 0;
1505 _events.Reset();
1506 break;
1507 case 3:
1508 _phase = 3;
1511 _events.Reset();
1515 if (Creature* c = GetMimiron())
1516 if (c->AI()->GetData(1))
1518 break;
1519 case 4:
1522 _phase = 4;
1524 if (Unit* target = SelectTargetFromPlayerList(75.0f))
1525 AttackStart(target);
1527 _events.Reset();
1529 }
1530 }
1531 }
@ EVENT_SUMMON_JUNK_BOT
Definition boss_mimiron.cpp:198
@ EVENT_SUMMON_ASSAULT_BOT
Definition boss_mimiron.cpp:197
@ EVENT_SUMMON_BOMB_BOT
Definition boss_mimiron.cpp:194
@ EVENT_SUMMON_EMERGENCY_FIRE_BOTS
Definition boss_mimiron.cpp:209
@ EVENT_SPELL_PLASMA_BALL
Definition boss_mimiron.cpp:193
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:664
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:749
void DoResetThreatList()
Definition ScriptedCreature.cpp:473
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:228
Player * SelectTargetFromPlayerList(float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
Definition ScriptedCreature.cpp:591

References _events, _phase, ScriptedAI::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(), 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.

1697 {
1698 _summons.Despawn(s);
1699 }
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.

1608 {
1610 return;
1611
1612 if (!UpdateVictim())
1613 return;
1614
1615 _events.Update(diff);
1616
1618 return;
1619
1620 switch (_events.ExecuteEvent())
1621 {
1622 case 0:
1623 break;
1626 _events.Repeat(15s);
1627 break;
1629 if (GameObject* pad = me->FindNearestGameObject(RAND(194742, 194746, 194745), 200.0f))
1631 trigger->AI()->DoAction(2);
1632 _events.Repeat(30s);
1633 break;
1635 if (GameObject* pad = me->FindNearestGameObject(RAND(194741, 194744, 194747), 200.0f))
1637 trigger->AI()->DoAction(1);
1638 _events.Repeat(10s);
1639 break;
1641 {
1642 uint32 ids[3] = {194740, 194743, 194748};
1643 for( uint8 i = 0; i < 3; ++i )
1644 if (GameObject* pad = me->FindNearestGameObject(ids[i], 200.0f))
1646 trigger->AI()->DoAction(3);
1647 _events.Repeat(45s);
1648 }
1649 break;
1650 }
1651
1653 }
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:97
@ SPELL_PLASMA_BALL_P2
Definition boss_mimiron.cpp:66
@ SPELL_PLASMA_BALL_P1
Definition boss_mimiron.cpp:65
@ SPELL_SUMMON_BOMB_BOT
Definition boss_mimiron.cpp:72
@ SPELL_MAGNETIC_CORE
Definition boss_mimiron.cpp:68
bool UpdateVictim()
Definition CreatureAI.cpp:353
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:75
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5982
bool HasUnitState(const uint32 f) const
Definition Unit.h:736
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition Object.cpp:2394
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition Object.cpp:2508

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(), 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: