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

Public Member Functions

 boss_devourer_of_souls (Creature *creature)
 
void Reset () override
 
uint32 GetData (uint32 id) const override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
bool CanAIAttack (Unit const *target) const override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *killer) override
 
void KilledUnit (Unit *victim) override
 
void JustSummoned (Creature *summon) override
 
void EnterEvadeMode (EvadeReason why) override
 
- 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 (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
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 void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual void InitializeAI ()
 
virtual void DoAction (int32)
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast.
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

bool AchievementCompleted = true
 
- Public Attributes inherited from BossAI
float callForHelpRange
 
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 

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 ()
 
- 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_devourer_of_souls()

boss_devourer_of_souls::boss_devourer_of_souls ( Creature creature)
inline
86: BossAI(creature, DATA_DEVOURER) { }
Definition ScriptedCreature.h:485
@ DATA_DEVOURER
Definition forge_of_souls.h:31

Member Function Documentation

◆ CanAIAttack()

bool boss_devourer_of_souls::CanAIAttack ( Unit const *  target) const
inlineoverridevirtual

Reimplemented from UnitAI.

150{ return target->GetPositionZ() > 706.5f; }

References Position::GetPositionZ().

◆ EnterEvadeMode()

void boss_devourer_of_souls::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

273 {
275 me->DisableRotate(false);
277 }
@ UNIT_STATE_ROOT
Definition UnitDefines.h:183
void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER) override
Definition ScriptedCreature.h:526
void DisableRotate(bool apply)
Definition Unit.cpp:14498
void SetControlled(bool apply, UnitState state, Unit *source=nullptr, bool isFear=false)
Definition Unit.cpp:14268
Creature * me
Definition ScriptedCreature.h:281

References Unit::DisableRotate(), BossAI::EnterEvadeMode(), ScriptedAI::me, Unit::SetControlled(), and UNIT_STATE_ROOT.

◆ GetData()

uint32 boss_devourer_of_souls::GetData ( uint32  id) const
inlineoverridevirtual

Reimplemented from UnitAI.

100 {
101 if (id == 1)
103
104 return 0;
105 }
bool AchievementCompleted
Definition boss_devourer_of_souls.cpp:88

References AchievementCompleted.

◆ JustDied()

void boss_devourer_of_souls::JustDied ( Unit killer)
inlineoverridevirtual

Reimplemented from CreatureAI.

229 {
230 BossAI::JustDied(killer);
232 }
@ SAY_FACE_DEATH
Definition boss_devourer_of_souls.cpp:33
void JustDied(Unit *) override
Definition ScriptedCreature.h:527
Talk
Definition hyjal.cpp:82

References BossAI::JustDied(), and SAY_FACE_DEATH.

◆ JustEngagedWith()

void boss_devourer_of_souls::JustEngagedWith ( Unit )
inlineoverridevirtual

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

Reimplemented from CreatureAI.

