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

Public Member Functions

 boss_vezax (Creature *creature)
 
void Reset () override
 
void JustReachedHome () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void DoAction (int32 param) override
 
uint32 GetData (uint32 id) const override
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *who) override
 
void MoveInLineOfSight (Unit *) 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 (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 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 bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
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, 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
 

Public Attributes

uint8 vaporsCount
 
bool hardmodeAvailable
 
bool berserk
 
bool bAchievShadowdodger
 
- 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)
 
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_vezax()

boss_vezax::boss_vezax ( Creature creature)
inline
109: BossAI(creature, BOSS_VEZAX) { }
Definition ScriptedCreature.h:485
@ BOSS_VEZAX
Definition ulduar.h:42

Member Function Documentation

◆ DoAction()

void boss_vezax::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

151 {
152 switch (param)
153 {
154 case 1:
155 hardmodeAvailable = false;
156 break;
157 case 2:
160 me->SetLootMode(3);
161 break;
162 }
163 }
@ SAY_EMOTE_BARRIER_FADE
Definition boss_general_vezax.cpp:103
@ SPELL_SARONITE_BARRIER
Definition boss_general_vezax.cpp:62
void SetLootMode(uint16 lootMode)
Definition Creature.h:247
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:5050
Talk
Definition hyjal.cpp:82
Creature * me
Definition ScriptedCreature.h:281
bool hardmodeAvailable
Definition boss_general_vezax.cpp:112

References hardmodeAvailable, ScriptedAI::me, Unit::RemoveAura(), SAY_EMOTE_BARRIER_FADE, Creature::SetLootMode(), and SPELL_SARONITE_BARRIER.

◆ GetData()

uint32 boss_vezax::GetData ( uint32  id) const
inlineoverridevirtual

Reimplemented from UnitAI.

166 {
167 switch (id)
168 {
169 case 1:
170 return (me->GetLootMode() == 3 ? 1 : 0);
171 case 2:
172 return (bAchievShadowdodger ? 1 : 0);
173 }
174 return 0;
175 }
uint16 GetLootMode() const
Definition Creature.h:245
bool bAchievShadowdodger
Definition boss_general_vezax.cpp:114

References bAchievShadowdodger, Creature::GetLootMode(), and ScriptedAI::me.

◆ JustDied()

void boss_vezax::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

323 {
324 _JustDied();
326 }
@ SAY_DEATH
Definition boss_general_vezax.cpp:97
void _JustDied()
Definition ScriptedCreature.cpp:664

References BossAI::_JustDied(), and SAY_DEATH.

◆ JustEngagedWith()

void boss_vezax::JustEngagedWith ( Unit )
inlineoverridevirtual

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

Reimplemented from CreatureAI.

133 {
134 me->setActive(true);
136
137 events.RescheduleEvent(EVENT_SPELL_VEZAX_SHADOW_CRASH, 13s);
138 events.RescheduleEvent(EVENT_SPELL_SEARING_FLAMES, 10s, 1);
139 events.RescheduleEvent(EVENT_SPELL_SURGE_OF_DARKNESS, 63s);
140 events.RescheduleEvent(EVENT_SPELL_MARK_OF_THE_FACELESS, 20s);
141 events.RescheduleEvent(EVENT_SPELL_SUMMON_SARONITE_VAPORS, 30s);
142 events.RescheduleEvent(EVENT_BERSERK, 10min);
143
145
148 }
@ EVENT_SPELL_MARK_OF_THE_FACELESS
Definition boss_general_vezax.cpp:82
@ EVENT_SPELL_VEZAX_SHADOW_CRASH
Definition boss_general_vezax.cpp:79
@ EVENT_SPELL_SURGE_OF_DARKNESS
Definition boss_general_vezax.cpp:81
@ EVENT_SPELL_SUMMON_SARONITE_VAPORS
Definition boss_general_vezax.cpp:83
@ EVENT_BERSERK
Definition boss_general_vezax.cpp:88
@ EVENT_SPELL_SEARING_FLAMES
Definition boss_general_vezax.cpp:80
@ SAY_AGGRO
Definition boss_general_vezax.cpp:94
@ SPELL_AURA_OF_DESPAIR_1
Definition boss_general_vezax.cpp:45
@ SPELL_CLEAR_DEMONIC_CIRCLE
Definition boss_general_vezax.cpp:44
events
Definition boss_sartura.cpp:43
void _JustEngagedWith()
Definition ScriptedCreature.cpp:677
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:1361
void setActive(bool isActiveObject)
Definition Object.cpp:1086

