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

Public Member Functions

 npc_ulduar_vx001 (Creature *creature)
 
void Reset () override
 
void AttackStart (Unit *) override
 
void SetData (uint32 id, uint32 value) override
 
void DoAction (int32 action) 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 PassengerBoarded (Unit *p, int8, bool apply) override
 == Fields =======================================
 
void JustSummoned (Creature *summon) override
 
void SpellHit (Unit *caster, 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 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
 
bool _isEvading
 
bool _fighting
 
bool _leftArm
 
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_vx001()

npc_ulduar_vx001::npc_ulduar_vx001 ( Creature *  creature)
inline
1267 : ScriptedAI(creature)
1268 {
1270 _isEvading = false;
1271 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1247
Definition ScriptedCreature.h:202
Creature * me
Definition ScriptedCreature.h:292
InstanceScript * instance
Definition boss_mimiron.cpp:1557
bool _isEvading
Definition boss_mimiron.cpp:1559

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

Member Function Documentation

◆ AttackStart()

void npc_ulduar_vx001::AttackStart ( Unit *  )
inlineoverridevirtual

Reimplemented from UnitAI.

1283{}

◆ DamageTaken()

void npc_ulduar_vx001::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.

1343 {
1344 if (damage >= me->GetHealth() || me->GetHealth() < 15000)
1345 {
1346 damage = 0;
1347 if (me->GetReactState() == REACT_PASSIVE)
1348 return;
1350 if (_phase == 2)
1351 {
1353 {
1355 SetData(1, 0);
1361 if (Creature* c = GetMimiron())
1362 c->AI()->SetData(0, 2);
1363 }
1364 }
1365 else if (_phase == 4)
1366 {
1368 {
1372 me->CastSpell(me, SPELL_SELF_REPAIR, false);
1373 if (Creature* c = GetMimiron())
1374 {
1375 if (c->AI()->GetData(1))
1377 if (c->AI()->GetData(2))
1378 me->CastSpell(me, SPELL_BERSERK, true);
1379 c->AI()->SetData(0, 5);
1380 }
1381 }
1382 }
1383 }
1384 }
@ EMOTE_ONESHOT_CUSTOM_SPELL_06
Definition SharedDefines.h:2006
@ 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
@ UNIT_NPC_EMOTESTATE
Definition UpdateFields.h:140
#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
ReactStates GetReactState() const
Definition Creature.h:100
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:99
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
bool HasUnitFlag(UnitFlags flags) const
Definition Unit.h:753
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 SetUInt32Value(uint16 index, uint32 value)
Definition Unit.cpp:17078
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:754
void HandleEmoteCommand(uint32 emoteId)
Definition Unit.cpp:2202
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:3285
uint8 _phase
Definition boss_mimiron.cpp:1562
void SetData(uint32 id, uint32 value) override
Definition boss_mimiron.cpp:1285

References _phase, Unit::CastSpell(), EMOTE_ONESHOT_CUSTOM_SPELL_06, Unit::GetHealth(), GetMimiron, Creature::GetReactState(), Unit::HandleEmoteCommand(), Unit::HasUnitFlag(), Unit::InterruptNonMeleeSpells(), ScriptedAI::me, REACT_PASSIVE, Unit::RemoveAllAurasExceptType(), Unit::SendMeleeAttackStop(), SetData(), Creature::SetReactState(), Unit::SetUInt32Value(), Unit::SetUnitFlag(), SPELL_AURA_CONTROL_VEHICLE, SPELL_BERSERK, SPELL_EMERGENCY_MODE, SPELL_SELF_REPAIR, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_NOT_SELECTABLE, and UNIT_NPC_EMOTESTATE.

◆ DoAction()

void npc_ulduar_vx001::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

1333 {
1334 if (action == DO_DESPAWN_SUMMONS)
1335 if (Vehicle* vk = me->GetVehicleKit())
1336 for (uint8 i = 0; i < 2; ++i)
1337 if (Unit* r = vk->GetPassenger(5 + i))
1338 if (r->IsCreature())
1339 r->ToCreature()->DespawnOrUnsummon(1ms);
1340 }
std::uint8_t uint8
Definition Define.h:109
@ DO_DESPAWN_SUMMONS
Definition boss_mimiron.cpp:237
Definition Unit.h:670
Vehicle * GetVehicleKit() const
Definition Unit.h:1947
Definition Vehicle.h:28

References DO_DESPAWN_SUMMONS, Unit::GetVehicleKit(), and ScriptedAI::me.

◆ EnterEvadeMode()

void npc_ulduar_vx001::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

1510 {
1511 if (_isEvading)
1512 return;
1513 _isEvading = true;
1514
1515 me->RemoveAllAuras();
1516 me->ExitVehicle();
1518 Reset();
1519 if (Creature* mimiron = GetMimiron())
1520 mimiron->AI()->EnterEvadeMode(why);
1521
1522 _isEvading = false;
1523 }
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:1273

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

◆ JustSummoned()

void npc_ulduar_vx001::JustSummoned ( Creature *  summon)
inlineoverridevirtual

Reimplemented from CreatureAI.

1532 {
1533 if (summon->GetEntry() == NPC_BURST_TARGET)
1534 {
1535 // 64840 has no usable duration, so the aim point is despawned by hand: sniffs put its
1536 // lifetime near 11s, which keeps three of them alive across a chain of volleys
1537 summon->DespawnOrUnsummon(11s);
1539 }
1540 }
@ NPC_BURST_TARGET
Definition boss_mimiron.cpp:73
@ SPELL_RAPID_BURST_TARGET_ME
Definition boss_mimiron.cpp:72
void DespawnOrUnsummon(Milliseconds msTimeToDespawn=0ms, Seconds forcedRespawnTimer=0s)
Definition Creature.cpp:2221
uint32 GetEntry() const
Definition Object.h:123

References Unit::CastSpell(), Creature::DespawnOrUnsummon(), Object::GetEntry(), ScriptedAI::me, NPC_BURST_TARGET, and SPELL_RAPID_BURST_TARGET_ME.

◆ KilledUnit()

void npc_ulduar_vx001::KilledUnit ( Unit *  who)
inlineoverridevirtual

Reimplemented from CreatureAI.

1494 {
1495 if (who->IsPlayer())
1496 if (Creature* c = GetMimiron())
1497 {
1498 if (_phase == 2)
1499 {
1500 c->AI()->Talk(SAY_VX001_SLAY);
1501 }
1502 else
1503 {
1504 c->AI()->Talk(SAY_V07TRON_SLAY);
1505 }
1506 }
1507 }
@ SAY_V07TRON_SLAY
Definition boss_mimiron.cpp:255
@ SAY_VX001_SLAY
Definition boss_mimiron.cpp:249
bool IsPlayer() const
Definition Object.h:207

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

◆ MoveInLineOfSight()

void npc_ulduar_vx001::MoveInLineOfSight ( Unit *  )
inlineoverridevirtual

Reimplemented from CreatureAI.

1491{}

◆ PassengerBoarded()

void npc_ulduar_vx001::PassengerBoarded ( Unit *  ,
int8  ,
bool   
)
inlineoverridevirtual

== Fields =======================================

Reimplemented from CreatureAI.

1526 {
1527 if (p->GetEntry() == NPC_ROCKET_VISUAL && !apply)
1528 p->ToCreature()->DespawnOrUnsummon(8s);
1529 }
@ NPC_ROCKET_VISUAL
Definition boss_mimiron.cpp:65

References Creature::DespawnOrUnsummon(), Object::GetEntry(), NPC_ROCKET_VISUAL, and Object::ToCreature().

◆ Reset()

void npc_ulduar_vx001::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

1274 {
1275 _phase = 0;
1276 _fighting = false;
1277 _leftArm = false;
1278 me->SetRegeneratingHealth(false);
1279 _events.Reset();
1281 }
TaskScheduler scheduler
Definition CreatureAI.h:74
void SetRegeneratingHealth(bool enable)
Definition Creature.h:328
void Reset()
Definition EventMap.cpp:21
TaskScheduler & CancelAll()
Definition TaskScheduler.cpp:45
bool _fighting
Definition boss_mimiron.cpp:1560
bool _leftArm
Definition boss_mimiron.cpp:1561
EventMap _events
Definition boss_mimiron.cpp:1558

References _events, _fighting, _leftArm, _phase, TaskScheduler::CancelAll(), ScriptedAI::me, EventMap::Reset(), CreatureAI::scheduler, and Creature::SetRegeneratingHealth().

Referenced by EnterEvadeMode().

◆ SetData()

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

Reimplemented from UnitAI.

1286 {
1287 if (id == 1) // setting phase to start fighting
1288 {
1289 switch (value)
1290 {
1291 case 0:
1292 _phase = 0;
1293 _fighting = false;
1295 _events.Reset();
1296 break;
1297 case 2:
1298 _phase = 2;
1299 _fighting = true;
1302 _events.Reset();
1308 if (Creature* c = GetMimiron())
1309 if (c->AI()->GetData(1))
1310 {
1313 }
1314 break;
1315 case 4:
1316 _phase = 4;
1317 _fighting = true;
1319 _events.Reset();
1324 if (Creature* c = GetMimiron())
1325 if (c->AI()->GetData(1))
1327 break;
1328 }
1329 }
1330 }
@ EMOTE_ONESHOT_SPELL_CAST_OMNI
Definition SharedDefines.h:2061
@ EMOTE_ONESHOT_NONE
Definition SharedDefines.h:1898
@ EVENT_FROST_BOMB
Definition boss_mimiron.cpp:224
@ EVENT_SPELL_SPINNING_UP
Definition boss_mimiron.cpp:205
@ EVENT_FLAME_SUPPRESSION_10
Definition boss_mimiron.cpp:223
@ EVENT_SPELL_HEAT_WAVE
Definition boss_mimiron.cpp:200
@ EVENT_HAND_PULSE
Definition boss_mimiron.cpp:206
@ EVENT_SPELL_RAPID_BURST
Definition boss_mimiron.cpp:203
@ EVENT_SPELL_ROCKET_STRIKE
Definition boss_mimiron.cpp:201
@ EVENT_REINSTALL_ROCKETS
Definition boss_mimiron.cpp:202
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:48
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:755

References _events, _fighting, _phase, EMOTE_ONESHOT_NONE, EMOTE_ONESHOT_SPELL_CAST_OMNI, EVENT_FLAME_SUPPRESSION_10, EVENT_FROST_BOMB, EVENT_HAND_PULSE, EVENT_REINSTALL_ROCKETS, EVENT_SPELL_HEAT_WAVE, EVENT_SPELL_RAPID_BURST, EVENT_SPELL_ROCKET_STRIKE, EVENT_SPELL_SPINNING_UP, GetMimiron, ScriptedAI::me, Unit::RemoveUnitFlag(), EventMap::Reset(), EventMap::ScheduleEvent(), Unit::SetUInt32Value(), UNIT_FLAG_NOT_SELECTABLE, and UNIT_NPC_EMOTESTATE.

Referenced by DamageTaken().

◆ SpellHit()

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

Reimplemented from CreatureAI.

1543 {
1544 if (spell->Id == SPELL_SELF_REPAIR)
1545 {
1548 }
1549 else if (caster && spell->Id == SPELL_RAPID_BURST_TARGET_ME && !me->HasUnitState(UNIT_STATE_CASTING))
1550 {
1551 me->SetFacingToObject(caster);
1552 DoCast(caster, SPELL_RAPID_BURST, true);
1553 }
1554 }
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ REACT_AGGRESSIVE
Definition Unit.h:576
@ SPELL_RAPID_BURST
Definition boss_mimiron.cpp:68
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:175
void SetFacingToObject(WorldObject *object, Milliseconds timed=0ms)
Definition Unit.cpp:16167
bool HasUnitState(const uint32 f) const
Definition Unit.h:742

References UnitAI::DoCast(), Unit::HasUnitState(), SpellInfo::Id, ScriptedAI::me, REACT_AGGRESSIVE, Unit::RemoveUnitFlag(), Unit::SetFacingToObject(), Creature::SetReactState(), SPELL_RAPID_BURST, SPELL_RAPID_BURST_TARGET_ME, SPELL_SELF_REPAIR, UNIT_FLAG_NON_ATTACKABLE, and UNIT_STATE_CASTING.

◆ UpdateAI()

void npc_ulduar_vx001::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

1387 {
1388 if (!_fighting)
1389 return;
1390
1391 _events.Update(diff);
1392 // before the casting guard: the windup facing task must tick while Spinning Up channels
1393 scheduler.Update(diff);
1394
1396 return;
1397
1398 switch (_events.ExecuteEvent())
1399 {
1400 case 0:
1401 break;
1403 me->CastSpell(me, SPELL_HEAT_WAVE, true);
1404 _events.Repeat(10s);
1405 break;
1408 _events.Repeat(20s);
1410 break;
1412 if (Vehicle* vk = me->GetVehicleKit())
1413 {
1414 for (uint8 i = 5; i <= 6; ++i)
1415 if (Unit* rocket = vk->GetPassenger(i))
1416 rocket->SetDisplayId(rocket->GetNativeDisplayId()); // restore the fired rocket's visual
1418 if (!me->HandleSpellClick(accessory, i))
1419 accessory->UnSummon();
1420 }
1421 break;
1423 // 64840 parks a Burst Target where the player stands; the channel is aimed at it from SpellHit
1424 // so the damage cones hold one line instead of following the player around
1425 if (Player* p = SelectTargetFromPlayerList(80.0f))
1427 _events.Repeat(3600ms);
1428 break;
1429 case EVENT_HAND_PULSE:
1430 if (Player* p = SelectTargetFromPlayerList(80.0f))
1431 {
1433 if (Unit* vb = me->GetVehicleBase())
1434 {
1435 vb->SendMeleeAttackStop();
1436 // Keep the arms-deployed state so the model returns to it after the one-shot pulse animation
1438
1439 if (!_leftArm)
1440 {
1441 vb->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOM_SPELL_03);
1442 me->CastSpell(p, SPELL_HAND_PULSE_R, false);
1443 }
1444 else
1445 {
1446 vb->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOM_SPELL_04);
1447 me->CastSpell(p, SPELL_HAND_PULSE_L, false);
1448 }
1449 }
1450
1451 _leftArm = !_leftArm;
1452 }
1453 _events.Repeat(1750ms);
1454 break;
1456 _events.Repeat(60s);
1457 // Sniffed: the target is parked on the DB Target from the cast until the barrage ends
1459 me->SetTarget(dbTarget->GetGUID());
1461 // untargeted: conditions send EFFECT_0 to the DB Target (channel object, barrage
1462 // chain) and EFFECT_1 to the MK II (self-cast 66490 root+pacify for the barrage)
1463 me->CastSpell((Unit*)nullptr, SPELL_SPINNING_UP, true);
1464 // the DB Target moves ~42 degrees during the windup; track it or the barrage opens off the telegraph
1465 scheduler.Schedule(400ms, [this](TaskContext context)
1466 {
1468 {
1469 FaceBarrageArc(me);
1470 context.Repeat();
1471 }
1472 });
1473 if (Unit* vehicle = me->GetVehicleBase())
1474 {
1475 vehicle->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_CUSTOM_SPELL_01);
1476 vehicle->HandleEmoteCommand(EMOTE_STATE_CUSTOM_SPELL_01);
1477 }
1479 break;
1482 _events.Repeat(10s);
1483 break;
1484 case EVENT_FROST_BOMB:
1486 _events.Repeat(45s);
1487 break;
1488 }
1489 }
@ TEMPSUMMON_MANUAL_DESPAWN
Definition Object.h:57
@ EMOTE_ONESHOT_CUSTOM_SPELL_03
Definition SharedDefines.h:2003
@ EMOTE_ONESHOT_CUSTOM_SPELL_04
Definition SharedDefines.h:2004
@ EMOTE_STATE_CUSTOM_SPELL_01
Definition SharedDefines.h:2014
@ SPELLVALUE_MAX_TARGETS
Definition SpellDefines.h:125
@ SPELL_FLAME_SUPPRESSANT_10yd
Definition boss_mimiron.cpp:145
@ SPELL_VX001_FROST_BOMB
Definition boss_mimiron.cpp:138
@ SPELL_ROCKET_STRIKE_SINGLE
Definition boss_mimiron.cpp:60
@ SPELL_HAND_PULSE_R
Definition boss_mimiron.cpp:93
@ SPELL_HEAT_WAVE
Definition boss_mimiron.cpp:57
@ SPELL_ROCKET_STRIKE_BOTH
Definition boss_mimiron.cpp:61
@ SPELL_SUMMON_BURST_TARGET
Definition boss_mimiron.cpp:71
@ SPELL_SPINNING_UP
Definition boss_mimiron.cpp:75
@ SPELL_HAND_PULSE_L
Definition boss_mimiron.cpp:94
void FaceBarrageArc(Unit *caster)
Definition boss_mimiron.cpp:1246
void SetTarget(ObjectGuid guid=ObjectGuid::Empty) override
Definition Creature.cpp:3616
void Update(uint32 time)
Definition EventMap.h:67
void Repeat(Milliseconds time)
Definition EventMap.cpp:76
EventId ExecuteEvent()
Definition EventMap.cpp:86
void RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:70
Creature * GetCreature(uint32 type)
Definition InstanceScript.cpp:126
Definition Player.h:1086
Definition TaskScheduler.h:422
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
Definition TaskScheduler.h:233
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition TaskScheduler.cpp:27
Definition TemporarySummon.h:50
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
Definition Unit.cpp:4103
Unit * GetVehicleBase() const
Definition Unit.cpp:14704
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1435
bool HandleSpellClick(Unit *clicker, int8 seatId=-1)
Definition Unit.cpp:15212
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
float GetPositionZ() const
Definition Position.h:123
float GetOrientation() const
Definition Position.h:124
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122
Player * SelectTargetFromPlayerList(float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
Definition ScriptedCreature.cpp:591
@ DATA_MIMIRON_DB_TARGET
Definition ulduar.h:75

References _events, _fighting, _leftArm, _phase, Unit::CastCustomSpell(), Unit::CastSpell(), DATA_MIMIRON_DB_TARGET, UnitAI::DoCast(), EMOTE_ONESHOT_CUSTOM_SPELL_03, EMOTE_ONESHOT_CUSTOM_SPELL_04, EMOTE_STATE_CUSTOM_SPELL_01, EVENT_FLAME_SUPPRESSION_10, EVENT_FROST_BOMB, EVENT_HAND_PULSE, EVENT_REINSTALL_ROCKETS, EVENT_SPELL_HEAT_WAVE, EVENT_SPELL_RAPID_BURST, EVENT_SPELL_ROCKET_STRIKE, EVENT_SPELL_SPINNING_UP, EventMap::ExecuteEvent(), FaceBarrageArc(), Unit::FindCurrentSpellBySpellId(), InstanceScript::GetCreature(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::GetVehicleBase(), Unit::GetVehicleKit(), Unit::HandleSpellClick(), Unit::HasUnitState(), instance, ScriptedAI::me, NPC_ROCKET_VISUAL, EventMap::Repeat(), EventMap::RescheduleEvent(), TaskScheduler::Schedule(), EventMap::ScheduleEvent(), CreatureAI::scheduler, ScriptedAI::SelectTargetFromPlayerList(), Unit::SetFacingToObject(), Creature::SetTarget(), SPELL_FLAME_SUPPRESSANT_10yd, SPELL_HAND_PULSE_L, SPELL_HAND_PULSE_R, SPELL_HEAT_WAVE, SPELL_ROCKET_STRIKE_BOTH, SPELL_ROCKET_STRIKE_SINGLE, SPELL_SPINNING_UP, SPELL_SUMMON_BURST_TARGET, SPELL_VX001_FROST_BOMB, SPELLVALUE_MAX_TARGETS, WorldObject::SummonCreature(), TEMPSUMMON_MANUAL_DESPAWN, UNIT_NPC_EMOTESTATE, UNIT_STATE_CASTING, TaskScheduler::Update(), and EventMap::Update().

Member Data Documentation

◆ _events

EventMap npc_ulduar_vx001::_events
private

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

◆ _fighting

bool npc_ulduar_vx001::_fighting
private

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

◆ _isEvading

bool npc_ulduar_vx001::_isEvading
private

Referenced by EnterEvadeMode(), and npc_ulduar_vx001().

◆ _leftArm

bool npc_ulduar_vx001::_leftArm
private

Referenced by Reset(), and UpdateAI().

◆ _phase

uint8 npc_ulduar_vx001::_phase
private

◆ instance

InstanceScript* npc_ulduar_vx001::instance
private

Referenced by npc_ulduar_vx001(), and UpdateAI().


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