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
 
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
 
void UpdateAI (uint32 diff) override
 
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 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)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () const
 
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
 
- 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)
 
 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 JustEngagedWith (Unit *)
 Called for reaction when initially engaged.
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 
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 *)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
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)
 
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 (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 
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)
 
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)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always 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)
 
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
 
bool IsFleeing
 

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

boss_vezax::boss_vezaxAI::boss_vezaxAI ( Creature pCreature)
inline
124 : ScriptedAI(pCreature), summons(me)
125 {
126 pInstance = pCreature->GetInstanceScript();
127 }
Definition: ScriptedCreature.h:192
Creature * me
Definition: ScriptedCreature.h:282
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
SummonList summons
Definition: boss_general_vezax.cpp:130
InstanceScript * pInstance
Definition: boss_general_vezax.cpp:136

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ DoAction()

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

Reimplemented from UnitAI.

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

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.

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

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

◆ JustDied()

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

Reimplemented from ScriptedAI.

353 {
355 if (pInstance)
357
359
360 if( GameObject* door = me->FindNearestGameObject(GO_VEZAX_DOOR, 500.0f) )
361 if( door->GetGoState() != GO_STATE_ACTIVE )
362 {
363 door->SetLootState(GO_READY);
364 door->UseDoorOrButton(0, false);
365 }
366 }
@ GO_READY
Definition: GameObject.h:113
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
@ DONE
Definition: InstanceScript.h:60
@ SAY_DEATH
Definition: boss_general_vezax.cpp:99
@ GO_VEZAX_DOOR
Definition: ulduar.h:228
@ TYPE_VEZAX
Definition: ulduar.h:46
Talk
Definition: boss_fathomlord_karathress.cpp:25
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
Definition: GameObject.h:122
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition: Object.cpp:2443
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

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 ScriptedAI.

