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 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 HealDone (Unit *, uint32 &)
 
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
 
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
121 : ScriptedAI(pCreature), summons(me)
122 {
123 pInstance = pCreature->GetInstanceScript();
124 }
Definition: ScriptedCreature.h:192
Creature * me
Definition: ScriptedCreature.h:282
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
SummonList summons
Definition: boss_general_vezax.cpp:127
InstanceScript * pInstance
Definition: boss_general_vezax.cpp:133

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ DoAction()

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

Reimplemented from UnitAI.

176 {
177 switch( param )
178 {
179 case 1:
180 hardmodeAvailable = false;
181 break;
182 case 2:
184 me->SetLootMode(3);
185 break;
186 }
187 }
@ SPELL_SARONITE_BARRIER
Definition: boss_general_vezax.cpp:60
void SetLootMode(uint16 lootMode)
Definition: Creature.h:234
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4708
bool hardmodeAvailable
Definition: boss_general_vezax.cpp:129

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.

190 {
191 switch (id)
192 {
193 case 1:
194 return (me->GetLootMode() == 3 ? 1 : 0);
195 case 2:
196 return (bAchievShadowdodger ? 1 : 0);
197 }
198 return 0;
199 }
uint16 GetLootMode() const
Definition: Creature.h:232
bool bAchievShadowdodger
Definition: boss_general_vezax.cpp:131

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

◆ JustDied()

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

Reimplemented from ScriptedAI.

350 {
352 if (pInstance)
354
356
357 if( GameObject* door = me->FindNearestGameObject(GO_VEZAX_DOOR, 500.0f) )
358 if( door->GetGoState() != GO_STATE_ACTIVE )
359 {
360 door->SetLootState(GO_READY);
361 door->UseDoorOrButton(0, false);
362 }
363 }
@ GO_READY
Definition: GameObject.h:113
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
@ DONE
Definition: InstanceScript.h:59
@ SAY_DEATH
Definition: boss_general_vezax.cpp:96
@ GO_VEZAX_DOOR
Definition: ulduar.h:228
@ TYPE_VEZAX
Definition: ulduar.h:46
Talk
Definition: boss_fathomlord_karathress.cpp:23
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:67
Definition: GameObject.h:122
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition: Object.cpp:2418
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.

155 {
156 me->setActive(true);
158
159 events.Reset();
160 events.RescheduleEvent(EVENT_SPELL_VEZAX_SHADOW_CRASH, 13s);
161 events.RescheduleEvent(EVENT_SPELL_SEARING_FLAMES, 10s, 1);
162 events.RescheduleEvent(EVENT_SPELL_SURGE_OF_DARKNESS, 63s);
163 events.RescheduleEvent(EVENT_SPELL_MARK_OF_THE_FACELESS, 20s);
164 events.RescheduleEvent(EVENT_SPELL_SUMMON_SARONITE_VAPORS, 30s);
165 events.RescheduleEvent(EVENT_BERSERK, 10min);
166
168
169 if (pInstance)
171
173 }
@ IN_PROGRESS
Definition: InstanceScript.h:57
events
Definition: boss_sartura.cpp:43
@ EVENT_SPELL_MARK_OF_THE_FACELESS
Definition: boss_general_vezax.cpp:81
@ EVENT_SPELL_VEZAX_SHADOW_CRASH
Definition: boss_general_vezax.cpp:78
@ EVENT_SPELL_SURGE_OF_DARKNESS
Definition: boss_general_vezax.cpp:80
@ EVENT_SPELL_SUMMON_SARONITE_VAPORS
Definition: boss_general_vezax.cpp:82
@ EVENT_BERSERK
Definition: boss_general_vezax.cpp:87
@ EVENT_SPELL_SEARING_FLAMES
Definition: boss_general_vezax.cpp:79
@ SAY_AGGRO
Definition: boss_general_vezax.cpp:93
@ SPELL_AURA_OF_DESPAIR_1
Definition: boss_general_vezax.cpp:44
void SetInCombatWithZone()
Definition: Creature.cpp:2723
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.

150 {
151 me->setActive(false);
152 }

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

◆ JustSummoned()

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

Reimplemented from ScriptedAI.

374 {
375 summons.Summon(summon);
376 }
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.

