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

Public Member Functions

 boss_arlokkAI (Creature *creature)
 
void Reset () override
 
void JustDied (Unit *) override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void JustReachedHome () override
 
void EnterEvadeMode (EvadeReason why) override
 
void SetData (uint32 id, uint32) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () 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)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec)
 
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.
 
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 (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 void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
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 ()
 
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 DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
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
 

Private Attributes

uint8 _summonCountA
 
uint8 _summonCountB
 
ObjectGuid _triggersSideAGUID [5]
 
ObjectGuid _triggersSideBGUID [5]
 

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 ()
 
- Public Attributes inherited from BossAI
float callForHelpRange
 
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
- 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)
 
virtual void MoveInLineOfSight (Unit *)
 
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
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_arlokkAI()

boss_arlokk::boss_arlokkAI::boss_arlokkAI ( Creature creature)
inline
97: BossAI(creature, DATA_ARLOKK) { }
Definition ScriptedCreature.h:467
@ DATA_ARLOKK
Definition zulgurub.h:34

Member Function Documentation

◆ EnterEvadeMode()

void boss_arlokk::boss_arlokkAI::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

160 {
162
163 std::list<Creature*> panthers;
165 for (auto const& panther : panthers)
166 panther->DespawnOrUnsummon();
167 }
void GetCreatureListWithEntryInGrid(std::list< Creature * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
Definition ScriptedCreature.cpp:875
void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER) override
Definition ScriptedCreature.h:504
Creature * me
Definition ScriptedCreature.h:280
@ NPC_ZULIAN_PROWLER
Definition zulgurub.h:51

References BossAI::EnterEvadeMode(), GetCreatureListWithEntryInGrid(), ScriptedAI::me, and NPC_ZULIAN_PROWLER.

◆ JustDied()

void boss_arlokk::boss_arlokkAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

114 {
115 _JustDied();
117 }
@ SAY_DEATH
Definition boss_arlokk.cpp:37
void _JustDied()
Definition ScriptedCreature.cpp:644
Talk
Definition hyjal.cpp:82

References BossAI::_JustDied(), and SAY_DEATH.

◆ JustEngagedWith()

void boss_arlokk::boss_arlokkAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from CreatureAI.

120 {
122 events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 7s, 9s, 0, PHASE_ONE);
123 events.ScheduleEvent(EVENT_GOUGE, 12s, 15s, 0, PHASE_ONE);
124 events.ScheduleEvent(EVENT_SUMMON_PROWLERS, 6s, 0, PHASE_ALL);
125 events.ScheduleEvent(EVENT_MARK_OF_ARLOKK, 9s, 11s, 0, PHASE_ALL);
126 events.ScheduleEvent(EVENT_TRANSFORM, 30s, 0, PHASE_ONE);
128
129 // Sets up list of Panther spawners to cast on
130 std::list<Creature*> triggerList;
132 if (!triggerList.empty())
133 {
134 uint8 sideA = 0;
135 uint8 sideB = 0;
136 for (auto const& trigger : triggerList)
137 {
138 if (trigger->GetPositionY() < -1625.0f)
139 {
140 _triggersSideAGUID[sideA] = trigger->GetGUID();
141 ++sideA;
142 }
143 else
144 {
145 _triggersSideBGUID[sideB] = trigger->GetGUID();
146 ++sideB;
147 }
148 }
149 }
150 }
std::uint8_t uint8
Definition Define.h:109
@ SAY_AGGRO
Definition boss_arlokk.cpp:35
@ PHASE_ONE
Definition boss_arlokk.cpp:71
@ PHASE_ALL
Definition boss_arlokk.cpp:70
@ EVENT_SUMMON_PROWLERS
Definition boss_arlokk.cpp:65
@ EVENT_SHADOW_WORD_PAIN
Definition boss_arlokk.cpp:56
@ EVENT_GOUGE
Definition boss_arlokk.cpp:57
@ EVENT_TRANSFORM
Definition boss_arlokk.cpp:60
@ EVENT_MARK_OF_ARLOKK
Definition boss_arlokk.cpp:58
events
Definition boss_sartura.cpp:43
void _JustEngagedWith()
Definition ScriptedCreature.cpp:657
ObjectGuid _triggersSideBGUID[5]
Definition boss_arlokk.cpp:296
ObjectGuid _triggersSideAGUID[5]
Definition boss_arlokk.cpp:295
@ NPC_PANTHER_TRIGGER
Definition zulgurub.h:50

