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

Public Member Functions

 boss_devourer_of_soulsAI (Creature *creature)
 
void Reset () override
 
uint32 GetData (uint32 id) const override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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 *) override
 
void KilledUnit (Unit *victim) override
 
void JustSummoned (Creature *summon) override
 
void EnterEvadeMode (EvadeReason why) 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.
 
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 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=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, 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=0s)
 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
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
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 ()
 
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)
 
- 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, 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 JustEnteredCombat (Unit *)
 Called when the unit enters combat.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
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

InstanceScriptpInstance
 
EventMap events
 
SummonList summons
 
bool bAchiev
 
- 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 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 CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_devourer_of_soulsAI()

boss_devourer_of_souls::boss_devourer_of_soulsAI::boss_devourer_of_soulsAI ( Creature creature)
inline
90 : ScriptedAI(creature), summons(me)
91 {
92 pInstance = creature->GetInstanceScript();
93 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1203
Definition ScriptedCreature.h:190
Creature * me
Definition ScriptedCreature.h:280
SummonList summons
Definition boss_devourer_of_souls.cpp:97
InstanceScript * pInstance
Definition boss_devourer_of_souls.cpp:95

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ CanAIAttack()

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

Reimplemented from UnitAI.

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

References Position::GetPositionZ().

◆ EnterEvadeMode()

void boss_devourer_of_souls::boss_devourer_of_soulsAI::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

298 {
300 me->DisableRotate(false);
302 }
@ UNIT_STATE_ROOT
Definition UnitDefines.h:180
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:208
void DisableRotate(bool apply)
Definition Unit.cpp:18327
void SetControlled(bool apply, UnitState state, Unit *source=nullptr, bool isFear=false)
Definition Unit.cpp:18086

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

◆ GetData()

uint32 boss_devourer_of_souls::boss_devourer_of_soulsAI::GetData ( uint32  id) const
inlineoverridevirtual

Reimplemented from UnitAI.

113 {
114 if (id == 1)
115 return bAchiev;
116
117 return 0;
118 }
bool bAchiev
Definition boss_devourer_of_souls.cpp:98

References bAchiev.

◆ JustDied()

void boss_devourer_of_souls::boss_devourer_of_soulsAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

252 {
255 if (pInstance)
257 }
@ DONE
Definition InstanceScript.h:61
@ SAY_FACE_DEATH
Definition boss_devourer_of_souls.cpp:33
void DespawnAll(uint32 delay=0)
Definition ScriptedCreature.cpp:71
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
@ DATA_DEVOURER
Definition forge_of_souls.h:31
Talk
Definition hyjal.cpp:82

References DATA_DEVOURER, SummonList::DespawnAll(), DONE, pInstance, SAY_FACE_DEATH, ZoneScript::SetData(), and summons.

◆ JustEngagedWith()

void boss_devourer_of_souls::boss_devourer_of_soulsAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from CreatureAI.

121 {
124 events.Reset();
125 events.RescheduleEvent(EVENT_SPELL_PHANTOM_BLAST, 5s);
126 events.RescheduleEvent(EVENT_SPELL_MIRRORED_SOUL, 9s);
127 events.RescheduleEvent(EVENT_SPELL_WELL_OF_SOULS, 6s, 8s);
128 events.RescheduleEvent(EVENT_SPELL_UNLEASHED_SOULS, 18s, 20s);
129 events.RescheduleEvent(EVENT_SPELL_WAILING_SOULS, 65s);
130
131 if (pInstance)
133
134 // Suport for Quest Tempering the Blade
135 Map::PlayerList const& pList = me->GetMap()->GetPlayers();
136 for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
137 {
138 Player* player = itr->GetSource();
141 {
143 me->SummonCreature(NPC_CRUCIBLE_OF_SOULS, 5672.29f, 2520.69f, 713.44f, 0.96f);
144 }
145 }
146 }
@ IN_PROGRESS
Definition InstanceScript.h:59
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:103
@ TEAM_ALLIANCE
Definition SharedDefines.h:760
@ TEAM_HORDE
Definition SharedDefines.h:761
@ 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
@ QUEST_TEMPERING_THE_BLADE_H
Definition boss_devourer_of_souls.cpp:80
@ QUEST_TEMPERING_THE_BLADE_A
Definition boss_devourer_of_souls.cpp:79
@ NPC_CRUCIBLE_OF_SOULS
Definition boss_devourer_of_souls.cpp:78
@ SAY_FACE_AGGRO
Definition boss_devourer_of_souls.cpp:29
events
Definition boss_sartura.cpp:43
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition CreatureAI.cpp:106
Definition LinkedList.h:139
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
PlayerList const & GetPlayers() const
Definition Map.h:333
Definition Player.h:1081
TeamId GetTeamId(bool original=false) const
Definition Player.h:2116
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition PlayerQuest.cpp:1430
Map * GetMap() const
Definition Object.h:536
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:2368
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2459

References MapRefMgr::begin(), DATA_DEVOURER, CreatureAI::DoZoneInCombat(), MapRefMgr::end(), 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(), Map::GetPlayers(), Player::GetQuestStatus(), Player::GetTeamId(), IN_PROGRESS, ScriptedAI::me, NPC_CRUCIBLE_OF_SOULS, pInstance, QUEST_STATUS_INCOMPLETE, QUEST_TEMPERING_THE_BLADE_A, QUEST_TEMPERING_THE_BLADE_H, SAY_FACE_AGGRO, ZoneScript::SetData(), WorldObject::SummonCreature(), TEAM_ALLIANCE, and TEAM_HORDE.

◆ JustSummoned()

void boss_devourer_of_souls::boss_devourer_of_soulsAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from CreatureAI.

285 {
286 if (summon->GetEntry() != NPC_CRUCIBLE_OF_SOULS)
287 summons.Summon(summon);
288
289 if (summon->GetEntry() == 36595)
290 if (Player* plr = summon->SelectNearestPlayer(100.0f))
291 {
292 summon->AddThreat(plr, 100000.0f);
293 summon->AI()->AttackStart(plr);
294 }
295 }
CreatureAI * AI() const
Definition Creature.h:141
uint32 GetEntry() const
Definition Object.h:115
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:27
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition Unit.cpp:14705
Player * SelectNearestPlayer(float distance=0) const
Definition Object.cpp:2486

References Unit::AddThreat(), Creature::AI(), UnitAI::AttackStart(), Object::GetEntry(), NPC_CRUCIBLE_OF_SOULS, WorldObject::SelectNearestPlayer(), SummonList::Summon(), and summons.

◆ KilledUnit()

void boss_devourer_of_souls::boss_devourer_of_soulsAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from CreatureAI.

260 {
261 if (!victim->IsPlayer())
262 return;
263
264 int32 textId = 0;
265 switch (me->GetDisplayId())
266 {
267 case DISPLAY_ANGER:
268 textId = SAY_FACE_ANGER_SLAY;
269 break;
270 case DISPLAY_SORROW:
271 textId = SAY_FACE_SORROW_SLAY;
272 break;
273 case DISPLAY_DESIRE:
274 textId = SAY_FACE_DESIRE_SLAY;
275 break;
276 default:
277 break;
278 }
279
280 if (textId)
281 Talk(textId);
282 }
std::int32_t int32
Definition Define.h:103
@ DISPLAY_ANGER
Definition boss_devourer_of_souls.cpp:71
@ DISPLAY_SORROW
Definition boss_devourer_of_souls.cpp:72
@ DISPLAY_DESIRE
Definition boss_devourer_of_souls.cpp:73
@ 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
bool IsPlayer() const
Definition Object.h:200
uint32 GetDisplayId() const
Definition Unit.h:1887

References DISPLAY_ANGER, DISPLAY_DESIRE, DISPLAY_SORROW, Unit::GetDisplayId(), Object::IsPlayer(), ScriptedAI::me, SAY_FACE_ANGER_SLAY, SAY_FACE_DESIRE_SLAY, and SAY_FACE_SORROW_SLAY.

◆ Reset()

void boss_devourer_of_souls::boss_devourer_of_soulsAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

101 {
102 bAchiev = true;
104 me->DisableRotate(false);
106 events.Reset();
108 if (pInstance)
110 }
@ NOT_STARTED
Definition InstanceScript.h:58
@ REACT_AGGRESSIVE
Definition Unit.h:550
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:95

References bAchiev, DATA_DEVOURER, SummonList::DespawnAll(), Unit::DisableRotate(), ScriptedAI::me, NOT_STARTED, pInstance, REACT_AGGRESSIVE, Unit::SetControlled(), ZoneScript::SetData(), Creature::SetReactState(), summons, and UNIT_STATE_ROOT.

◆ SpellHitTarget()

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

Reimplemented from CreatureAI.

149 {
150 if (spell->Id == SPELL_PHANTOM_BLAST_H)
151 bAchiev = false;
152 else if (spell->Id == SPELL_WAILING_SOULS_TARGETING)
153 {
154 me->SetOrientation(me->GetAngle(target));
156 me->DisableRotate(true);
159 me->GetMotionMaster()->Clear(false);
162
163 me->SetFacingToObject(target);
166 }
167 }
@ REACT_PASSIVE
Definition Unit.h:548
@ 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:232
void Clear(bool reset=true)
Definition MotionMaster.h:167
static ObjectGuid const Empty
Definition ObjectGuid.h:120
void SetGuidValue(uint16 index, ObjectGuid value)
Definition Object.cpp:723
MotionMaster * GetMotionMaster()
Definition Unit.h:1673
void SetFacingToObject(WorldObject *object)
Definition Unit.cpp:20591
void SendMovementFlagUpdate(bool self=false)
Definition Unit.cpp:16756
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1178
void StopMovingOnCurrentPos()
Definition Unit.cpp:16741
void SetOrientation(float orientation)
Definition Position.h:116
float GetAngle(const Position *pos) const
Definition Position.cpp:78

References bAchiev, Unit::CastSpell(), MotionMaster::Clear(), Unit::DisableRotate(), 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::boss_devourer_of_soulsAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

172 {
173 if (!UpdateVictim())
174 return;
175
176 events.Update(diff);
177
179 if (s->m_spellInfo->Id == SPELL_MIRRORED_SOUL)
180 {
181 switch (events.ExecuteEvent())
182 {
183 case 0:
184 break;
187 events.Repeat(5s);
188 break;
189 default:
190 events.Repeat(1s);
191 break;
192 }
193
195 {
199 }
200
201 return;
202 }
203
205 return;
206
207 switch (events.ExecuteEvent())
208 {
209 case 0:
210 break;
213 events.Repeat(5s);
214 break;
216 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 90.0f, true))
217 {
218 me->CastSpell(target, SPELL_MIRRORED_SOUL, false);
221 }
222 events.Repeat(20s, 30s);
223 break;
225 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
226 me->CastSpell(target, SPELL_WELL_OF_SOULS, false);
227 events.Repeat(25s, 30s);
228 events.DelayEventsToMax(4000, 0);
229 break;
234 events.Repeat(30s, 40s);
235 events.DelayEventsToMax(5000, 0);
237 break;
241 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
243 events.Repeat(80s);
244 events.DelayEventsToMax(20000, 0);
245 break;
246 }
247
249 }
@ SPELLVALUE_MAX_TARGETS
Definition SpellDefines.h:117
@ UNIT_STATE_CASTING
Definition UnitDefines.h:185
@ BASE_ATTACK
Definition Unit.h:209
@ CURRENT_CHANNELED_SPELL
Definition Unit.h:539
@ CURRENT_GENERIC_SPELL
Definition Unit.h:538
@ 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
@ 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
bool UpdateVictim()
Definition CreatureAI.cpp:280
Definition Spell.h:287
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:39
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:110
Definition Unit.h:636
void ClearUnitState(uint32 f)
Definition Unit.h:708
void setAttackTimer(WeaponAttackType type, int32 time)
Definition Unit.h:844
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:1235
void AddUnitState(uint32 f)
Definition Unit.h:706
Unit * GetVictim() const
Definition Unit.h:862
bool HasUnitState(const uint32 f) const
Definition Unit.h:707
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Definition Unit.h:1502

References Unit::AddUnitState(), BASE_ATTACK, Unit::CastCustomSpell(), Unit::CastSpell(), Unit::ClearUnitState(), CURRENT_CHANNELED_SPELL, CURRENT_GENERIC_SPELL, 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::GetVictim(), 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

◆ bAchiev

bool boss_devourer_of_souls::boss_devourer_of_soulsAI::bAchiev

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

◆ events

EventMap boss_devourer_of_souls::boss_devourer_of_soulsAI::events

◆ pInstance

InstanceScript* boss_devourer_of_souls::boss_devourer_of_soulsAI::pInstance

◆ summons

SummonList boss_devourer_of_souls::boss_devourer_of_soulsAI::summons

Referenced by JustDied(), JustSummoned(), and Reset().


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