References BossAI::_JustEngagedWith(), Unit::CastSpell(), EVENT_BERSERK, EVENT_SPELL_MARK_OF_THE_FACELESS, EVENT_SPELL_SEARING_FLAMES, EVENT_SPELL_SUMMON_SARONITE_VAPORS, EVENT_SPELL_SURGE_OF_DARKNESS, EVENT_SPELL_VEZAX_SHADOW_CRASH, ScriptedAI::me, SAY_AGGRO, WorldObject::setActive(), SPELL_AURA_OF_DESPAIR_1, and SPELL_CLEAR_DEMONIC_CIRCLE.

◆ JustReachedHome()

void boss_vezax::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

127 {
129 me->setActive(false);
130 }
void _JustReachedHome()
Definition ScriptedCreature.h:534

References BossAI::_JustReachedHome(), ScriptedAI::me, and WorldObject::setActive().

◆ KilledUnit()

void boss_vezax::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

329 {
330 if (who->IsPlayer())
331 Talk(SAY_SLAY);
332 }
@ SAY_SLAY
Definition boss_general_vezax.cpp:95
bool IsPlayer() const
Definition Object.h:201

References Object::IsPlayer(), and SAY_SLAY.

◆ MoveInLineOfSight()

void boss_vezax::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

334{}

◆ Reset()

void boss_vezax::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

117 {
118 _Reset();
119 vaporsCount = 0;
120 hardmodeAvailable = true;
121 berserk = false;
122 bAchievShadowdodger = true;
123 me->SetLootMode(1);
124 }
void _Reset()
Definition ScriptedCreature.cpp:644
uint8 vaporsCount
Definition boss_general_vezax.cpp:111
bool berserk
Definition boss_general_vezax.cpp:113

References BossAI::_Reset(), bAchievShadowdodger, berserk, hardmodeAvailable, ScriptedAI::me, Creature::SetLootMode(), and vaporsCount.

◆ SpellHitTarget()

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

Reimplemented from CreatureAI.

178 {
179 if (target && spell && target->IsPlayer() && spell->Id == SPELL_VEZAX_SHADOW_CRASH_DMG)
180 bAchievShadowdodger = false;
181 }
@ SPELL_VEZAX_SHADOW_CRASH_DMG
Definition boss_general_vezax.cpp:33

References bAchievShadowdodger, SpellInfo::Id, Object::IsPlayer(), and SPELL_VEZAX_SHADOW_CRASH_DMG.

◆ UpdateAI()

void boss_vezax::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