108 {
111 events.RescheduleEvent(EVENT_SPELL_PHANTOM_BLAST, 5s);
112 events.RescheduleEvent(EVENT_SPELL_MIRRORED_SOUL, 9s);
113 events.RescheduleEvent(EVENT_SPELL_WELL_OF_SOULS, 6s, 8s);
114 events.RescheduleEvent(EVENT_SPELL_UNLEASHED_SOULS, 18s, 20s);
115 events.RescheduleEvent(EVENT_SPELL_WAILING_SOULS, 65s);
116
117 // Support for Quest Tempering the Blade
118 me->GetMap()->DoForAllPlayers([this](Player* player)
119 {
121 return;
122
124 if (player->GetQuestStatus(questId) == QUEST_STATUS_INCOMPLETE)
125 me->SummonCreature(NPC_CRUCIBLE_OF_SOULS, 5672.29f, 2520.69f, 713.44f, 0.96f);
126 });
127 }
std::uint32_t uint32
Definition Define.h:107
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:103
@ TEAM_ALLIANCE
Definition SharedDefines.h:748
@ QUEST_TEMPERING_THE_BLADE_H
Definition boss_devourer_of_souls.cpp:81
@ QUEST_TEMPERING_THE_BLADE_A
Definition boss_devourer_of_souls.cpp:80
@ NPC_CRUCIBLE_OF_SOULS
Definition boss_devourer_of_souls.cpp:78
@ SAY_FACE_AGGRO
Definition boss_devourer_of_souls.cpp:29
@ EVENT_SPELL_WAILING_SOULS
Definition boss_devourer_of_souls.cpp:66
@ EVENT_SPELL_MIRRORED_SOUL
Definition boss_devourer_of_souls.cpp:63
@ EVENT_SPELL_UNLEASHED_SOULS
Definition boss_devourer_of_souls.cpp:65
@ EVENT_SPELL_WELL_OF_SOULS
Definition boss_devourer_of_souls.cpp:64
@ EVENT_SPELL_PHANTOM_BLAST
Definition boss_devourer_of_souls.cpp:62
events
Definition boss_sartura.cpp:43
void JustEngagedWith(Unit *) override
Called for reaction when initially engaged - this happens after JustEnteredCombat.
Definition ScriptedCreature.h:525
void DoForAllPlayers(std::function< void(Player *)> exec)
Definition Map.cpp:2890
Definition Player.h:1084
TeamId GetTeamId(bool original=false) const
Definition Player.h:2127
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition PlayerQuest.cpp:1462
Map * GetMap() const
Definition Object.h:625
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition Object.cpp:2394
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2499

References Map::DoForAllPlayers(), EVENT_SPELL_MIRRORED_SOUL, EVENT_SPELL_PHANTOM_BLAST, EVENT_SPELL_UNLEASHED_SOULS, EVENT_SPELL_WAILING_SOULS, EVENT_SPELL_WELL_OF_SOULS, WorldObject::FindNearestCreature(), WorldObject::GetMap(), Player::GetQuestStatus(), Player::GetTeamId(), BossAI::JustEngagedWith(), ScriptedAI::me, NPC_CRUCIBLE_OF_SOULS, QUEST_STATUS_INCOMPLETE, QUEST_TEMPERING_THE_BLADE_A, QUEST_TEMPERING_THE_BLADE_H, SAY_FACE_AGGRO, WorldObject::SummonCreature(), and TEAM_ALLIANCE.

◆ JustSummoned()

void boss_devourer_of_souls::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from CreatureAI.

260 {
261 if (summon->GetEntry() != NPC_CRUCIBLE_OF_SOULS)
262 BossAI::JustSummoned(summon);
263
264 if (summon->GetEntry() == NPC_UNLEASHED_SOUL)
265 if (Player* player = summon->SelectNearestPlayer(100.0f))
266 {
267 summon->AddThreat(player, 100000.0f);
268 summon->AI()->AttackStart(player);
269 }
270 }
@ NPC_UNLEASHED_SOUL
Definition boss_devourer_of_souls.cpp:79
void JustSummoned(Creature *summon) override
Definition ScriptedCreature.cpp:725
CreatureAI * AI() const
Definition Creature.h:143
uint32 GetEntry() const
Definition Object.h:117
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:28
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition Unit.cpp:11413
Player * SelectNearestPlayer(float distance=0) const
Definition Object.cpp:2526

References Unit::AddThreat(), Creature::AI(), UnitAI::AttackStart(), Object::GetEntry(), BossAI::JustSummoned(), NPC_CRUCIBLE_OF_SOULS, NPC_UNLEASHED_SOUL, and WorldObject::SelectNearestPlayer().

◆ KilledUnit()

void boss_devourer_of_souls::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from CreatureAI.

