TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boss_vx_001::boss_vx_001AI Struct Reference

Public Member Functions

 boss_vx_001AI (Creature *creature)
 
void DamageTaken (Unit *who, uint32 &damage) override
 
void DoAction (int32 action) override
 
void EnterEvadeMode (EvadeReason) override
 
void JustSummoned (Creature *summon) override
 
void KilledUnit (Unit *victim) override
 
void SpellHit (Unit *caster, SpellInfo const *) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
virtual ~BossAI ()
 
void SummonedCreatureDespawn (Creature *summon) override
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void EnterCombat (Unit *) override
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
bool CanAIAttack (Unit const *target) const override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void OnPossess (bool)
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoResetThreat ()
 
float DoGetThreat (Unit *unit)
 
void DoModifyThreatPercent (Unit *unit, int32 pct)
 
void DoTeleportTo (float x, float y, float z, uint32 time=0)
 
void DoTeleportTo (float const pos[4])
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
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 HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo constSelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, 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)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () 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
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
 CreatureAI (Creature *creature)
 
virtual ~CreatureAI ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted () const
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
void OnCharmed (bool apply) override
 
void DoZoneInCombat (Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary constGetBoundary () const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual void InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectAggroTarget targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectAggroTarget targetType)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
void DoCast (uint32 spellId)
 
void DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
void DoCastVictim (uint32 spellId, bool triggered=false)
 
void DoCastAOE (uint32 spellId, bool triggered=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
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 sQuestReward (Player *, Quest const *, uint32)
 
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
 
virtual void sOnGameEvent (bool, uint16)
 

Private Attributes

bool _fireFighter
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason { EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_SEQUENCE_BREAK, EVADE_REASON_OTHER }
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _EnterCombat ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _DespawnAtEvade ()
 
void TeleportCheaters ()
 
- 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 CheckBoundary (Position const *who=nullptr) const
 
void SetBoundary (CreatureBoundary const *boundary)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

boss_vx_001::boss_vx_001AI::boss_vx_001AI ( Creature creature)
inline
923  : BossAI(creature, BOSS_MIMIRON)
924  {
925  me->SetDisableGravity(true); // This is the unfold visual state of VX-001, it has to be set on create as it requires an objectupdate if set later.
926  me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SPECIAL_UNARMED); // This is a hack to force the yet to be unfolded visual state.
928  _fireFighter = false;
929  }
Definition: UpdateFields.h:136
Definition: Unit.h:1129
bool _fireFighter
Definition: boss_mimiron.cpp:1086
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:996
bool SetDisableGravity(bool disable, bool packetOnly=false)
Definition: Unit.cpp:15818
Creature *const me
Definition: CreatureAI.h:71
Definition: SharedDefines.h:2563
Definition: ulduar.h:42
void SetReactState(ReactStates st)
Definition: Creature.h:502
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444

+ Here is the call graph for this function:

Member Function Documentation