References BossAI::_JustEngagedWith(), _triggersSideAGUID, _triggersSideBGUID, EVENT_GOUGE, EVENT_MARK_OF_ARLOKK, EVENT_SHADOW_WORD_PAIN, EVENT_SUMMON_PROWLERS, EVENT_TRANSFORM, GetCreatureListWithEntryInGrid(), ScriptedAI::me, NPC_PANTHER_TRIGGER, PHASE_ALL, PHASE_ONE, and SAY_AGGRO.

◆ JustReachedHome()

void boss_arlokk::boss_arlokkAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

153 {
155 object->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
157 }
@ GO_FLAG_NOT_SELECTABLE
Definition SharedDefines.h:1607
InstanceScript *const instance
Definition ScriptedCreature.h:474
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition Creature.cpp:2183
Definition GameObject.h:120
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:110
GameObject * GetGameObject(WorldObject const &u, ObjectGuid const guid)
Definition ObjectAccessor.cpp:184
@ GO_GONG_OF_BETHEKK
Definition zulgurub.h:79

References Creature::DespawnOrUnsummon(), ObjectAccessor::GetGameObject(), InstanceScript::GetGuidData(), GO_FLAG_NOT_SELECTABLE, GO_GONG_OF_BETHEKK, BossAI::instance, and ScriptedAI::me.

◆ Reset()

void boss_arlokk::boss_arlokkAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

100 {
101 if (events.IsInPhase(PHASE_TWO))
103 _Reset();
104 _summonCountA = 0;
105 _summonCountB = 0;
108 me->SetWalk(false);
111 }
std::uint32_t uint32
Definition Define.h:107
@ UNIT_MOD_DAMAGE_MAINHAND
Definition Unit.h:165
@ TOTAL_PCT
Definition Unit.h:129
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition UpdateFields.h:116
@ PHASE_TWO
Definition boss_arlokk.cpp:72
Position const PosMoveOnSpawn[1]
Definition boss_arlokk.cpp:85
@ WEAPON_DAGGER
Definition boss_arlokk.cpp:77
void _Reset()
Definition ScriptedCreature.cpp:624
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:340
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition Creature.cpp:3208
void MoveTargetedHome(bool walk=false)
The unit will return this initial position (owner for pets and summoned creatures)....
Definition MotionMaster.cpp:259
MotionMaster * GetMotionMaster()
Definition Unit.h:1673
bool HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, float amount, bool apply)
Definition Unit.cpp:15255
void SetUInt32Value(uint16 index, uint32 value)
Definition Unit.cpp:21372
uint8 _summonCountA
Definition boss_arlokk.cpp:293
uint8 _summonCountB
Definition boss_arlokk.cpp:294

References BossAI::_Reset(), _summonCountA, _summonCountB, Unit::GetMotionMaster(), Unit::HandleStatModifier(), ScriptedAI::me, MotionMaster::MoveTargetedHome(), PHASE_TWO, PosMoveOnSpawn, Creature::SetHomePosition(), Unit::SetUInt32Value(), Creature::SetWalk(), TOTAL_PCT, UNIT_MOD_DAMAGE_MAINHAND, UNIT_VIRTUAL_ITEM_SLOT_ID, and WEAPON_DAGGER.

◆ SetData()

void boss_arlokk::boss_arlokkAI::SetData ( uint32  id,
uint32   
)
inlineoverridevirtual

Reimplemented from UnitAI.

170 {
171 if (id == 1)
173 else if (id == 2)
175 }

References _summonCountA, and _summonCountB.

◆ UpdateAI()

void boss_arlokk::boss_arlokkAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