366 {
367 if( who->GetTypeId() == TYPEID_PLAYER )
368 Talk(SAY_SLAY);
369 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
@ SAY_SLAY
Definition: boss_general_vezax.cpp:94
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.

371{}

◆ Reset()

void boss_vezax::boss_vezaxAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

136 {
137 vaporsCount = 0;
138 hardmodeAvailable = true;
139 berserk = false;
140 bAchievShadowdodger = true;
141 events.Reset();
143 me->SetLootMode(1);
144
145 if (pInstance)
147 }
@ NOT_STARTED
Definition: InstanceScript.h:56
uint8 vaporsCount
Definition: boss_general_vezax.cpp:128
bool berserk
Definition: boss_general_vezax.cpp:130

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.

202 {
203 if (target && spell && target->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_VEZAX_SHADOW_CRASH_DMG)
204 bAchievShadowdodger = false;
205 }
@ SPELL_VEZAX_SHADOW_CRASH_DMG
Definition: boss_general_vezax.cpp:33

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.

379 {
380 summons.Despawn(s);
381 }
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.

208 {
209 if( !UpdateVictim() )
210 return;
211
212 if( !berserk && (me->GetPositionX() < 1720.0f || me->GetPositionX() > 1940.0f || me->GetPositionY() < 20.0f || me->GetPositionY() > 210.0f) )
213 events.RescheduleEvent(EVENT_BERSERK, 1ms);
214
215 events.Update(diff);
216
218 return;
219
220 switch( events.ExecuteEvent() )
221 {
222 case 0:
223 break;
224 case EVENT_BERSERK:
225 berserk = true;
228 break;
230 {
231 events.Repeat(10s);
232
233 std::vector<Player*> players;
234 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
235 for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
236 {
237 Player* temp = itr->GetSource();
238 if( temp->IsAlive() && temp->GetDistance(me) > 15.0f )
239 players.push_back(temp);
240 }
241 if (!players.empty())
242 {
244 Player* target = players.at(urand(0, players.size() - 1));
246 me->CastSpell(target, SPELL_VEZAX_SHADOW_CRASH, false);
247 events.ScheduleEvent(EVENT_RESTORE_TARGET, 750ms);
248 }
249 }
250 break;
252 if (me->GetVictim())
254 break;
258 events.Repeat(me->GetMap()->Is25ManRaid() ? 8s : 15s);
259 break;
264 events.Repeat(63s);
265 events.DelayEvents(10000, 1);
266 break;
268 {
269 std::vector<Player*> outside;
270 std::vector<Player*> inside;
271 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
272 for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
273 if( Player* tmp = itr->GetSource() )
274 if( tmp->IsAlive() )
275 {
276 if( tmp->GetDistance(me) > 15.0f )
277 outside.push_back(tmp);
278 else
279 inside.push_back(tmp);
280 }
281
282 Player* t = nullptr;
283 if( outside.size() >= uint8(me->GetMap()->Is25ManRaid() ? 9 : 4) )
284 t = outside.at(urand(0, outside.size() - 1));
285 else if( !inside.empty() )
286 t = inside.at(urand(0, inside.size() - 1));
287
288 if (t)
290
291 events.Repeat(40s);
292 }
293 break;
295 {
296 vaporsCount++;
298
299 if( vaporsCount < 6 || !hardmodeAvailable )
300 events.Repeat(30s);
301 else
302 {
303 for (ObjectGuid const& guid : summons)
304 if (Creature* sv = ObjectAccessor::GetCreature(*me, guid))
305 {
306 sv->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
307 sv->GetMotionMaster()->MoveIdle();
308 sv->GetMotionMaster()->MoveCharge(1852.78f, 81.38f, 342.461f, 28.0f);
309 }
310
311 events.DelayEvents(12000, 0);
312 events.DelayEvents(12000, 1);
313 events.ScheduleEvent(EVENT_SARONITE_VAPORS_SWIRL, 6s);
314 }
315 }
316 break;
318 if (summons.size())
319 {
322 sv->CastSpell(sv, SPELL_SARONITE_ANIMUS_FORMATION_VISUAL, true);
323
325 break;
326 }
327 break;
329 if (summons.size())
330 {
335 sv->CastSpell(sv, SPELL_SUMMON_SARONITE_ANIMUS, true);
336
337 events.ScheduleEvent(EVENT_DESPAWN_SARONITE_VAPORS, 2500ms);
338 break;
339 }
340 break;
343 break;
344 }
345
347 }
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:85
@ EVENT_SARONITE_VAPORS_SWIRL
Definition: boss_general_vezax.cpp:83
@ EVENT_RESTORE_TARGET
Definition: boss_general_vezax.cpp:88
@ EVENT_SPELL_SUMMON_SARONITE_ANIMUS
Definition: boss_general_vezax.cpp:84
@ SAY_EMOTE_SURGE_OF_DARKNESS
Definition: boss_general_vezax.cpp:101
@ SAY_EMOTE_BARRIER
Definition: boss_general_vezax.cpp:100
@ SAY_SURGE_OF_DARKNESS
Definition: boss_general_vezax.cpp:95
@ SAY_EMOTE_ANIMUS
Definition: boss_general_vezax.cpp:99
@ SAY_BERSERK
Definition: boss_general_vezax.cpp:97
@ SAY_HARDMODE
Definition: boss_general_vezax.cpp:98
@ NPC_SARONITE_VAPORS
Definition: boss_general_vezax.cpp:52
@ SPELL_MARK_OF_THE_FACELESS_AURA
Definition: boss_general_vezax.cpp:41
@ SPELL_SUMMON_SARONITE_VAPORS
Definition: boss_general_vezax.cpp:51
@ 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:59
@ SPELL_SARONITE_ANIMUS_FORMATION_VISUAL
Definition: boss_general_vezax.cpp:58
@ SPELL_VEZAX_BERSERK
Definition: boss_general_vezax.cpp:30
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
Definition: LinkedList.h:139
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
bool UpdateVictim()
Definition: CreatureAI.cpp:269
iterator begin()
Definition: ScriptedCreature.h:50
void DespawnEntry(uint32 entry)
Definition: ScriptedCreature.cpp:50
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:1046
void setAttackTimer(WeaponAttackType type, int32 time)
Definition: Unit.h:1340
bool IsAlive() const
Definition: Unit.h:1808
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5610
Unit * GetVictim() const
Definition: Unit.h:1386
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398
bool Is25ManRaid() const
Definition: Map.h:452
PlayerList const & GetPlayers() const
Definition: Map.h:484
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().