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

Public Member Functions

 boss_xt002 (Creature *creature)
 
void Initialize ()
 
void ChangeNextExpose ()
 
void Reset () override
 
void EnterEvadeMode (EvadeReason) override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void DoAction (int32 action) override
 
void KilledUnit (Unit *who) override
 
void JustDied (Unit *) override
 
void ExposeHeart ()
 
void DisposeHeart (bool isHardMode=false)
 
void RescheduleEvents ()
 
void PassengerBoarded (Unit *who, int8 seatId, bool apply) override
 == Fields =======================================
 
void MovementInform (uint32 type, uint32 point) override
 
uint32 GetData (uint32 type) const override
 
void SetData (uint32 type, uint32 data) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void OnSpellCast (SpellInfo const *spell) override
 
void OnChannelFinished (SpellInfo const *spell) override
 
void OnSpellFailed (SpellInfo const *spell) override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 
void ProcessHealthCheck ()
 
void ScheduleEnrageTimer (uint32 spellId, Milliseconds timer, uint8 textId=0)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER) override
 
void JustDied (Unit *) override
 
void JustReachedHome () 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)
 
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 >
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
 
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 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 SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (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.
 
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 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, 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

bool _healthRecovered
 
bool _hardMode
 
bool _gravityBombCasualty
 
uint8 _exposeHeartPercent
 

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 BossAI
float callForHelpRange
 
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
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)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
SummonList summons
 
- 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

◆ boss_xt002()

boss_xt002::boss_xt002 ( Creature creature)
inline
148 : BossAI(creature, BOSS_XT002)
149 {
150 Initialize();
151 }
Definition ScriptedCreature.h:485
void Initialize()
Definition boss_xt002.cpp:153
@ BOSS_XT002
Definition ulduar.h:34

References Initialize().

Member Function Documentation

◆ ChangeNextExpose()

void boss_xt002::ChangeNextExpose ( )
inline
162 {
163 switch (_exposeHeartPercent)
164 {
165 case 75:
167 break;
168 case 50:
170 break;
171 default:
173 break;
174 }
175 }
uint8 _exposeHeartPercent
Definition boss_xt002.cpp:429

References _exposeHeartPercent.

Referenced by ExposeHeart().

◆ DisposeHeart()

void boss_xt002::DisposeHeart ( bool  isHardMode = false)
inline
245 {
247
248 if (isHardMode)
249 {
252 }
253 else
254 {
256 events.ScheduleEvent(EVENT_RESUME_ATTACK, 1s, 0, PHASE_HEART);
257 }
258
263 {
264 if (heart->IsAlive())
265 heart->AI()->DoAction(ACTION_DISPOSE_HEART);
266 else
267 heart->DespawnOrUnsummon();
268 }
269
270 }
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:282
@ REACT_AGGRESSIVE
Definition Unit.h:569
events
Definition boss_sartura.cpp:43
@ ACTION_DISPOSE_HEART
Definition boss_xt002.cpp:112
@ EMOTE_HEART_CLOSED
Definition boss_xt002.cpp:134
@ SAY_HEART_CLOSED
Definition boss_xt002.cpp:127
@ SPELL_COOLDOWN_CREATURE_SPECIAL_2
Definition boss_xt002.cpp:48
@ SPELL_STAND
Definition boss_xt002.cpp:45
@ PHASE_HEART
Definition boss_xt002.cpp:105
@ EVENT_RESUME_ATTACK
Definition boss_xt002.cpp:99
InstanceScript *const instance
Definition ScriptedCreature.h:492
Definition Creature.h:47
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:100
Creature * GetCreature(uint32 type)
Definition InstanceScript.cpp:120
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:394
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:750
Talk
Definition hyjal.cpp:82
Creature * me
Definition ScriptedCreature.h:281
void RescheduleEvents()
Definition boss_xt002.cpp:272
@ DATA_XT002_HEART
Definition ulduar.h:91