184 {
185 if (!UpdateVictim())
186 return;
187
188 if (!berserk && (me->GetPositionX() < 1720.0f || me->GetPositionX() > 1940.0f || me->GetPositionY() < 20.0f || me->GetPositionY() > 210.0f))
189 events.RescheduleEvent(EVENT_BERSERK, 1ms);
190
191 events.Update(diff);
192
194 return;
195
196 switch (events.ExecuteEvent())
197 {
198 case 0:
199 break;
200 case EVENT_BERSERK:
201 berserk = true;
204 break;
206 {
207 events.Repeat(10s);
208
209 constexpr float dist = 3.0f; // SelectTarget dist check includes CombatReach
210 Unit* target = SelectTarget(SelectTargetMethod::Random, 0, -dist, true, true, 0);
211 if (!target)
212 target = SelectTarget(SelectTargetMethod::Random, 0, 0, true, true, 0);
213
214 if (target)
215 {
218 me->CastSpell(target, SPELL_VEZAX_SHADOW_CRASH, false);
219 events.ScheduleEvent(EVENT_RESTORE_TARGET, 750ms);
220 }
221 }
222 break;
224 if (me->GetVictim())
226 break;
230 events.Repeat(me->GetMap()->Is25ManRaid() ? 8s : 15s);
231 break;
236 events.Repeat(63s);
237 events.DelayEvents(10s, 1);
238 break;
240 {
241 std::vector<Player*> outside;
242 std::vector<Player*> inside;
243 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
244 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
245 if (Player* tmp = itr->GetSource())
246 if (tmp->IsAlive())
247 {
248 if (tmp->GetDistance(me) > 15.0f)
249 outside.push_back(tmp);
250 else
251 inside.push_back(tmp);
252 }
253
254 Player* t = nullptr;
255 if (outside.size() >= uint8(me->GetMap()->Is25ManRaid() ? 9 : 4))
256 t = outside.at(urand(0, outside.size() - 1));
257 else if (!inside.empty())
258 t = inside.at(urand(0, inside.size() - 1));
259
260 if (t)
262
263 events.Repeat(40s);
264 }
265 break;
267 {
268 vaporsCount++;
271
272 if (vaporsCount < 6 || !hardmodeAvailable)
273 events.Repeat(30s);
274 else
275 {
276 for (ObjectGuid const& guid : summons)
277 if (Creature* sv = ObjectAccessor::GetCreature(*me, guid))
278 {
279 sv->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
280 sv->GetMotionMaster()->MoveIdle();
281 sv->GetMotionMaster()->MoveCharge(1852.78f, 81.38f, 342.461f, 28.0f);
282 }
283
284 events.DelayEvents(12s, 0);
285 events.DelayEvents(12s, 1);
286 events.ScheduleEvent(EVENT_SARONITE_VAPORS_SWIRL, 6s);
287 }
288 }
289 break;
291 if (summons.size())
292 {
295 sv->CastSpell(sv, SPELL_SARONITE_ANIMUS_FORMATION_VISUAL, true);
296
298 break;
299 }
300 break;
302 if (summons.size())
303 {
308 sv->CastSpell(sv, SPELL_SUMMON_SARONITE_ANIMUS, true);
309
310 events.ScheduleEvent(EVENT_DESPAWN_SARONITE_VAPORS, 2500ms);
311 break;
312 }
313 break;
316 break;
317 }
318
320 }
std::uint8_t uint8
Definition Define.h:109
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:258
@ BASE_ATTACK
Definition Unit.h:216
@ UNIT_FIELD_TARGET
Definition UpdateFields.h:92
@ EVENT_DESPAWN_SARONITE_VAPORS
Definition boss_general_vezax.cpp:86
@ EVENT_SARONITE_VAPORS_SWIRL
Definition boss_general_vezax.cpp:84
@ EVENT_RESTORE_TARGET
Definition boss_general_vezax.cpp:89
@ EVENT_SPELL_SUMMON_SARONITE_ANIMUS
Definition boss_general_vezax.cpp:85
@ SAY_EMOTE_SURGE_OF_DARKNESS
Definition boss_general_vezax.cpp:102
@ SAY_EMOTE_BARRIER
Definition boss_general_vezax.cpp:101
@ SAY_SURGE_OF_DARKNESS
Definition boss_general_vezax.cpp:96
@ SAY_EMOTE_ANIMUS
Definition boss_general_vezax.cpp:100
@ SAY_EMOTE_VAPORS
Definition boss_general_vezax.cpp:104
@ SAY_BERSERK
Definition boss_general_vezax.cpp:98
@ SAY_HARDMODE
Definition boss_general_vezax.cpp:99
@ NPC_SARONITE_VAPORS
Definition boss_general_vezax.cpp:54
@ SPELL_MARK_OF_THE_FACELESS_AURA
Definition boss_general_vezax.cpp:41
@ SPELL_SUMMON_SARONITE_VAPORS
Definition boss_general_vezax.cpp:53
@ SPELL_SURGE_OF_DARKNESS
Definition boss_general_vezax.cpp:39
@ SPELL_VEZAX_SHADOW_CRASH
Definition boss_general_vezax.cpp:32
@ SPELL_SEARING_FLAMES
Definition boss_general_vezax.cpp:37
@ SPELL_SUMMON_SARONITE_ANIMUS
Definition boss_general_vezax.cpp:61
@ SPELL_SARONITE_ANIMUS_FORMATION_VISUAL
Definition boss_general_vezax.cpp:60
@ SPELL_VEZAX_BERSERK
Definition boss_general_vezax.cpp:30
SummonList summons
Definition ScriptedCreature.h:539
bool UpdateVictim()
Definition CreatureAI.cpp:350
Definition Creature.h:47
Definition LinkedList.h:139
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
bool Is25ManRaid() const
Definition Map.h:304
PlayerList const & GetPlayers() const
Definition Map.h:335
Definition ObjectGuid.h:121
void SetGuidValue(uint16 index, ObjectGuid value)
Definition Object.cpp:716
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:114
Definition Player.h:1086
iterator begin()
Definition ScriptedCreature.h:48
void DespawnEntry(uint32 entry)
Definition ScriptedCreature.cpp:55
size_type size() const
Definition ScriptedCreature.h:78
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:41
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:112
Definition Unit.h:665
void setAttackTimer(WeaponAttackType type, int32 time)
Definition Unit.h:886
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:6017
Unit * GetVictim() const
Definition Unit.h:904
bool HasUnitState(const uint32 f) const
Definition Unit.h:737
Map * GetMap() const
Definition Object.h:631
Definition ObjectAccessor.h:61
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:234
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122

