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
 
- 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
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent.
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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
 
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
 

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
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
bool _ProccessHealthCheckEvent (uint8 healthPct, uint32 damage, std::function< void()> exec) const
 
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
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- 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_arlokkAI()

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

Member Function Documentation

◆ EnterEvadeMode()

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

Reimplemented from CreatureAI.

159 {
161
162 std::list<Creature*> panthers;
164 for (auto const& panther : panthers)
165 panther->DespawnOrUnsummon();
166 }
void GetCreatureListWithEntryInGrid(std::list< Creature * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
Definition: ScriptedCreature.cpp:775
@ NPC_ZULIAN_PROWLER
Definition: zulgurub.h:51
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:197
Creature * me
Definition: ScriptedCreature.h:282

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

◆ JustDied()

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

Reimplemented from BossAI.

113 {
114 _JustDied();
116 }
@ SAY_DEATH
Definition: boss_arlokk.cpp:36
Talk
Definition: boss_fathomlord_karathress.cpp:23
void _JustDied()
Definition: ScriptedCreature.cpp:585

References BossAI::_JustDied(), and SAY_DEATH.

◆ JustEngagedWith()

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

Called for reaction when initially engaged.

Reimplemented from BossAI.

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

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

152 {
154 object->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
156 }
@ GO_GONG_OF_BETHEKK
Definition: zulgurub.h:78
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1579
GameObject * GetGameObject(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:189
InstanceScript *const instance
Definition: ScriptedCreature.h:461
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2108
Definition: GameObject.h:122
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:94

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

99 {
100 if (events.IsInPhase(PHASE_TWO))
102 _Reset();
103 _summonCountA = 0;
104 _summonCountB = 0;
107 me->SetWalk(false);
110 }
std::uint32_t uint32
Definition: Define.h:108
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition: UpdateFields.h:116
@ UNIT_MOD_DAMAGE_MAINHAND
Definition: Unit.h:284
@ TOTAL_PCT
Definition: Unit.h:248
@ PHASE_TWO
Definition: boss_arlokk.cpp:71
Position const PosMoveOnSpawn[1]
Definition: boss_arlokk.cpp:84
@ WEAPON_DAGGER
Definition: boss_arlokk.cpp:76
void _Reset()
Definition: ScriptedCreature.cpp:570
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:328
bool SetWalk(bool enable) override
Definition: Creature.cpp:3081
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:650
MotionMaster * GetMotionMaster()
Definition: Unit.h:2262
bool HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, float amount, bool apply)
Definition: Unit.cpp:15095
void MoveTargetedHome(bool walk=false)
Definition: MotionMaster.cpp:251
uint8 _summonCountA
Definition: boss_arlokk.cpp:292
uint8 _summonCountB
Definition: boss_arlokk.cpp:293

References BossAI::_Reset(), _summonCountA, _summonCountB, Unit::GetMotionMaster(), Unit::HandleStatModifier(), ScriptedAI::me, MotionMaster::MoveTargetedHome(), PHASE_TWO, PosMoveOnSpawn, Creature::SetHomePosition(), Object::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.

169 {
170 if (id == 1)
172 else if (id == 2)
174 }

References _summonCountA, and _summonCountB.

◆ UpdateAI()

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

Reimplemented from BossAI.

177 {
178 if (!UpdateVictim())
179 return;
180
181 events.Update(diff);
182
184 return;
185
186 while (uint32 eventId = events.ExecuteEvent())
187 {
188 switch (eventId)
189 {
192 events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 5s, 7s, 0, PHASE_ONE);
193 break;
194 case EVENT_GOUGE:
196 break;
199 {
200 if (Unit* trigger = ObjectAccessor::GetUnit(*me, _triggersSideAGUID[urand(0, 4)]))
201 {
202 trigger->CastSpell(trigger, SPELL_SUMMON_PROWLER);
204 }
205 }
207 {
208 if (Unit* trigger = ObjectAccessor::GetUnit(*me, _triggersSideBGUID[urand(0, 4)]))
209 {
210 trigger->CastSpell(trigger, SPELL_SUMMON_PROWLER);
212 }
213 }
214 events.ScheduleEvent(EVENT_SUMMON_PROWLERS, 6s, 0, PHASE_ALL);
215 break;
217 {
218 Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, urand(1, 3), 0.0f, false, true, -SPELL_MARK_OF_ARLOKK);
219 if (!target)
220 target = me->GetVictim();
221 if (target)
222 {
223 DoCast(target, SPELL_MARK_OF_ARLOKK, true);
224 Talk(SAY_FEAST_PROWLER, target);
225 }
226 events.ScheduleEvent(EVENT_MARK_OF_ARLOKK, 120s, 130s);
227 break;
228 }
229 case EVENT_TRANSFORM:
230 {
231 DoCastSelf(SPELL_PANTHER_TRANSFORM); // SPELL_AURA_TRANSFORM
234 me->AttackStop();
240 events.ScheduleEvent(EVENT_VANISH, 1s, 0, PHASE_ONE);
241 break;
242 }
243 case EVENT_VANISH:
245 me->SetWalk(false);
246 me->GetMotionMaster()->MovePoint(0, frand(-11551.0f, -11508.0f), frand(-1638.0f, -1617.0f), me->GetPositionZ());
247 events.ScheduleEvent(EVENT_VANISH_2, 9s, 0, PHASE_ONE);
248 break;
249 case EVENT_VANISH_2:
252 events.ScheduleEvent(EVENT_VISIBLE, 41s, 47s, 0, PHASE_ONE);
253 break;
254 case EVENT_VISIBLE:
257 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
258 AttackStart(target);
261 events.ScheduleEvent(EVENT_RAVAGE, 10s, 14s, 0, PHASE_TWO);
262 events.ScheduleEvent(EVENT_TRANSFORM_BACK, 30s, 40s, 0, PHASE_TWO);
263 events.SetPhase(PHASE_TWO);
265 break;
266 case EVENT_RAVAGE:
268 events.ScheduleEvent(EVENT_RAVAGE, 10s, 14s, 0, PHASE_TWO);
269 break;
271 {
272 me->RemoveAura(SPELL_PANTHER_TRANSFORM); // SPELL_AURA_TRANSFORM
277 events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 4s, 7s, 0, PHASE_ONE);
278 events.ScheduleEvent(EVENT_GOUGE, 12s, 15s, 0, PHASE_ONE);
279 events.ScheduleEvent(EVENT_TRANSFORM, 30s, 0, PHASE_ONE);
280 events.SetPhase(PHASE_ONE);
281 break;
282 }
283 default:
284 break;
285 }
286 }
287
289 }
float frand(float min, float max)
Definition: Random.cpp:57
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ EQUIP_UNEQUIP
Definition: CreatureAI.h:66
@ REACT_PASSIVE
Definition: Unit.h:1023
@ REACT_AGGRESSIVE
Definition: Unit.h:1025
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ UNIT_FLAG_NON_ATTACKABLE
Definition: Unit.h:449
@ UNIT_FLAG_NOT_SELECTABLE
Definition: Unit.h:473
@ SAY_FEAST_PROWLER
Definition: boss_arlokk.cpp:35
@ MAX_PROWLERS_PER_SIDE
Definition: boss_arlokk.cpp:81
@ SPELL_PANTHER_TRANSFORM
Definition: boss_arlokk.cpp:46
@ SPELL_SUMMON_PROWLER
Definition: boss_arlokk.cpp:47
@ SPELL_RAVAGE
Definition: boss_arlokk.cpp:44
@ SPELL_SHADOW_WORD_PAIN
Definition: boss_arlokk.cpp:41
@ SPELL_SUPER_INVIS
Definition: boss_arlokk.cpp:50
@ SPELL_VANISH
Definition: boss_arlokk.cpp:49
@ SPELL_MARK_OF_ARLOKK
Definition: boss_arlokk.cpp:43
@ SPELL_GOUGE
Definition: boss_arlokk.cpp:42
@ SPELL_VANISH_VISUAL
Definition: boss_arlokk.cpp:48
@ EVENT_TRANSFORM_BACK
Definition: boss_arlokk.cpp:62
@ EVENT_VISIBLE
Definition: boss_arlokk.cpp:63
@ EVENT_VANISH_2
Definition: boss_arlokk.cpp:61
@ EVENT_VANISH
Definition: boss_arlokk.cpp:60
@ EVENT_RAVAGE
Definition: boss_arlokk.cpp:58
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:204
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:241
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition: UnitAI.h:369
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:111
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:178
bool UpdateVictim()
Definition: CreatureAI.cpp:269
void DoResetThreatList()
Definition: ScriptedCreature.cpp:411
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:206
void SetReactState(ReactStates st)
Definition: Creature.h:89
float GetPositionZ() const
Definition: Position.h:119
Definition: Unit.h:1290
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4708
Unit * GetVictim() const
Definition: Unit.h:1386
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:1481
bool AttackStop()
Definition: Unit.cpp:10368
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:1482
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h: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, ScriptedAI::me, MotionMaster::MovePoint(), PHASE_ALL, PHASE_ONE, PHASE_TWO, REACT_AGGRESSIVE, REACT_PASSIVE, Unit::RemoveAura(), Unit::RemoveUnitFlag(), SAY_FEAST_PROWLER, UnitAI::SelectTarget(), Creature::SetReactState(), Object::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().