References ACTION_DISPOSE_HEART, DATA_XT002_HEART, UnitAI::DoCastSelf(), EMOTE_HEART_CLOSED, EVENT_RESUME_ATTACK, InstanceScript::GetCreature(), BossAI::instance, ScriptedAI::me, PHASE_HEART, REACT_AGGRESSIVE, Unit::RemoveUnitFlag(), RescheduleEvents(), SAY_HEART_CLOSED, Creature::SetReactState(), SPELL_COOLDOWN_CREATURE_SPECIAL_2, SPELL_STAND, and UNIT_FLAG_NOT_SELECTABLE.

Referenced by UpdateAI().

◆ DoAction()

void boss_xt002::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

215 {
216 if (action == ACTION_ENTER_HARD_MODE)
217 events.ScheduleEvent(EVENT_ENTER_HARD_MODE, 1ms);
218 }
@ ACTION_ENTER_HARD_MODE
Definition boss_xt002.cpp:110
@ EVENT_ENTER_HARD_MODE
Definition boss_xt002.cpp:98

References ACTION_ENTER_HARD_MODE, and EVENT_ENTER_HARD_MODE.

◆ EnterEvadeMode()

void boss_xt002::EnterEvadeMode ( EvadeReason  )
inlineoverridevirtual

Reimplemented from CreatureAI.

190 {
193 }
SummonList summons
Definition ScriptedCreature.h:539
void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER) override
Definition ScriptedCreature.h:526
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:72

References SummonList::DespawnAll(), BossAI::EnterEvadeMode(), and BossAI::summons.

◆ ExposeHeart()

void boss_xt002::ExposeHeart ( )
inline
234 {
235 events.SetPhase(PHASE_HEART);
237 me->AttackStop();
239 events.CancelEvent(EVENT_TYMPANIC_TANTRUM);
240 events.ScheduleEvent(EVENT_SUBMERGE, 6s, 0, PHASE_HEART);
242 }
@ REACT_PASSIVE
Definition Unit.h:567
@ SAY_HEART_OPENED
Definition boss_xt002.cpp:126
@ EVENT_TYMPANIC_TANTRUM
Definition boss_xt002.cpp:91
@ EVENT_SUBMERGE
Definition boss_xt002.cpp:95
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:7499
void ChangeNextExpose()
Definition boss_xt002.cpp:161

References Unit::AttackStop(), ChangeNextExpose(), EVENT_SUBMERGE, EVENT_TYMPANIC_TANTRUM, ScriptedAI::me, PHASE_HEART, REACT_PASSIVE, SAY_HEART_OPENED, and Creature::SetReactState().

Referenced by UpdateAI().

◆ GetData()

uint32 boss_xt002::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

316 {
317 switch (type)
318 {
319 case DATA_HARD_MODE:
320 return _hardMode ? 1 : 0;
322 return _healthRecovered ? 1 : 0;
324 return _gravityBombCasualty ? 1 : 0;
325 default:
326 return 0;
327 }
328 }
@ DATA_GRAVITY_BOMB_CASUALTY
Definition boss_xt002.cpp:120
@ DATA_HEALTH_RECOVERED
Definition boss_xt002.cpp:119
@ DATA_HARD_MODE
Definition boss_xt002.cpp:118
bool _gravityBombCasualty
Definition boss_xt002.cpp:428
bool _hardMode
Definition boss_xt002.cpp:427
bool _healthRecovered
Definition boss_xt002.cpp:426

References _gravityBombCasualty, _hardMode, _healthRecovered, DATA_GRAVITY_BOMB_CASUALTY, DATA_HARD_MODE, and DATA_HEALTH_RECOVERED.

◆ Initialize()

void boss_xt002::Initialize ( )
inline
154 {
155 _healthRecovered = false;
156 _gravityBombCasualty = false;
157 _hardMode = false;
159 }

References _exposeHeartPercent, _gravityBombCasualty, _hardMode, and _healthRecovered.

Referenced by boss_xt002(), and Reset().

◆ JustDied()

void boss_xt002::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

