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

Public Member Functions

 boss_xt002_AI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void EnterCombat (Unit *) override
 
void DoAction (int32 action) override
 
void KilledUnit (Unit *who) override
 
void JustDied (Unit *) override
 
void DamageTaken (Unit *, uint32 &) override
 
void UpdateAI (uint32 diff) override
 
void PassengerBoarded (Unit *who, int8, bool apply) override
 == Fields ======================================= More...
 
uint32 GetData (uint32 type) const override
 
void SetData (uint32 type, uint32 data) override
 
void ExposeHeart ()
 
void SetPhaseOne ()
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
virtual ~BossAI ()
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
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 SpellHit (Unit *, SpellInfo const *) override
 
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 EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
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 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 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 _healthRecovered
 
bool _hardMode
 
bool _gravityBombCasualty
 
uint8 _phase
 
uint8 _heartExposed
 
uint32 _transferHealth
 

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_xt002::boss_xt002_AI::boss_xt002_AI ( Creature creature)
inline
197  : BossAI(creature, BOSS_XT002)
198  {
199  Initialize();
200  _transferHealth = 0;
201  }
void Initialize()
Definition: boss_xt002.cpp:203
Definition: ulduar.h:35
uint32 _transferHealth
Definition: boss_xt002.cpp:436
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444

+ Here is the call graph for this function:

Member Function Documentation