178 {
179 if (!UpdateVictim())
180 return;
181
182 events.Update(diff);
183
185 return;
186
187 while (uint32 eventId = events.ExecuteEvent())
188 {
189 switch (eventId)
190 {
193 events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 5s, 7s, 0, PHASE_ONE);
194 break;
195 case EVENT_GOUGE:
197 break;
200 {
201 if (Unit* trigger = ObjectAccessor::GetUnit(*me, _triggersSideAGUID[urand(0, 4)]))
202 {
203 trigger->CastSpell(trigger, SPELL_SUMMON_PROWLER);
205 }
206 }
208 {
209 if (Unit* trigger = ObjectAccessor::GetUnit(*me, _triggersSideBGUID[urand(0, 4)]))
210 {
211 trigger->CastSpell(trigger, SPELL_SUMMON_PROWLER);
213 }
214 }
215 events.ScheduleEvent(EVENT_SUMMON_PROWLERS, 6s, 0, PHASE_ALL);
216 break;
218 {
219 Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, urand(1, 3), 0.0f, false, true, -SPELL_MARK_OF_ARLOKK);
220 if (!target)
221 target = me->GetVictim();
222 if (target)
223 {
224 DoCast(target, SPELL_MARK_OF_ARLOKK, true);
225 Talk(SAY_FEAST_PROWLER, target);
226 }
227 events.ScheduleEvent(EVENT_MARK_OF_ARLOKK, 120s, 130s);
228 break;
229 }
230 case EVENT_TRANSFORM:
231 {
232 DoCastSelf(SPELL_PANTHER_TRANSFORM); // SPELL_AURA_TRANSFORM
235 me->AttackStop();
241 events.ScheduleEvent(EVENT_VANISH, 1s, 0, PHASE_ONE);
242 break;
243 }
244 case EVENT_VANISH:
246 me->SetWalk(false);
247 me->GetMotionMaster()->MovePoint(0, frand(-11551.0f, -11508.0f), frand(-1638.0f, -1617.0f), me->GetPositionZ());
248 events.ScheduleEvent(EVENT_VANISH_2, 9s, 0, PHASE_ONE);
249 break;
250 case EVENT_VANISH_2:
253 events.ScheduleEvent(EVENT_VISIBLE, 41s, 47s, 0, PHASE_ONE);
254 break;
255 case EVENT_VISIBLE:
259 AttackStart(target);
262 events.ScheduleEvent(EVENT_RAVAGE, 10s, 14s, 0, PHASE_TWO);
263 events.ScheduleEvent(EVENT_TRANSFORM_BACK, 30s, 40s, 0, PHASE_TWO);
264 events.SetPhase(PHASE_TWO);
266 break;
267 case EVENT_RAVAGE:
269 events.ScheduleEvent(EVENT_RAVAGE, 10s, 14s, 0, PHASE_TWO);
270 break;
272 {
273 me->RemoveAura(SPELL_PANTHER_TRANSFORM); // SPELL_AURA_TRANSFORM
278 events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 4s, 7s, 0, PHASE_ONE);
279 events.ScheduleEvent(EVENT_GOUGE, 12s, 15s, 0, PHASE_ONE);
280 events.ScheduleEvent(EVENT_TRANSFORM, 30s, 0, PHASE_ONE);
281 events.SetPhase(PHASE_ONE);
282 break;
283 }
284 default:
285 break;
286 }
287 }
288
290 }
@ EQUIP_UNEQUIP
Definition CreatureAI.h:66
float frand(float min, float max)
Definition Random.cpp:57
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
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:275
@ REACT_PASSIVE
Definition Unit.h:548
@ REACT_AGGRESSIVE
Definition Unit.h:550
@ SAY_FEAST_PROWLER
Definition boss_arlokk.cpp:36
@ MAX_PROWLERS_PER_SIDE
Definition boss_arlokk.cpp:82
@ SPELL_PANTHER_TRANSFORM
Definition boss_arlokk.cpp:47
@ SPELL_SUMMON_PROWLER
Definition boss_arlokk.cpp:48
@ SPELL_RAVAGE
Definition boss_arlokk.cpp:45
@ SPELL_SHADOW_WORD_PAIN
Definition boss_arlokk.cpp:42
@ SPELL_SUPER_INVIS
Definition boss_arlokk.cpp:51
@ SPELL_VANISH
Definition boss_arlokk.cpp:50
@ SPELL_MARK_OF_ARLOKK
Definition boss_arlokk.cpp:44
@ SPELL_GOUGE
Definition boss_arlokk.cpp:43
@ SPELL_VANISH_VISUAL
Definition boss_arlokk.cpp:49
@ EVENT_TRANSFORM_BACK
Definition boss_arlokk.cpp:63
@ EVENT_VISIBLE
Definition boss_arlokk.cpp:64
@ EVENT_VANISH_2
Definition boss_arlokk.cpp:62
@ EVENT_VANISH
Definition boss_arlokk.cpp:61
@ EVENT_RAVAGE
Definition boss_arlokk.cpp:59
bool UpdateVictim()
Definition CreatureAI.cpp:280
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:95
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition MotionMaster.h:213
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:39
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:240
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:392
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:110
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:177
Definition Unit.h:636
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4808
Unit * GetVictim() const
Definition Unit.h:862
bool HasUnitState(const uint32 f) const
Definition Unit.h:707
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:719
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:10448
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:720
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Definition ObjectAccessor.cpp:199
float GetPositionZ() const
Definition Position.h:123
void DoResetThreatList()
Definition ScriptedCreature.cpp:445
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:210