227 {
229 _JustDied();
231 }
@ SAY_DEATH
Definition boss_xt002.cpp:131
void _JustDied()
Definition ScriptedCreature.cpp:664

References BossAI::_JustDied(), ScriptedAI::me, Unit::RemoveUnitFlag(), SAY_DEATH, and UNIT_FLAG_NOT_SELECTABLE.

◆ JustEngagedWith()

void boss_xt002::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged - this happens after JustEnteredCombat.

Reimplemented from CreatureAI.

196 {
200 events.ScheduleEvent(EVENT_GRAVITY_BOMB, Is25ManRaid() ? 18s : 21s, GROUP_SEARING_GRAVITY, PHASE_1);
201 events.ScheduleEvent(EVENT_ENRAGE, 10min);
202 events.ScheduleEvent(EVENT_TYMPANIC_TANTRUM, 60s, 0, PHASE_1);
203 events.ScheduleEvent(EVENT_PHASE_CHECK, 1s, 0, PHASE_1);
205
206 // AC core difference: Vehicle::InstallAccessory despawns the heart if HandleSpellClick
207 // returns false (TC uses async VehicleJoinEvent and does not check return value).
208 // Ensure the heart exists as a fallback.
211 me->HandleSpellClick(heart, 0);
212 }
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition DBCEnums.h:110
@ TEMPSUMMON_MANUAL_DESPAWN
Definition Object.h:56
@ GROUP_SEARING_GRAVITY
Definition boss_xt002.cpp:143
@ ACHIEV_MUST_DECONSTRUCT_FASTER
Definition boss_xt002.cpp:141
@ SAY_AGGRO
Definition boss_xt002.cpp:125
@ PHASE_1
Definition boss_xt002.cpp:104
@ EVENT_PHASE_CHECK
Definition boss_xt002.cpp:92
@ EVENT_SEARING_LIGHT
Definition boss_xt002.cpp:93
@ EVENT_ENRAGE
Definition boss_xt002.cpp:97
@ EVENT_GRAVITY_BOMB
Definition boss_xt002.cpp:94
void JustEngagedWith(Unit *) override
Called for reaction when initially engaged - this happens after JustEnteredCombat.
Definition ScriptedCreature.h:525
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition InstanceScript.cpp:683
bool HandleSpellClick(Unit *clicker, int8 seatId=-1)
Definition Unit.cpp:15524
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:2448
bool Is25ManRaid() const
Definition ScriptedCreature.h:389
@ NPC_HEART_OF_DECONSTRUCTOR
Definition ulduar.h:166

References ACHIEV_MUST_DECONSTRUCT_FASTER, ACHIEVEMENT_TIMED_TYPE_EVENT, DATA_XT002_HEART, InstanceScript::DoStartTimedAchievement(), EVENT_ENRAGE, EVENT_GRAVITY_BOMB, EVENT_PHASE_CHECK, EVENT_SEARING_LIGHT, EVENT_TYMPANIC_TANTRUM, InstanceScript::GetCreature(), GROUP_SEARING_GRAVITY, Unit::HandleSpellClick(), BossAI::instance, ScriptedAI::Is25ManRaid(), BossAI::JustEngagedWith(), ScriptedAI::me, NPC_HEART_OF_DECONSTRUCTOR, PHASE_1, SAY_AGGRO, WorldObject::SummonCreature(), and TEMPSUMMON_MANUAL_DESPAWN.

◆ KilledUnit()

void boss_xt002::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

221 {
222 if (who->IsPlayer())
223 Talk(SAY_SLAY);
224 }
@ SAY_SLAY
Definition boss_xt002.cpp:129
bool IsPlayer() const
Definition Object.h:201

References Object::IsPlayer(), and SAY_SLAY.

◆ MovementInform()