void boss_xt002::boss_xt002_AI::DamageTaken ( Unit ,
uint32  
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

263  {
264  if (!_hardMode && _phase == 1 && !HealthAbovePct(100 - 25 * (_heartExposed+1)))
265  ExposeHeart();
266  }
uint8 _phase
Definition: boss_xt002.cpp:434
bool HealthAbovePct(uint32 pct) const
Definition: ScriptedCreature.h:248
bool _hardMode
Definition: boss_xt002.cpp:431
uint8 _heartExposed
Definition: boss_xt002.cpp:435
void ExposeHeart()
Definition: boss_xt002.cpp:362

+ Here is the call graph for this function:

void boss_xt002::boss_xt002_AI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

241  {
242  switch (action)
243  {
246  break;
247  }
248  }
Definition: boss_xt002.cpp:142
Definition: boss_xt002.cpp:102
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
EventMap events
Definition: ScriptedCreature.h:371

+ Here is the call graph for this function:

void boss_xt002::boss_xt002_AI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

227  {
228  Talk(SAY_AGGRO);
229  _EnterCombat();
230 
234  //Tantrum is cast a bit slower the first time.
236 
238  }
Definition: boss_xt002.cpp:95
void _EnterCombat()
Definition: ScriptedCreature.cpp:480
Definition: boss_xt002.cpp:155
Definition: boss_xt002.cpp:107
Definition: DBCEnums.h:183
Definition: boss_xt002.cpp:108
Definition: boss_xt002.cpp:171
Definition: boss_xt002.cpp:96
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition: InstanceScript.cpp:518
Definition: boss_xt002.cpp:114
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_xt002.cpp:97
Definition: boss_xt002.cpp:101
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_xt002.cpp:110
Definition: boss_xt002.cpp:109
EventMap events
Definition: ScriptedCreature.h:371
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

void boss_xt002::boss_xt002_AI::ExposeHeart ( )
inline
363  {
366 
367  DoCast(me, SPELL_SUBMERGE); // WIll make creature untargetable
368  me->AttackStop();
370 
372  if (heart)
373  {
374  heart->CastSpell(heart, SPELL_HEART_OVERLOAD, false);
375  heart->CastSpell(me, SPELL_HEART_LIGHTNING_TETHER, false);
376  heart->CastSpell(heart, SPELL_HEART_HEAL_TO_FULL, true);
377  heart->CastSpell(heart, SPELL_EXPOSED_HEART, false); // Channeled
381  }
382 
386 
387  // Start "end of phase 2 timer"
389 
390  // Phase 2 has officially started
391  _phase = 2;
392  _heartExposed++;
393  }
bool AttackStop()
Definition: Unit.cpp:7337
Definition: boss_xt002.cpp:95
uint8 _phase
Definition: boss_xt002.cpp:434
Definition: boss_xt002.cpp:111
Definition: boss_xt002.cpp:100
Definition: Unit.h:1129
Definition: boss_xt002.cpp:73
void ChangeSeat(int8 seatId, bool next=true)
Definition: Unit.cpp:15289
arena_t NULL
Definition: jemalloc_internal.h:624
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:89
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Definition: boss_xt002.cpp:59
Definition: boss_xt002.cpp:96
Definition: boss_xt002.cpp:156
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_xt002.cpp:163
uint8 _heartExposed
Definition: boss_xt002.cpp:435
Unit * GetPassenger(int8 seatId) const
Gets a passenger on specified seat.
Definition: Vehicle.cpp:287
Definition: boss_xt002.cpp:177
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_xt002.cpp:56
Definition: boss_xt002.cpp:97
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: boss_xt002.cpp:57
Definition: UpdateFields.h:109
Definition: Unit.h:702
Definition: boss_xt002.cpp:63
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_xt002.cpp:176
Definition: Unit.h:1305
void SetReactState(ReactStates st)
Definition: Creature.h:502
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: Unit.h:698
Vehicle * GetVehicleKit() const
Definition: Unit.h:2165

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32 boss_xt002::boss_xt002_AI::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

335  {
336  switch (type)
337  {
338  case DATA_HARD_MODE:
339  return _hardMode ? 1 : 0;
341  return _healthRecovered ? 1 : 0;
343  return _gravityBombCasualty ? 1 : 0;
344  }
345 
346  return 0;
347  }
bool _gravityBombCasualty
Definition: boss_xt002.cpp:432
bool _healthRecovered
Definition: boss_xt002.cpp:430
bool _hardMode
Definition: boss_xt002.cpp:431
Definition: boss_xt002.cpp:148
Definition: boss_xt002.cpp:150
Definition: boss_xt002.cpp:149
void boss_xt002::boss_xt002_AI::Initialize ( void  )
inline
204  {
205  _healthRecovered = false;
206  _gravityBombCasualty = false;
207  _hardMode = false;
208 
209  _phase = 1;
210  _heartExposed = 0;
211  }
uint8 _phase
Definition: boss_xt002.cpp:434
bool _gravityBombCasualty
Definition: boss_xt002.cpp:432
bool _healthRecovered
Definition: boss_xt002.cpp:430
bool _hardMode
Definition: boss_xt002.cpp:431
uint8 _heartExposed
Definition: boss_xt002.cpp:435

+ Here is the caller graph for this function:

void boss_xt002::boss_xt002_AI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

257  {
258  Talk(SAY_DEATH);
259  _JustDied();
260  }
void _JustDied()
Definition: ScriptedCreature.cpp:471
Definition: boss_xt002.cpp:161
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42

+ Here is the call graph for this function:

void boss_xt002::boss_xt002_AI::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from ScriptedAI.

251  {
252  if (who->GetTypeId() == TYPEID_PLAYER)
253  Talk(SAY_SLAY);
254  }
TypeID GetTypeId() const
Definition: Object.h:113
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: ObjectGuid.h:33
Definition: boss_xt002.cpp:159

+ Here is the call graph for this function:

void boss_xt002::boss_xt002_AI::PassengerBoarded ( Unit ,
int8  ,
bool   
)
inlineoverridevirtual

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

Reimplemented from CreatureAI.

322  {
323  if (apply && who->GetEntry() == NPC_XS013_SCRAPBOT)
324  {
325  // Need this so we can properly determine when to expose heart again in damagetaken hook
326  if (me->GetHealthPct() > (25 * (4 - _heartExposed)))
327  ++_heartExposed;
328 
330  _healthRecovered = true;
331  }
332  }
Definition: boss_xt002.cpp:135
Definition: boss_xt002.cpp:166
bool _healthRecovered
Definition: boss_xt002.cpp:430
void apply(T *val)
Definition: ByteConverter.h:41
Creature *const me
Definition: CreatureAI.h:71
uint8 _heartExposed
Definition: boss_xt002.cpp:435
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
float GetHealthPct() const
Definition: Unit.h:1434

+ Here is the call graph for this function:

void boss_xt002::boss_xt002_AI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

214  {
215  _Reset();
216 
220 
221  Initialize();
222 
224  }
Definition: Unit.h:1131
void Initialize()
Definition: boss_xt002.cpp:203
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition: InstanceScript.cpp:529
Definition: DBCEnums.h:183
Definition: boss_xt002.cpp:171
Creature *const me
Definition: CreatureAI.h:71
void _Reset()
Definition: ScriptedCreature.cpp:457
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: UpdateFields.h:109
void SetReactState(ReactStates st)
Definition: Creature.h:502
Definition: boss_xt002.cpp:62
Definition: Unit.h:698
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

void boss_xt002::boss_xt002_AI::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from UnitAI.

350  {
351  switch (type)
352  {
354  _transferHealth = data;
355  break;
357  _gravityBombCasualty = (data > 0) ? true : false;
358  break;
359  }
360  }
bool _gravityBombCasualty
Definition: boss_xt002.cpp:432
Definition: boss_xt002.cpp:147
Definition: boss_xt002.cpp:150
uint32 _transferHealth
Definition: boss_xt002.cpp:436
void boss_xt002::boss_xt002_AI::SetPhaseOne ( )
inline
396  {
399 
403 
404  _phase = 1;
405 
409 
411  if (!heart)
412  return;
413 
414  heart->ChangeSeat(HEART_VEHICLE_SEAT_NORMAL, false);
418 
419  if (!_hardMode)
420  {
421  if (!_transferHealth)
422  _transferHealth = (heart->GetMaxHealth() - heart->GetHealth());
423 
425  }
426  }
Definition: boss_xt002.cpp:95
uint8 _phase
Definition: boss_xt002.cpp:434
Definition: boss_xt002.cpp:157
uint32 GetMaxHealth() const
Definition: Unit.h:1427
Definition: Unit.h:1131
Definition: boss_xt002.cpp:107
Definition: boss_xt002.cpp:73
Definition: boss_xt002.cpp:108
void ChangeSeat(int8 seatId, bool next=true)
Definition: Unit.cpp:15289
arena_t NULL
Definition: jemalloc_internal.h:624
int32 ModifyHealth(int32 val)
Definition: Unit.cpp:10216
bool _hardMode
Definition: boss_xt002.cpp:431
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Definition: boss_xt002.cpp:96
Creature *const me
Definition: CreatureAI.h:71
Unit * GetPassenger(int8 seatId) const
Gets a passenger on specified seat.
Definition: Vehicle.cpp:287
Definition: boss_xt002.cpp:177
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
int32_t int32
Definition: Define.h:146
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_xt002.cpp:97
void RescheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:146
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: boss_xt002.cpp:164
Definition: boss_xt002.cpp:110
Definition: boss_xt002.cpp:109
Definition: UpdateFields.h:109
Definition: Unit.h:702
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_xt002.cpp:176
uint32 _transferHealth
Definition: boss_xt002.cpp:436
uint32 GetHealth() const
Definition: Unit.h:1426
Definition: Unit.h:1305
void SetReactState(ReactStates st)
Definition: Creature.h:502
Definition: boss_xt002.cpp:62
Definition: Unit.h:698
Vehicle * GetVehicleKit() const
Definition: Unit.h:2165

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_xt002::boss_xt002_AI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

269  {
270  if (!UpdateVictim())
271  return;
272 
273  events.Update(diff);
274 
276  return;
277 
278  while (uint32 eventId = events.ExecuteEvent())
279  {
280  switch (eventId)
281  {
282  case EVENT_SEARING_LIGHT:
283  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
284  DoCast(target, SPELL_SEARING_LIGHT);
285 
287  break;
288  case EVENT_GRAVITY_BOMB:
289  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
290  DoCast(target, SPELL_GRAVITY_BOMB);
291 
293  break;
299  break;
300  case EVENT_DISPOSE_HEART:
301  SetPhaseOne();
302  break;
303  case EVENT_ENRAGE:
304  Talk(SAY_BERSERK);
306  break;
308  me->SetFullHealth();
309  DoCast(me, SPELL_HEARTBREAK, true);
311  _hardMode = true;
312  SetPhaseOne();
313  break;
314  }
315  }
316 
317  if (_phase == 1)
319  }
Definition: boss_xt002.cpp:61
Definition: boss_xt002.cpp:95
uint8 _phase
Definition: boss_xt002.cpp:434
Definition: boss_xt002.cpp:102
bool UpdateVictim()
Definition: CreatureAI.cpp:233
void AddLootMode(uint16 lootMode)
Definition: Creature.h:595
Definition: Unit.h:565
Definition: boss_xt002.cpp:100
Definition: boss_xt002.cpp:107
Definition: boss_xt002.cpp:108
Definition: boss_xt002.cpp:160
Definition: boss_xt002.cpp:38
bool _hardMode
Definition: boss_xt002.cpp:431
Definition: boss_xt002.cpp:39
Definition: SharedDefines.h:70
Definition: boss_xt002.cpp:96
Creature *const me
Definition: CreatureAI.h:71
Definition: UnitAI.h:35
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
uint32_t uint32
Definition: Define.h:150
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: boss_xt002.cpp:158
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_xt002.cpp:97
Definition: boss_xt002.cpp:101
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
void SetPhaseOne()
Definition: boss_xt002.cpp:395
void Update(uint32 time)
Definition: EventMap.h:54
Definition: boss_xt002.cpp:110
Definition: boss_xt002.cpp:109
Definition: boss_xt002.cpp:46
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
Definition: boss_xt002.cpp:44
EventMap events
Definition: ScriptedCreature.h:371
void SetFullHealth()
Definition: Unit.h:1440
Definition: Unit.h:1305
Definition: boss_xt002.cpp:165

+ Here is the call graph for this function:

Member Data Documentation

bool boss_xt002::boss_xt002_AI::_gravityBombCasualty
private
bool boss_xt002::boss_xt002_AI::_hardMode
private
bool boss_xt002::boss_xt002_AI::_healthRecovered
private
uint8 boss_xt002::boss_xt002_AI::_heartExposed
private
uint8 boss_xt002::boss_xt002_AI::_phase
private
uint32 boss_xt002::boss_xt002_AI::_transferHealth
private

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