235 {
236 if (!victim->IsPlayer())
237 return;
238
239 uint8 textId = 0;
240 switch (me->GetDisplayId())
241 {
242 case MODEL_ANGER:
243 textId = SAY_FACE_ANGER_SLAY;
244 break;
245 case MODEL_SORROW:
246 textId = SAY_FACE_SORROW_SLAY;
247 break;
248 case MODEL_DESIRE:
249 textId = SAY_FACE_DESIRE_SLAY;
250 break;
251 default:
252 break;
253 }
254
255 if (textId)
256 Talk(textId);
257 }
std::uint8_t uint8
Definition Define.h:109
@ SAY_FACE_ANGER_SLAY
Definition boss_devourer_of_souls.cpp:30
@ SAY_FACE_DESIRE_SLAY
Definition boss_devourer_of_souls.cpp:32
@ SAY_FACE_SORROW_SLAY
Definition boss_devourer_of_souls.cpp:31
@ MODEL_SORROW
Definition boss_devourer_of_souls.cpp:72
@ MODEL_ANGER
Definition boss_devourer_of_souls.cpp:71
@ MODEL_DESIRE
Definition boss_devourer_of_souls.cpp:73
bool IsPlayer() const
Definition Object.h:201
uint32 GetDisplayId() const
Definition Unit.h:1974

References Unit::GetDisplayId(), Object::IsPlayer(), ScriptedAI::me, MODEL_ANGER, MODEL_DESIRE, MODEL_SORROW, SAY_FACE_ANGER_SLAY, SAY_FACE_DESIRE_SLAY, and SAY_FACE_SORROW_SLAY.

◆ Reset()

void boss_devourer_of_souls::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

91 {
95 me->DisableRotate(false);
97 }
@ REACT_AGGRESSIVE
Definition Unit.h:568
void Reset() override
Definition ScriptedCreature.h:524
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:99

References AchievementCompleted, Unit::DisableRotate(), ScriptedAI::me, REACT_AGGRESSIVE, BossAI::Reset(), Unit::SetControlled(), Creature::SetReactState(), and UNIT_STATE_ROOT.

◆ SpellHitTarget()