void boss_xt002::MovementInform ( uint32  type,
uint32  point 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

297 {
298 if (type != WAYPOINT_MOTION_TYPE)
299 return;
300
301 switch (point)
302 {
303 case 3:
304 case 9:
306 break;
307 case 13:
309 break;
310 default:
311 break;
312 }
313 }
@ WAYPOINT_MOTION_TYPE
Definition MotionMaster.h:41
@ EMOTE_STATE_SPELL_CHANNEL_OMNI
Definition SharedDefines.h:2065
@ EMOTE_STATE_WORK
Definition SharedDefines.h:1957
void HandleEmoteCommand(uint32 emoteId)
Definition Unit.cpp:2187

References EMOTE_STATE_SPELL_CHANNEL_OMNI, EMOTE_STATE_WORK, Unit::HandleEmoteCommand(), ScriptedAI::me, and WAYPOINT_MOTION_TYPE.

◆ PassengerBoarded()

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

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

Reimplemented from CreatureAI.

283 {
284 if (!apply)
285 return;
286
287 if (who->GetEntry() == NPC_XS013_SCRAPBOT)
288 {
290 _healthRecovered = true;
291 }
292 else if (seatId == HEART_VEHICLE_SEAT_EXPOSED)
293 who->CastSpell(who, SPELL_EXPOSED_HEART); // Channeled
294 }
@ HEART_VEHICLE_SEAT_EXPOSED
Definition boss_xt002.cpp:142
@ EMOTE_SCRAPBOT
Definition boss_xt002.cpp:136
@ SPELL_EXPOSED_HEART
Definition boss_xt002.cpp:60
@ NPC_XS013_SCRAPBOT
Definition ulduar.h:165

References _healthRecovered, Unit::CastSpell(), EMOTE_SCRAPBOT, Object::GetEntry(), HEART_VEHICLE_SEAT_EXPOSED, NPC_XS013_SCRAPBOT, and SPELL_EXPOSED_HEART.

◆ RescheduleEvents()

void boss_xt002::RescheduleEvents ( )
inline

◆ Reset()

void boss_xt002::Reset ( )
inlineoverridevirtual

◆ SetData()

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

Reimplemented from UnitAI.

331 {
332 switch (type)
333 {
335 if (!_hardMode)
336 {
337 uint32 transferHealth = data;
338 if (transferHealth >= me->GetHealth())
339 transferHealth = me->GetHealth() - 1;
340
341 me->ModifyHealth(-static_cast<int32>(transferHealth));
342 me->LowerPlayerDamageReq(transferHealth);
343 }
344 break;
346 _gravityBombCasualty = (data > 0) ? true : false;
347 break;
348 default:
349 break;
350 }
351 }
std::int32_t int32
Definition Define.h:103
std::uint32_t uint32
Definition Define.h:107
@ DATA_TRANSFERED_HEALTH
Definition boss_xt002.cpp:117
void LowerPlayerDamageReq(uint32 unDamage, bool damagedByPlayer=true, uint8 attackerLevel=0)
Definition Creature.cpp:3872
int32 ModifyHealth(int32 val)
Definition Unit.cpp:10974
uint32 GetHealth() const
Definition Unit.h:1109

References _gravityBombCasualty, _hardMode, DATA_GRAVITY_BOMB_CASUALTY, DATA_TRANSFERED_HEALTH, Unit::GetHealth(), Creature::LowerPlayerDamageReq(), ScriptedAI::me, and Unit::ModifyHealth().

◆ UpdateAI()

void boss_xt002::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

354 {
355 if (!UpdateVictim())
356 return;
357
358 events.Update(diff);
359
361 return;
362
363 while (uint32 eventId = events.ExecuteEvent())
364 {
365 switch (eventId)
366 {
369 events.Repeat(Is25ManRaid() ? 16s : 20s);
370 break;
373 events.Repeat(Is25ManRaid() ? 16s : 20s);
374 break;
378 events.DelayEvents(10s, GROUP_SEARING_GRAVITY);
380 events.Repeat(1min);
381 break;
384 ExposeHeart();
385 events.Repeat(1s);
386 break;
387 case EVENT_SUBMERGE:
392 heart->AI()->DoAction(ACTION_START_PHASE_HEART);
393 events.ScheduleEvent(EVENT_DISPOSE_HEART, 30s, PHASE_HEART);
394 break;
396 DisposeHeart();
397 break;
398 case EVENT_ENRAGE:
401 break;
403 me->SetFullHealth();
406 _hardMode = true;
408 break;
412 break;
413 default:
414 break;
415 }
416
418 return;
419 }
420
421 if (events.IsInPhase(PHASE_1))
423 }
@ LOOT_MODE_HARD_MODE_1
Definition SharedDefines.h:44
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ ACTION_START_PHASE_HEART
Definition boss_xt002.cpp:111
@ SAY_TYMPANIC_TANTRUM
Definition boss_xt002.cpp:128
@ EMOTE_TYMPANIC_TANTRUM
Definition boss_xt002.cpp:135
@ EMOTE_HEART_OPENED
Definition boss_xt002.cpp:133
@ SAY_BERSERK
Definition boss_xt002.cpp:130
@ SPELL_SEARING_LIGHT
Definition boss_xt002.cpp:40
@ SPELL_ENRAGE
Definition boss_xt002.cpp:47
@ SPELL_HEARTBREAK
Definition boss_xt002.cpp:44
@ SPELL_GRAVITY_BOMB
Definition boss_xt002.cpp:43
@ SPELL_TYMPANIC_TANTRUM
Definition boss_xt002.cpp:39
@ SPELL_SUBMERGE
Definition boss_xt002.cpp:46
@ EVENT_DISPOSE_HEART
Definition boss_xt002.cpp:96
bool UpdateVictim()
Definition CreatureAI.cpp:350
void AddLootMode(uint16 lootMode)
Definition Creature.h:248
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:41
void SetFullHealth()
Definition Unit.h:1127
bool HealthBelowPct(int32 pct) const
Definition Unit.h:1117
bool HasUnitState(const uint32 f) const
Definition Unit.h:737
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:749
void DisposeHeart(bool isHardMode=false)
Definition boss_xt002.cpp:244
void ExposeHeart()
Definition boss_xt002.cpp:233

References _exposeHeartPercent, _hardMode, ACTION_START_PHASE_HEART, Creature::AddLootMode(), DATA_XT002_HEART, DisposeHeart(), UnitAI::DoCastSelf(), UnitAI::DoMeleeAttackIfReady(), EMOTE_HEART_OPENED, EMOTE_TYMPANIC_TANTRUM, EVENT_DISPOSE_HEART, EVENT_ENRAGE, EVENT_ENTER_HARD_MODE, EVENT_GRAVITY_BOMB, EVENT_PHASE_CHECK, EVENT_RESUME_ATTACK, EVENT_SEARING_LIGHT, EVENT_SUBMERGE, EVENT_TYMPANIC_TANTRUM, ExposeHeart(), InstanceScript::GetCreature(), GROUP_SEARING_GRAVITY, Unit::HasUnitState(), Unit::HealthBelowPct(), BossAI::instance, ScriptedAI::Is25ManRaid(), LOOT_MODE_HARD_MODE_1, ScriptedAI::me, PHASE_1, PHASE_HEART, REACT_AGGRESSIVE, RescheduleEvents(), SAY_BERSERK, SAY_TYMPANIC_TANTRUM, Unit::SetFullHealth(), Creature::SetReactState(), Unit::SetUnitFlag(), SPELL_ENRAGE, SPELL_GRAVITY_BOMB, SPELL_HEARTBREAK, SPELL_SEARING_LIGHT, SPELL_SUBMERGE, SPELL_TYMPANIC_TANTRUM, UNIT_FLAG_NOT_SELECTABLE, UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _exposeHeartPercent

uint8 boss_xt002::_exposeHeartPercent
private

◆ _gravityBombCasualty

bool boss_xt002::_gravityBombCasualty
private

Referenced by GetData(), Initialize(), and SetData().

◆ _hardMode

bool boss_xt002::_hardMode
private

◆ _healthRecovered

bool boss_xt002::_healthRecovered
private

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