References _summonCountA, _summonCountB, _triggersSideAGUID, _triggersSideBGUID, ScriptedAI::AttackStart(), Unit::AttackStop(), UnitAI::DoCast(), UnitAI::DoCastSelf(), UnitAI::DoCastVictim(), UnitAI::DoMeleeAttackIfReady(), ScriptedAI::DoResetThreatList(), EQUIP_UNEQUIP, EVENT_GOUGE, EVENT_MARK_OF_ARLOKK, EVENT_RAVAGE, EVENT_SHADOW_WORD_PAIN, EVENT_SUMMON_PROWLERS, EVENT_TRANSFORM, EVENT_TRANSFORM_BACK, EVENT_VANISH, EVENT_VANISH_2, EVENT_VISIBLE, frand(), Unit::GetMotionMaster(), Position::GetPositionZ(), ObjectAccessor::GetUnit(), Unit::GetVictim(), Unit::HandleStatModifier(), Unit::HasUnitState(), MAX_PROWLERS_PER_SIDE, MaxThreat, ScriptedAI::me, MotionMaster::MovePoint(), PHASE_ALL, PHASE_ONE, PHASE_TWO, Random, REACT_AGGRESSIVE, REACT_PASSIVE, Unit::RemoveAura(), Unit::RemoveUnitFlag(), SAY_FEAST_PROWLER, UnitAI::SelectTarget(), Creature::SetReactState(), Unit::SetUInt32Value(), Unit::SetUnitFlag(), Creature::SetWalk(), SPELL_GOUGE, SPELL_MARK_OF_ARLOKK, SPELL_PANTHER_TRANSFORM, SPELL_RAVAGE, SPELL_SHADOW_WORD_PAIN, SPELL_SUMMON_PROWLER, SPELL_SUPER_INVIS, SPELL_VANISH, SPELL_VANISH_VISUAL, TOTAL_PCT, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_NOT_SELECTABLE, UNIT_MOD_DAMAGE_MAINHAND, UNIT_STATE_CASTING, UNIT_VIRTUAL_ITEM_SLOT_ID, CreatureAI::UpdateVictim(), urand(), and WEAPON_DAGGER.

Member Data Documentation

◆ _summonCountA

uint8 boss_arlokk::boss_arlokkAI::_summonCountA
private

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

◆ _summonCountB

uint8 boss_arlokk::boss_arlokkAI::_summonCountB
private

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

◆ _triggersSideAGUID

ObjectGuid boss_arlokk::boss_arlokkAI::_triggersSideAGUID[5]
private

Referenced by JustEngagedWith(), and UpdateAI().

◆ _triggersSideBGUID

ObjectGuid boss_arlokk::boss_arlokkAI::_triggersSideBGUID[5]
private

Referenced by JustEngagedWith(), and UpdateAI().


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