void boss_vx_001::boss_vx_001AI::DamageTaken ( Unit who,
uint32 damage 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

932  {
933  if (damage >= me->GetHealth())
934  {
935  damage = me->GetHealth() - 1; // Let creature fall to 1 hp, but do not let it die or damage itself with SetHealth().
936  me->AttackStop();
939 
941  {
942  me->CastStop();
943  me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // | UNIT_FLAG_NOT_SELECTABLE);
944  DoCast(me, SPELL_HALF_HEAL); // has no effect, wat
947  mimiron->AI()->DoAction(DO_ACTIVATE_AERIAL);
948  }
949  else if (events.IsInPhase(PHASE_VOL7RON))
950  {
953 
954  if (IsEncounterFinished(who))
955  return;
956 
957  me->CastStop();
959  }
960  events.Reset();
961  }
962  }
bool AttackStop()
Definition: Unit.cpp:7337
Definition: boss_mimiron.cpp:168
Definition: Unit.h:214
Definition: Unit.h:674
void RemoveAllAurasExceptType(AuraType type)
Definition: Unit.cpp:3997
void Reset()
Definition: EventMap.cpp:20
Definition: Creature.h:467
void CastStop(uint32 except_spellid=0)
Definition: Unit.cpp:862
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
Definition: SpellAuraDefines.h:193
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: SpellAuraDefines.h:296
Definition: boss_mimiron.cpp:171
Definition: boss_mimiron.cpp:309
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: boss_mimiron.cpp:174
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: UpdateFields.h:109
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
Definition: Unit.cpp:12772
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_mimiron.cpp:286
Definition: ulduar.h:42
static bool IsEncounterFinished(Unit *who)
Definition: boss_mimiron.cpp:352
Definition: boss_mimiron.cpp:307
Definition: boss_mimiron.cpp:97
uint32 GetHealth() const
Definition: Unit.h:1426
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

void boss_vx_001::boss_vx_001AI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

965  {
966  switch (action)
967  {
968  case DO_HARDMODE_VX001:
969  _fireFighter = true;
973  // Missing break intended.
974  case DO_START_VX001:
977  me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); // Remove emotestate.
978  //me->SetUInt32Value(UNIT_FIELD_BYTES_1, 33554432); Blizzard handles hover animation like this it seems.
980 
985  break;
986  case DO_ASSEMBLED_COMBAT:
989 
994  if (_fireFighter)
996  break;
997  default:
998  break;
999  }
1000  }
Definition: Unit.h:207
Definition: boss_mimiron.cpp:208
Definition: UpdateFields.h:136
Definition: boss_mimiron.cpp:283
Definition: boss_mimiron.cpp:209
Definition: Unit.h:674
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
bool _fireFighter
Definition: boss_mimiron.cpp:1086
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:996
Definition: boss_mimiron.cpp:207
Definition: boss_mimiron.cpp:205
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_mimiron.cpp:284
Definition: boss_mimiron.cpp:206
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: boss_mimiron.cpp:309
Definition: boss_mimiron.cpp:93
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_mimiron.cpp:177
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
Definition: UpdateFields.h:109
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
Definition: Unit.cpp:12772
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_mimiron.cpp:307
Definition: boss_mimiron.cpp:169
Definition: boss_mimiron.cpp:204
Definition: SharedDefines.h:2412
Definition: Unit.h:698
Definition: boss_mimiron.cpp:294

+ Here is the call graph for this function:

void boss_vx_001::boss_vx_001AI::EnterEvadeMode ( EvadeReason  )
inlineoverridevirtual

Reimplemented from CreatureAI.

1003  {
1004  summons.DespawnAll();
1005  }
void DespawnAll()
Definition: ScriptedCreature.cpp:66
SummonList summons
Definition: ScriptedCreature.h:372

+ Here is the call graph for this function:

void boss_vx_001::boss_vx_001AI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

1008  {
1009  summons.Summon(summon);
1010  if (summon->GetEntry() == NPC_BURST_TARGET)
1012  }
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:92
Creature *const me
Definition: CreatureAI.h:71
Definition: ulduar.h:109
SummonList summons
Definition: ScriptedCreature.h:372
uint32 GetEntry() const
Definition: Object.h:107
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
Definition: boss_mimiron.cpp:116

+ Here is the call graph for this function:

void boss_vx_001::boss_vx_001AI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1015  {
1016  if (victim->GetTypeId() == TYPEID_PLAYER)
1018  mimiron->AI()->Talk(events.IsInPhase(PHASE_VX_001) ? SAY_VX001_SLAY : SAY_V07TRON_SLAY);
1019  }
Definition: Creature.h:467
Definition: boss_mimiron.cpp:43
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
Creature *const me
Definition: CreatureAI.h:71
TypeID GetTypeId() const
Definition: Object.h:113
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: boss_mimiron.cpp:37
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: ObjectGuid.h:33
EventMap events
Definition: ScriptedCreature.h:371
Definition: ulduar.h:42
Definition: boss_mimiron.cpp:307
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