void boss_devourer_of_souls::SpellHitTarget ( Unit target,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

130 {
131 if (spell->Id == SPELL_PHANTOM_BLAST_H)
132 AchievementCompleted = false;
133 else if (spell->Id == SPELL_WAILING_SOULS_TARGETING)
134 {
135 me->SetOrientation(me->GetAngle(target));
137 me->DisableRotate(true);
140 me->GetMotionMaster()->Clear(false);
143
144 me->SetFacingToObject(target);
147 }
148 }
@ REACT_PASSIVE
Definition Unit.h:566
@ UNIT_FIELD_TARGET
Definition UpdateFields.h:92
@ SPELL_PHANTOM_BLAST_H
Definition boss_devourer_of_souls.cpp:44
@ SPELL_WAILING_SOULS_TARGETING
Definition boss_devourer_of_souls.cpp:55
@ SPELL_WAILING_SOULS
Definition boss_devourer_of_souls.cpp:51
void MoveIdle()
Definition MotionMaster.cpp:234
void Clear(bool reset=true)
Definition MotionMaster.h:193
static ObjectGuid const Empty
Definition ObjectGuid.h:120
void SetGuidValue(uint16 index, ObjectGuid value)
Definition Object.cpp:712
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:394
void SetFacingToObject(WorldObject *object, Milliseconds timed=0ms)
Definition Unit.cpp:16421
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
void SendMovementFlagUpdate(bool self=false)
Definition Unit.cpp:13051
void StopMovingOnCurrentPos()
Definition Unit.cpp:13036
void SetOrientation(float orientation)
Definition Position.h:116
float GetAngle(const Position *pos) const
Definition Position.cpp:85

References AchievementCompleted, MotionMaster::Clear(), Unit::DisableRotate(), UnitAI::DoCastSelf(), ObjectGuid::Empty, Position::GetAngle(), Unit::GetMotionMaster(), SpellInfo::Id, ScriptedAI::me, MotionMaster::MoveIdle(), REACT_PASSIVE, Unit::SendMovementFlagUpdate(), Unit::SetControlled(), Unit::SetFacingToObject(), Object::SetGuidValue(), Position::SetOrientation(), Creature::SetReactState(), SPELL_PHANTOM_BLAST_H, SPELL_WAILING_SOULS, SPELL_WAILING_SOULS_TARGETING, Unit::StopMovingOnCurrentPos(), UNIT_FIELD_TARGET, and UNIT_STATE_ROOT.

◆ UpdateAI()

void boss_devourer_of_souls::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

153 {
154 if (!UpdateVictim())
155 return;
156
157 events.Update(diff);
158
160 if (s->m_spellInfo->Id == SPELL_MIRRORED_SOUL)
161 {
162 switch (events.ExecuteEvent())
163 {
166 events.Repeat(5s);
167 break;
168 default:
169 events.Repeat(1s);
170 break;
171 }
172
174 {
178 }
179
180 return;
181 }
182
184 return;
185
186 switch (events.ExecuteEvent())
187 {
190 events.Repeat(5s);
191 break;
193 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 90.0f, true))
194 {
198 }
199 events.Repeat(20s, 30s);
200 break;
202 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
204 events.Repeat(25s, 30s);
205 events.DelayEventsToMax(4s, 0);
206 break;
211 events.Repeat(30s, 40s);
212 events.DelayEventsToMax(5s, 0);
214 break;
218 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
220 events.Repeat(80s);
221 events.DelayEventsToMax(20s, 0);
222 break;
223 }
224
226 }
@ SPELLVALUE_MAX_TARGETS
Definition SpellDefines.h:117
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ BASE_ATTACK
Definition Unit.h:215
@ CURRENT_CHANNELED_SPELL
Definition Unit.h:557
@ CURRENT_GENERIC_SPELL
Definition Unit.h:556
@ SPELL_PHANTOM_BLAST
Definition boss_devourer_of_souls.cpp:43
@ SPELL_MIRRORED_SOUL
Definition boss_devourer_of_souls.cpp:45
@ SPELL_WELL_OF_SOULS
Definition boss_devourer_of_souls.cpp:46
@ SPELL_UNLEASHED_SOULS
Definition boss_devourer_of_souls.cpp:49
@ EMOTE_WAILING_SOUL
Definition boss_devourer_of_souls.cpp:37
@ EMOTE_MIRRORED_SOUL
Definition boss_devourer_of_souls.cpp:34
@ SAY_FACE_WAILING_SOUL
Definition boss_devourer_of_souls.cpp:38
@ EMOTE_UNLEASH_SOUL
Definition boss_devourer_of_souls.cpp:35
@ SAY_FACE_UNLEASH_SOUL
Definition boss_devourer_of_souls.cpp:36
bool UpdateVictim()
Definition CreatureAI.cpp:353
Definition Spell.h:298
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:40
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:277
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:111
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:178
Definition Unit.h:664
void ClearUnitState(uint32 f)
Definition Unit.h:737
void setAttackTimer(WeaponAttackType type, int32 time)
Definition Unit.h:885
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:1407
void AddUnitState(uint32 f)
Definition Unit.h:735
bool HasUnitState(const uint32 f) const
Definition Unit.h:736
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Definition Unit.h:1576

References Unit::AddUnitState(), BASE_ATTACK, Unit::CastCustomSpell(), Unit::ClearUnitState(), CURRENT_CHANNELED_SPELL, CURRENT_GENERIC_SPELL, UnitAI::DoCast(), UnitAI::DoCastSelf(), UnitAI::DoCastVictim(), UnitAI::DoMeleeAttackIfReady(), EMOTE_MIRRORED_SOUL, EMOTE_UNLEASH_SOUL, EMOTE_WAILING_SOUL, EVENT_SPELL_MIRRORED_SOUL, EVENT_SPELL_PHANTOM_BLAST, EVENT_SPELL_UNLEASHED_SOULS, EVENT_SPELL_WAILING_SOULS, EVENT_SPELL_WELL_OF_SOULS, Unit::GetCurrentSpell(), Unit::HasUnitState(), ScriptedAI::me, Random, SAY_FACE_UNLEASH_SOUL, SAY_FACE_WAILING_SOUL, UnitAI::SelectTarget(), Unit::setAttackTimer(), SPELL_MIRRORED_SOUL, SPELL_PHANTOM_BLAST, SPELL_UNLEASHED_SOULS, SPELL_WAILING_SOULS_TARGETING, SPELL_WELL_OF_SOULS, SPELLVALUE_MAX_TARGETS, UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ AchievementCompleted

bool boss_devourer_of_souls::AchievementCompleted = true

Referenced by GetData(), Reset(), and SpellHitTarget().


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