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

Public Member Functions

 boss_vezaxAI (Creature *pCreature)
 
void Reset () override
 
void JustReachedHome () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *s) 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 EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
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.
 
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 ()
 
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)
 
- 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, 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

EventMap events
 
SummonList summons
 
uint8 vaporsCount
 
bool hardmodeAvailable
 
bool berserk
 
bool bAchievShadowdodger
 
InstanceScriptpInstance
 
- 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)
 
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_vezaxAI()

boss_vezax::boss_vezaxAI::boss_vezaxAI ( Creature pCreature)
inline
125 : ScriptedAI(pCreature), summons(me)
126 {
127 pInstance = pCreature->GetInstanceScript();
128 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1203
Definition ScriptedCreature.h:190
Creature * me
Definition ScriptedCreature.h:280
SummonList summons
Definition boss_general_vezax.cpp:131
InstanceScript * pInstance
Definition boss_general_vezax.cpp:137

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ DoAction()

void boss_vezax::boss_vezaxAI::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

180 {
181 switch (param)
182 {
183 case 1:
184 hardmodeAvailable = false;
185 break;
186 case 2:
188 me->SetLootMode(3);
189 break;
190 }
191 }
@ SPELL_SARONITE_BARRIER
Definition boss_general_vezax.cpp:64
void SetLootMode(uint16 lootMode)
Definition Creature.h:246
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4809
bool hardmodeAvailable
Definition boss_general_vezax.cpp:133

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

◆ GetData()

uint32 boss_vezax::boss_vezaxAI::GetData ( uint32  id) const
inlineoverridevirtual

Reimplemented from UnitAI.

194 {
195 switch (id)
196 {
197 case 1:
198 return (me->GetLootMode() == 3 ? 1 : 0);
199 case 2:
200 return (bAchievShadowdodger ? 1 : 0);
201 }
202 return 0;
203 }
uint16 GetLootMode() const
Definition Creature.h:244
bool bAchievShadowdodger
Definition boss_general_vezax.cpp:135

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

◆ JustDied()

void boss_vezax::boss_vezaxAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

354 {
356 if (pInstance)
358
360
361 if (GameObject* door = me->FindNearestGameObject(GO_VEZAX_DOOR, 500.0f))
362 if (door->GetGoState() != GO_STATE_ACTIVE )
363 {
364 door->SetLootState(GO_READY);
365 door->UseDoorOrButton(0, false);
366 }
367 }
@ GO_STATE_ACTIVE
Definition GameObjectData.h:689
@ GO_READY
Definition GameObject.h:111
@ DONE
Definition InstanceScript.h:61
@ SAY_DEATH
Definition boss_general_vezax.cpp:100
Definition GameObject.h:120
void DespawnAll(uint32 delay=0)
Definition ScriptedCreature.cpp:71
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition Object.cpp:2468
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
Talk
Definition hyjal.cpp:82
@ GO_VEZAX_DOOR
Definition ulduar.h:233
@ TYPE_VEZAX
Definition ulduar.h:43

References SummonList::DespawnAll(), DONE, WorldObject::FindNearestGameObject(), GO_READY, GO_STATE_ACTIVE, GO_VEZAX_DOOR, ScriptedAI::me, pInstance, SAY_DEATH, ZoneScript::SetData(), summons, and TYPE_VEZAX.

◆ JustEngagedWith()

void boss_vezax::boss_vezaxAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from CreatureAI.

159 {
160 me->setActive(true);
162
163 events.Reset();
164 events.RescheduleEvent(EVENT_SPELL_VEZAX_SHADOW_CRASH, 13s);
165 events.RescheduleEvent(EVENT_SPELL_SEARING_FLAMES, 10s, 1);
166 events.RescheduleEvent(EVENT_SPELL_SURGE_OF_DARKNESS, 63s);
167 events.RescheduleEvent(EVENT_SPELL_MARK_OF_THE_FACELESS, 20s);
168 events.RescheduleEvent(EVENT_SPELL_SUMMON_SARONITE_VAPORS, 30s);
169 events.RescheduleEvent(EVENT_BERSERK, 10min);
170
172
173 if (pInstance)
175
177 }
@ IN_PROGRESS
Definition InstanceScript.h:59
@ EVENT_SPELL_MARK_OF_THE_FACELESS
Definition boss_general_vezax.cpp:85
@ EVENT_SPELL_VEZAX_SHADOW_CRASH
Definition boss_general_vezax.cpp:82
@ EVENT_SPELL_SURGE_OF_DARKNESS
Definition boss_general_vezax.cpp:84
@ EVENT_SPELL_SUMMON_SARONITE_VAPORS
Definition boss_general_vezax.cpp:86
@ EVENT_BERSERK
Definition boss_general_vezax.cpp:91
@ EVENT_SPELL_SEARING_FLAMES
Definition boss_general_vezax.cpp:83
@ SAY_AGGRO
Definition boss_general_vezax.cpp:97
@ SPELL_AURA_OF_DESPAIR_1
Definition boss_general_vezax.cpp:48
events
Definition boss_sartura.cpp:43
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition Creature.cpp:2826
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:1179
void setActive(bool isActiveObject)
Definition Object.cpp:1094

References 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, IN_PROGRESS, ScriptedAI::me, pInstance, SAY_AGGRO, WorldObject::setActive(), ZoneScript::SetData(), Creature::SetInCombatWithZone(), SPELL_AURA_OF_DESPAIR_1, and TYPE_VEZAX.

◆ JustReachedHome()

void boss_vezax::boss_vezaxAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

154 {
155 me->setActive(false);
156 }

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

◆ JustSummoned()

void boss_vezax::boss_vezaxAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from CreatureAI.

378 {
379 summons.Summon(summon);
380 }
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88

References SummonList::Summon(), and summons.

◆ KilledUnit()

void boss_vezax::boss_vezaxAI::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

370 {
371 if (who->IsPlayer())
372 Talk(SAY_SLAY);
373 }
@ SAY_SLAY
Definition boss_general_vezax.cpp:98
bool IsPlayer() const
Definition Object.h:201

References Object::IsPlayer(), and SAY_SLAY.

◆ MoveInLineOfSight()

void boss_vezax::boss_vezaxAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

375{}

◆ Reset()

void boss_vezax::boss_vezaxAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

140 {
141 vaporsCount = 0;
142 hardmodeAvailable = true;
143 berserk = false;
144 bAchievShadowdodger = true;
145 events.Reset();
147 me->SetLootMode(1);
148
149 if (pInstance)
151 }
@ NOT_STARTED
Definition InstanceScript.h:58
uint8 vaporsCount
Definition boss_general_vezax.cpp:132
bool berserk
Definition boss_general_vezax.cpp:134

References bAchievShadowdodger, berserk, SummonList::DespawnAll(), hardmodeAvailable, ScriptedAI::me, NOT_STARTED, pInstance, ZoneScript::SetData(), Creature::SetLootMode(), summons, TYPE_VEZAX, and vaporsCount.

◆ SpellHitTarget()

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

Reimplemented from CreatureAI.

206 {
207 if (target && spell && target->IsPlayer() && spell->Id == SPELL_VEZAX_SHADOW_CRASH_DMG)
208 bAchievShadowdodger = false;
209 }
@ SPELL_VEZAX_SHADOW_CRASH_DMG
Definition boss_general_vezax.cpp:37

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

◆ SummonedCreatureDespawn()

void boss_vezax::boss_vezaxAI::SummonedCreatureDespawn ( Creature s)
inlineoverridevirtual

Reimplemented from CreatureAI.

383 {
384 summons.Despawn(s);
385 }
void Despawn(Creature const *summon)
Definition ScriptedCreature.h:89

References SummonList::Despawn(), and summons.

◆ UpdateAI()

void boss_vezax::boss_vezaxAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

212 {
213 if (!UpdateVictim())
214 return;
215
216 if (!berserk && (me->GetPositionX() < 1720.0f || me->GetPositionX() > 1940.0f || me->GetPositionY() < 20.0f || me->GetPositionY() > 210.0f))
217 events.RescheduleEvent(EVENT_BERSERK, 1ms);
218
219 events.Update(diff);
220
222 return;
223
224 switch (events.ExecuteEvent())
225 {
226 case 0:
227 break;
228 case EVENT_BERSERK:
229 berserk = true;
232 break;
234 {
235 events.Repeat(10s);
236
237 std::vector<Player*> players;
238 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
239 for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
240 {
241 Player* temp = itr->GetSource();
242 if (temp->IsAlive() && temp->GetDistance(me) > 15.0f )
243 players.push_back(temp);
244 }
245 if (!players.empty())
246 {
248 Player* target = players.at(urand(0, players.size() - 1));
250 me->CastSpell(target, SPELL_VEZAX_SHADOW_CRASH, false);
251 events.ScheduleEvent(EVENT_RESTORE_TARGET, 750ms);
252 }
253 }
254 break;
256 if (me->GetVictim())
258 break;
262 events.Repeat(me->GetMap()->Is25ManRaid() ? 8s : 15s);
263 break;
268 events.Repeat(63s);
269 events.DelayEvents(10000, 1);
270 break;
272 {
273 std::vector<Player*> outside;
274 std::vector<Player*> inside;
275 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
276 for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
277 if (Player* tmp = itr->GetSource())
278 if (tmp->IsAlive())
279 {
280 if (tmp->GetDistance(me) > 15.0f )
281 outside.push_back(tmp);
282 else
283 inside.push_back(tmp);
284 }
285
286 Player* t = nullptr;
287 if (outside.size() >= uint8(me->GetMap()->Is25ManRaid() ? 9 : 4))
288 t = outside.at(urand(0, outside.size() - 1));
289 else if (!inside.empty())
290 t = inside.at(urand(0, inside.size() - 1));
291
292 if (t)
294
295 events.Repeat(40s);
296 }
297 break;
299 {
300 vaporsCount++;
302
303 if (vaporsCount < 6 || !hardmodeAvailable)
304 events.Repeat(30s);
305 else
306 {
307 for (ObjectGuid const& guid : summons)
308 if (Creature* sv = ObjectAccessor::GetCreature(*me, guid))
309 {
310 sv->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
311 sv->GetMotionMaster()->MoveIdle();
312 sv->GetMotionMaster()->MoveCharge(1852.78f, 81.38f, 342.461f, 28.0f);
313 }
314
315 events.DelayEvents(12000, 0);
316 events.DelayEvents(12000, 1);
317 events.ScheduleEvent(EVENT_SARONITE_VAPORS_SWIRL, 6s);
318 }
319 }
320 break;
322 if (summons.size())
323 {
326 sv->CastSpell(sv, SPELL_SARONITE_ANIMUS_FORMATION_VISUAL, true);
327
329 break;
330 }
331 break;
333 if (summons.size())
334 {
339 sv->CastSpell(sv, SPELL_SUMMON_SARONITE_ANIMUS, true);
340
341 events.ScheduleEvent(EVENT_DESPAWN_SARONITE_VAPORS, 2500ms);
342 break;
343 }
344 break;
347 break;
348 }
349
351 }
std::uint8_t uint8
Definition Define.h:109
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
@ UNIT_STATE_CASTING
Definition UnitDefines.h:185
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:251
@ BASE_ATTACK
Definition Unit.h:210
@ UNIT_FIELD_TARGET
Definition UpdateFields.h:92
@ EVENT_DESPAWN_SARONITE_VAPORS
Definition boss_general_vezax.cpp:89
@ EVENT_SARONITE_VAPORS_SWIRL
Definition boss_general_vezax.cpp:87
@ EVENT_RESTORE_TARGET
Definition boss_general_vezax.cpp:92
@ EVENT_SPELL_SUMMON_SARONITE_ANIMUS
Definition boss_general_vezax.cpp:88
@ SAY_EMOTE_SURGE_OF_DARKNESS
Definition boss_general_vezax.cpp:105
@ SAY_EMOTE_BARRIER
Definition boss_general_vezax.cpp:104
@ SAY_SURGE_OF_DARKNESS
Definition boss_general_vezax.cpp:99
@ SAY_EMOTE_ANIMUS
Definition boss_general_vezax.cpp:103
@ SAY_BERSERK
Definition boss_general_vezax.cpp:101
@ SAY_HARDMODE
Definition boss_general_vezax.cpp:102
@ NPC_SARONITE_VAPORS
Definition boss_general_vezax.cpp:56
@ SPELL_MARK_OF_THE_FACELESS_AURA
Definition boss_general_vezax.cpp:45
@ SPELL_SUMMON_SARONITE_VAPORS
Definition boss_general_vezax.cpp:55
@ SPELL_SURGE_OF_DARKNESS
Definition boss_general_vezax.cpp:43
@ SPELL_VEZAX_SHADOW_CRASH
Definition boss_general_vezax.cpp:36
@ SPELL_SEARING_FLAMES
Definition boss_general_vezax.cpp:41
@ SPELL_SUMMON_SARONITE_ANIMUS
Definition boss_general_vezax.cpp:63
@ SPELL_SARONITE_ANIMUS_FORMATION_VISUAL
Definition boss_general_vezax.cpp:62
@ SPELL_VEZAX_BERSERK
Definition boss_general_vezax.cpp:34
bool UpdateVictim()
Definition CreatureAI.cpp:282
Definition Creature.h:43
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:300
PlayerList const & GetPlayers() const
Definition Map.h:333
Definition ObjectGuid.h:118
void SetGuidValue(uint16 index, ObjectGuid value)
Definition Object.cpp:723
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:113
Definition Player.h:1082
iterator begin()
Definition ScriptedCreature.h:48
void DespawnEntry(uint32 entry)
Definition ScriptedCreature.cpp:54
size_type size() const
Definition ScriptedCreature.h:78
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:39
void setAttackTimer(WeaponAttackType type, int32 time)
Definition Unit.h:828
bool IsAlive() const
Definition Unit.h:1698
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5754
Unit * GetVictim() const
Definition Unit.h:846
bool HasUnitState(const uint32 f) const
Definition Unit.h:691
Map * GetMap() const
Definition Object.h:537
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1256
Definition ObjectAccessor.h:61
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition ObjectAccessor.cpp:210
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(), WorldObject::GetDistance(), Object::GetGUID(), WorldObject::GetMap(), Map::GetPlayers(), Position::GetPositionX(), Position::GetPositionY(), Unit::GetVictim(), hardmodeAvailable, Unit::HasAura(), Unit::HasUnitState(), Map::Is25ManRaid(), Unit::IsAlive(), ScriptedAI::me, NPC_SARONITE_VAPORS, SAY_BERSERK, SAY_EMOTE_ANIMUS, SAY_EMOTE_BARRIER, SAY_EMOTE_SURGE_OF_DARKNESS, SAY_HARDMODE, SAY_SURGE_OF_DARKNESS, 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, summons, UNIT_FIELD_TARGET, UNIT_FLAG_NON_ATTACKABLE, UNIT_STATE_CASTING, CreatureAI::UpdateVictim(), urand(), and vaporsCount.

Member Data Documentation

◆ bAchievShadowdodger

bool boss_vezax::boss_vezaxAI::bAchievShadowdodger

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

◆ berserk

bool boss_vezax::boss_vezaxAI::berserk

Referenced by Reset(), and UpdateAI().

◆ events

EventMap boss_vezax::boss_vezaxAI::events

◆ hardmodeAvailable

bool boss_vezax::boss_vezaxAI::hardmodeAvailable

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

◆ pInstance

InstanceScript* boss_vezax::boss_vezaxAI::pInstance

◆ summons

SummonList boss_vezax::boss_vezaxAI::summons

◆ vaporsCount

uint8 boss_vezax::boss_vezaxAI::vaporsCount

Referenced by Reset(), and UpdateAI().


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