158 {
159 me->setActive(true);
161
162 events.Reset();
163 events.RescheduleEvent(EVENT_SPELL_VEZAX_SHADOW_CRASH, 13s);
164 events.RescheduleEvent(EVENT_SPELL_SEARING_FLAMES, 10s, 1);
165 events.RescheduleEvent(EVENT_SPELL_SURGE_OF_DARKNESS, 63s);
166 events.RescheduleEvent(EVENT_SPELL_MARK_OF_THE_FACELESS, 20s);
167 events.RescheduleEvent(EVENT_SPELL_SUMMON_SARONITE_VAPORS, 30s);
168 events.RescheduleEvent(EVENT_BERSERK, 10min);
169
171
172 if (pInstance)
174
176 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
events
Definition: boss_sartura.cpp:43
@ EVENT_SPELL_MARK_OF_THE_FACELESS
Definition: boss_general_vezax.cpp:84
@ EVENT_SPELL_VEZAX_SHADOW_CRASH
Definition: boss_general_vezax.cpp:81
@ EVENT_SPELL_SURGE_OF_DARKNESS
Definition: boss_general_vezax.cpp:83
@ EVENT_SPELL_SUMMON_SARONITE_VAPORS
Definition: boss_general_vezax.cpp:85
@ EVENT_BERSERK
Definition: boss_general_vezax.cpp:90
@ EVENT_SPELL_SEARING_FLAMES
Definition: boss_general_vezax.cpp:82
@ SAY_AGGRO
Definition: boss_general_vezax.cpp:96
@ SPELL_AURA_OF_DESPAIR_1
Definition: boss_general_vezax.cpp:47
void SetInCombatWithZone()
Definition: Creature.cpp:2732
void setActive(bool isActiveObject)
Definition: Object.cpp:1085
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:1169

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.

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

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

◆ JustSummoned()

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

Reimplemented from ScriptedAI.

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

References SummonList::Summon(), and summons.

◆ KilledUnit()

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

Reimplemented from ScriptedAI.

369 {
370 if( who->GetTypeId() == TYPEID_PLAYER )
371 Talk(SAY_SLAY);
372 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
@ SAY_SLAY
Definition: boss_general_vezax.cpp:97
TypeID GetTypeId() const
Definition: Object.h:121

References Object::GetTypeId(), SAY_SLAY, and TYPEID_PLAYER.

◆ MoveInLineOfSight()

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

Reimplemented from CreatureAI.

374{}

◆ Reset()

void boss_vezax::boss_vezaxAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

139 {
140 vaporsCount = 0;
141 hardmodeAvailable = true;
142 berserk = false;
143 bAchievShadowdodger = true;
144 events.Reset();
146 me->SetLootMode(1);
147
148 if (pInstance)
150 }
@ NOT_STARTED
Definition: InstanceScript.h:57
uint8 vaporsCount
Definition: boss_general_vezax.cpp:131
bool berserk
Definition: boss_general_vezax.cpp:133

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 ScriptedAI.

205 {
206 if (target && spell && target->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_VEZAX_SHADOW_CRASH_DMG)
207 bAchievShadowdodger = false;
208 }
@ SPELL_VEZAX_SHADOW_CRASH_DMG
Definition: boss_general_vezax.cpp:36

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

◆ SummonedCreatureDespawn()

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

Reimplemented from ScriptedAI.

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

References SummonList::Despawn(), and summons.

◆ UpdateAI()

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

Reimplemented from ScriptedAI.

211 {
212 if( !UpdateVictim() )
213 return;
214
215 if( !berserk && (me->GetPositionX() < 1720.0f || me->GetPositionX() > 1940.0f || me->GetPositionY() < 20.0f || me->GetPositionY() > 210.0f) )
216 events.RescheduleEvent(EVENT_BERSERK, 1ms);
217
218 events.Update(diff);
219
221 return;
222
223 switch( events.ExecuteEvent() )
224 {
225 case 0:
226 break;
227 case EVENT_BERSERK:
228 berserk = true;
231 break;
233 {
234 events.Repeat(10s);
235
236 std::vector<Player*> players;
237 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
238 for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
239 {
240 Player* temp = itr->GetSource();
241 if( temp->IsAlive() && temp->GetDistance(me) > 15.0f )
242 players.push_back(temp);
243 }
244 if (!players.empty())
245 {
247 Player* target = players.at(urand(0, players.size() - 1));
249 me->CastSpell(target, SPELL_VEZAX_SHADOW_CRASH, false);
250 events.ScheduleEvent(EVENT_RESTORE_TARGET, 750ms);
251 }
252 }
253 break;
255 if (me->GetVictim())
257 break;
261 events.Repeat(me->GetMap()->Is25ManRaid() ? 8s : 15s);
262 break;
267 events.Repeat(63s);
268 events.DelayEvents(10000, 1);
269 break;
271 {
272 std::vector<Player*> outside;
273 std::vector<Player*> inside;
274 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
275 for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
276 if( Player* tmp = itr->GetSource() )
277 if( tmp->IsAlive() )
278 {
279 if( tmp->GetDistance(me) > 15.0f )
280 outside.push_back(tmp);
281 else
282 inside.push_back(tmp);
283 }
284
285 Player* t = nullptr;
286 if( outside.size() >= uint8(me->GetMap()->Is25ManRaid() ? 9 : 4) )
287 t = outside.at(urand(0, outside.size() - 1));
288 else if( !inside.empty() )
289 t = inside.at(urand(0, inside.size() - 1));
290
291 if (t)
293
294 events.Repeat(40s);
295 }
296 break;
298 {
299 vaporsCount++;
301
302 if( vaporsCount < 6 || !hardmodeAvailable )
303 events.Repeat(30s);
304 else
305 {
306 for (ObjectGuid const& guid : summons)
307 if (Creature* sv = ObjectAccessor::GetCreature(*me, guid))
308 {
309 sv->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
310 sv->GetMotionMaster()->MoveIdle();
311 sv->GetMotionMaster()->MoveCharge(1852.78f, 81.38f, 342.461f, 28.0f);
312 }
313
314 events.DelayEvents(12000, 0);
315 events.DelayEvents(12000, 1);
316 events.ScheduleEvent(EVENT_SARONITE_VAPORS_SWIRL, 6s);
317 }
318 }
319 break;
321 if (summons.size())
322 {
325 sv->CastSpell(sv, SPELL_SARONITE_ANIMUS_FORMATION_VISUAL, true);
326
328 break;
329 }
330 break;
332 if (summons.size())
333 {
338 sv->CastSpell(sv, SPELL_SUMMON_SARONITE_ANIMUS, true);
339
340 events.ScheduleEvent(EVENT_DESPAWN_SARONITE_VAPORS, 2500ms);
341 break;
342 }
343 break;
346 break;
347 }
348
350 }
std::uint8_t uint8
Definition: Define.h:110
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ UNIT_FIELD_TARGET
Definition: UpdateFields.h:92
@ BASE_ATTACK
Definition: Unit.h:396
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ UNIT_FLAG_NON_ATTACKABLE
Definition: Unit.h:449
@ EVENT_DESPAWN_SARONITE_VAPORS
Definition: boss_general_vezax.cpp:88
@ EVENT_SARONITE_VAPORS_SWIRL
Definition: boss_general_vezax.cpp:86
@ EVENT_RESTORE_TARGET
Definition: boss_general_vezax.cpp:91
@ EVENT_SPELL_SUMMON_SARONITE_ANIMUS
Definition: boss_general_vezax.cpp:87
@ SAY_EMOTE_SURGE_OF_DARKNESS
Definition: boss_general_vezax.cpp:104
@ SAY_EMOTE_BARRIER
Definition: boss_general_vezax.cpp:103
@ SAY_SURGE_OF_DARKNESS
Definition: boss_general_vezax.cpp:98
@ SAY_EMOTE_ANIMUS
Definition: boss_general_vezax.cpp:102
@ SAY_BERSERK
Definition: boss_general_vezax.cpp:100
@ SAY_HARDMODE
Definition: boss_general_vezax.cpp:101
@ NPC_SARONITE_VAPORS
Definition: boss_general_vezax.cpp:55
@ SPELL_MARK_OF_THE_FACELESS_AURA
Definition: boss_general_vezax.cpp:44
@ SPELL_SUMMON_SARONITE_VAPORS
Definition: boss_general_vezax.cpp:54
@ SPELL_SURGE_OF_DARKNESS
Definition: boss_general_vezax.cpp:42
@ SPELL_VEZAX_SHADOW_CRASH
Definition: boss_general_vezax.cpp:35
@ SPELL_SEARING_FLAMES
Definition: boss_general_vezax.cpp:40
@ SPELL_SUMMON_SARONITE_ANIMUS
Definition: boss_general_vezax.cpp:62
@ SPELL_SARONITE_ANIMUS_FORMATION_VISUAL
Definition: boss_general_vezax.cpp:61
@ SPELL_VEZAX_BERSERK
Definition: boss_general_vezax.cpp:33
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
Definition: LinkedList.h:139
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
bool UpdateVictim()
Definition: CreatureAI.cpp:268
iterator begin()
Definition: ScriptedCreature.h:50
void DespawnEntry(uint32 entry)
Definition: ScriptedCreature.cpp:54
size_type size() const
Definition: ScriptedCreature.h:80
Definition: Creature.h:46
void SetGuidValue(uint16 index, ObjectGuid value)
Definition: Object.cpp:723
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
Map * GetMap() const
Definition: Object.h:517
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1245
Definition: ObjectGuid.h:120
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Definition: Player.h:1056
void setAttackTimer(WeaponAttackType type, int32 time)
Definition: Unit.h:1352
bool IsAlive() const
Definition: Unit.h:1822
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5636
Unit * GetVictim() const
Definition: Unit.h:1398
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1410
bool Is25ManRaid() const
Definition: Map.h:453
PlayerList const & GetPlayers() const
Definition: Map.h:485
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37

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