References BASE_ATTACK, SummonList::begin(), MapRefMgr::begin(), berserk, Unit::CastSpell(), SummonList::DespawnEntry(), UnitAI::DoMeleeAttackIfReady(), MapRefMgr::end(), EVENT_BERSERK, EVENT_DESPAWN_SARONITE_VAPORS, EVENT_RESTORE_TARGET, EVENT_SARONITE_VAPORS_SWIRL, EVENT_SPELL_MARK_OF_THE_FACELESS, EVENT_SPELL_SEARING_FLAMES, EVENT_SPELL_SUMMON_SARONITE_ANIMUS, EVENT_SPELL_SUMMON_SARONITE_VAPORS, EVENT_SPELL_SURGE_OF_DARKNESS, EVENT_SPELL_VEZAX_SHADOW_CRASH, ObjectAccessor::GetCreature(), Object::GetGUID(), WorldObject::GetMap(), Map::GetPlayers(), Position::GetPositionX(), Position::GetPositionY(), Unit::GetVictim(), hardmodeAvailable, Unit::HasAura(), Unit::HasUnitState(), Map::Is25ManRaid(), ScriptedAI::me, NPC_SARONITE_VAPORS, Random, SAY_BERSERK, SAY_EMOTE_ANIMUS, SAY_EMOTE_BARRIER, SAY_EMOTE_SURGE_OF_DARKNESS, SAY_EMOTE_VAPORS, SAY_HARDMODE, SAY_SURGE_OF_DARKNESS, UnitAI::SelectTarget(), Unit::setAttackTimer(), Object::SetGuidValue(), SummonList::size(), SPELL_MARK_OF_THE_FACELESS_AURA, SPELL_SARONITE_ANIMUS_FORMATION_VISUAL, SPELL_SARONITE_BARRIER, SPELL_SEARING_FLAMES, SPELL_SUMMON_SARONITE_ANIMUS, SPELL_SUMMON_SARONITE_VAPORS, SPELL_SURGE_OF_DARKNESS, SPELL_VEZAX_BERSERK, SPELL_VEZAX_SHADOW_CRASH, BossAI::summons, UNIT_FIELD_TARGET, UNIT_FLAG_NON_ATTACKABLE, UNIT_STATE_CASTING, CreatureAI::UpdateVictim(), urand(), and vaporsCount.

Member Data Documentation

◆ bAchievShadowdodger

bool boss_vezax::bAchievShadowdodger

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

◆ berserk

bool boss_vezax::berserk

Referenced by Reset(), and UpdateAI().

◆ hardmodeAvailable

bool boss_vezax::hardmodeAvailable

Referenced by DoAction(), Reset(), and UpdateAI().

◆ vaporsCount

uint8 boss_vezax::vaporsCount

Referenced by Reset(), and UpdateAI().


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