void boss_vx_001::boss_vx_001AI::SpellHit ( Unit caster,
SpellInfo const  
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1022  {
1024  DoCast(caster, SPELL_RAPID_BURST);
1025  }
Definition: Unit.h:565
Definition: boss_mimiron.cpp:115
Creature *const me
Definition: CreatureAI.h:71
Definition: ulduar.h:109
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
uint32 GetEntry() const
Definition: Object.h:107

+ Here is the call graph for this function:

void boss_vx_001::boss_vx_001AI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

1028  {
1029  if (!UpdateVictim())
1030  return;
1031 
1032  events.Update(diff);
1033 
1034  // Handle rotation during SPELL_SPINNING_UP, SPELL_P3WX2_LASER_BARRAGE, SPELL_RAPID_BURST, and SPELL_HAND_PULSE_LEFT/RIGHT
1036  {
1037  if (Creature* channelTarget = ObjectAccessor::GetCreature(*me, me->GetChannelObjectGuid()))
1038  me->SetFacingToObject(channelTarget);
1039  return;
1040  }
1041 
1042  while (uint32 eventId = events.ExecuteEvent())
1043  {
1044  switch (eventId)
1045  {
1046  case EVENT_RAPID_BURST:
1047  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 120, true))
1050  break;
1051  case EVENT_ROCKET_STRIKE:
1055  break;
1056  case EVENT_RELOAD:
1057  for (int8 seat = ROCKET_SEAT_LEFT; seat <= ROCKET_SEAT_RIGHT; ++seat)
1058  if (Unit* rocket = me->GetVehicleKit()->GetPassenger(seat))
1059  rocket->SetDisplayId(rocket->GetNativeDisplayId());
1060  break;
1061  case EVENT_HAND_PULSE:
1062  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 120, true))
1065  break;
1066  case EVENT_FROST_BOMB:
1069  break;
1070  case EVENT_SPINNING_UP:
1072  events.DelayEvents(14000);
1074  break;
1078  break;
1079  default:
1080  break;
1081  }
1082  }
1083  }
Definition: boss_mimiron.cpp:208
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
int8_t int8
Definition: Define.h:148
Definition: boss_mimiron.cpp:209
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: boss_mimiron.cpp:91
Definition: Unit.h:565
Definition: boss_mimiron.cpp:326
Definition: boss_mimiron.cpp:94
Definition: boss_mimiron.cpp:207
Definition: Creature.h:467
Definition: boss_mimiron.cpp:95
Definition: boss_mimiron.cpp:123
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
static First const & RAND(First const &first, Second const &second, Rest const &...rest)
Definition: CreatureAIImpl.h:30
ObjectGuid GetChannelObjectGuid() const
Definition: Unit.h:1904
Definition: boss_mimiron.cpp:135
Definition: boss_mimiron.cpp:205
Definition: boss_mimiron.cpp:117
Creature *const me
Definition: CreatureAI.h:71
void SetFacingToObject(WorldObject const *object)
Definition: Unit.cpp:15787
Definition: UnitAI.h:35
Unit * GetPassenger(int8 seatId) const
Gets a passenger on specified seat.
Definition: Vehicle.cpp:287
Definition: boss_mimiron.cpp:206
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
Definition: boss_mimiron.cpp:309
uint32_t uint32
Definition: Define.h:150
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: boss_mimiron.cpp:325
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void Update(uint32 time)
Definition: EventMap.h:54
void RescheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:146
Definition: boss_mimiron.cpp:210
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_mimiron.cpp:92
Definition: boss_mimiron.cpp:124
Definition: boss_mimiron.cpp:307
Definition: boss_mimiron.cpp:204
Definition: Unit.h:1305
void DelayEvents(Milliseconds const &delay)
Definition: EventMap.h:219
Vehicle * GetVehicleKit() const
Definition: Unit.h:2165

+ Here is the call graph for this function:

Member Data Documentation

bool boss_vx_001::boss_vx_001AI::_fireFighter
private

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