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

Public Member Functions

 boss_palehoofAI (Creature *pCreature)
 
void Reset () override
 
void DoAction (int32 param) override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void MoveInLineOfSight (Unit *who) override
 
void JustReachedHome () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *victim) 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=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, 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=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellCastFinished (SpellInfo const *, SpellFinishReason)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast.
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

InstanceScriptm_pInstance
 
EventMap events
 
SummonList summons
 
ObjectGuid OrbGUID
 
uint8 Counter
 
uint8 RandomUnfreeze [4]
 
- Public Attributes inherited from ScriptedAI
Creatureme
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_palehoofAI()

boss_palehoof::boss_palehoofAI::boss_palehoofAI ( Creature pCreature)
inline
115 : ScriptedAI(pCreature), summons(me)
116 {
117 m_pInstance = pCreature->GetInstanceScript();
118 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1221
Definition ScriptedCreature.h:190
Creature * me
Definition ScriptedCreature.h:280
SummonList summons
Definition boss_palehoof.cpp:122
InstanceScript * m_pInstance
Definition boss_palehoof.cpp:120

References WorldObject::GetInstanceScript(), and m_pInstance.

Member Function Documentation

◆ DoAction()

void boss_palehoof::boss_palehoofAI::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

183 {
184 if (param == ACTION_START_EVENT)
185 {
186 if (Creature* cr = me->SummonCreature(NPC_ORB_TRIGGER, 238.608f, -460.71f, 109.567f))
187 {
188 OrbGUID = cr->GetGUID();
189 cr->AddAura(SPELL_ORB_VISUAL, cr);
190 summons.Summon(cr);
191 cr->SetDisableGravity(true);
192 cr->GetMotionMaster()->MovePoint(0, 275.4f, -453, 110); // ROOM CENTER
193 events.RescheduleEvent(EVENT_UNFREEZE_MONSTER, 10s);
196 }
197 }
198 else if (param == ACTION_MINIBOSS_DIED)
199 {
200 if (Counter > (IsHeroic() ? 3 : 1))
201 events.RescheduleEvent(EVENT_PALEHOOF_START, 3s);
202 else
203 events.RescheduleEvent(EVENT_UNFREEZE_MONSTER, 3s);
204 }
205 }
@ UNIT_STATE_STUNNED
Definition UnitDefines.h:173
@ SPELL_ORB_VISUAL
Definition boss_palehoof.cpp:30
@ NPC_ORB_TRIGGER
Definition boss_palehoof.cpp:32
@ ACTION_START_EVENT
Definition boss_palehoof.cpp:63
@ ACTION_MINIBOSS_DIED
Definition boss_palehoof.cpp:66
@ EVENT_UNFREEZE_MONSTER
Definition boss_palehoof.cpp:72
@ EVENT_PALEHOOF_START
Definition boss_palehoof.cpp:76
events
Definition boss_sartura.cpp:43
Definition Creature.h:47
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition Creature.cpp:2829
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
void SetControlled(bool apply, UnitState state, Unit *source=nullptr, bool isFear=false)
Definition Unit.cpp:18074
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition Object.cpp:2359
bool IsHeroic() const
Definition ScriptedCreature.h:379
uint8 Counter
Definition boss_palehoof.cpp:124
ObjectGuid OrbGUID
Definition boss_palehoof.cpp:123

References ACTION_MINIBOSS_DIED, ACTION_START_EVENT, Counter, EVENT_PALEHOOF_START, EVENT_UNFREEZE_MONSTER, ScriptedAI::IsHeroic(), ScriptedAI::me, NPC_ORB_TRIGGER, OrbGUID, Unit::SetControlled(), Creature::SetInCombatWithZone(), SPELL_ORB_VISUAL, SummonList::Summon(), WorldObject::SummonCreature(), summons, and UNIT_STATE_STUNNED.

◆ JustDied()

void boss_palehoof::boss_palehoofAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

315 {
317 if (m_pInstance)
319 }
@ DONE
Definition InstanceScript.h:61
@ SOUND_DEATH
Definition boss_palehoof.cpp:27
void PlayDirectSound(uint32 sound_id, Player *target=nullptr)
Definition Object.cpp:2908
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
@ DATA_GORTOK_PALEHOOF
Definition utgarde_pinnacle.h:30

References DATA_GORTOK_PALEHOOF, DONE, m_pInstance, ScriptedAI::me, WorldObject::PlayDirectSound(), ZoneScript::SetData(), and SOUND_DEATH.

◆ JustEngagedWith()

void boss_palehoof::boss_palehoofAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from CreatureAI.

207 {
208 if (m_pInstance)
210 }
@ IN_PROGRESS
Definition InstanceScript.h:59

References DATA_GORTOK_PALEHOOF, IN_PROGRESS, m_pInstance, and ZoneScript::SetData().

◆ JustReachedHome()

void boss_palehoof::boss_palehoofAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

221 {
223 }
@ UNIT_STAND_STATE_STAND
Definition UnitDefines.h:32
void SetStandState(uint8 state)
Definition Unit.cpp:16752

References ScriptedAI::me, Unit::SetStandState(), and UNIT_STAND_STATE_STAND.

◆ KilledUnit()

void boss_palehoof::boss_palehoofAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from CreatureAI.

322 {
323 if (!victim->IsPlayer())
324 return;
325
326 Talk(SAY_SLAY);
327 }
@ SAY_SLAY
Definition boss_palehoof.cpp:26
bool IsPlayer() const
Definition Object.h:201
Talk
Definition hyjal.cpp:82

References Object::IsPlayer(), and SAY_SLAY.

◆ MoveInLineOfSight()

void boss_palehoof::boss_palehoofAI::MoveInLineOfSight ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

213 {
215 return;
216
218 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:255
virtual void MoveInLineOfSight(Unit *)
Definition CreatureAI.cpp:176
bool HasUnitFlag(UnitFlags flags) const
Definition Unit.h:732

References Unit::HasUnitFlag(), ScriptedAI::me, CreatureAI::MoveInLineOfSight(), and UNIT_FLAG_NON_ATTACKABLE.

◆ Reset()

void boss_palehoof::boss_palehoofAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

128 {
129 for (uint8 i = 0; i < 4; ++i)
130 {
131 bool good;
132 do
133 {
134 good = true;
135 RandomUnfreeze[i] = urand(0, 3);
136
137 for (uint8 j = 0; j < i; ++j)
138 if (RandomUnfreeze[i] == RandomUnfreeze[j])
139 {
140 good = false;
141 break;
142 }
143 } while (!good);
144 }
145
146 events.Reset();
149 OrbGUID.Clear();
150 Counter = 0;
151 me->CastSpell(me, SPELL_FREEZE, true);
154
155 if (m_pInstance)
156 {
158
159 // Reset statue
161 {
162 statisGenerator->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
163 statisGenerator->SetGoState(GO_STATE_READY);
164 }
165
166 // Reset mini bosses
167 for(uint8 i = 0; i < 4; ++i)
168 {
170 {
171 Animal->SetPosition(Animal->GetHomePosition());
172 Animal->StopMovingOnCurrentPos();
173 if (Animal->isDead())
174 Animal->Respawn(true);
175
176 Animal->CastSpell(Animal, SPELL_FREEZE, true);
177 }
178 }
179 }
180 }
std::uint8_t uint8
Definition Define.h:109
@ GO_STATE_READY
Definition GameObjectData.h:692
@ NOT_STARTED
Definition InstanceScript.h:58
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
@ GO_FLAG_NOT_SELECTABLE
Definition SharedDefines.h:1618
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:279
@ SPELL_FREEZE
Definition boss_palehoof.cpp:39
@ ACTION_DESPAWN_ADDS
Definition boss_palehoof.cpp:65
Definition GameObject.h:120
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:110
Map * instance
Definition InstanceScript.h:149
GameObject * GetGameObject(ObjectGuid const &guid)
Definition Map.cpp:2362
void Clear()
Definition ObjectGuid.h:138
void DoAction(int32 info, uint16 max=0)
Definition ScriptedCreature.h:102
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:71
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:1194
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:733
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:210
uint8 RandomUnfreeze[4]
Definition boss_palehoof.cpp:125
@ DATA_NPC_FRENZIED_WORGEN
Definition utgarde_pinnacle.h:35
@ STATIS_GENERATOR
Definition utgarde_pinnacle.h:41

References ACTION_DESPAWN_ADDS, Unit::CastSpell(), ObjectGuid::Clear(), Counter, DATA_GORTOK_PALEHOOF, DATA_NPC_FRENZIED_WORGEN, SummonList::DespawnAll(), SummonList::DoAction(), ObjectAccessor::GetCreature(), Map::GetGameObject(), InstanceScript::GetGuidData(), GO_FLAG_NOT_SELECTABLE, GO_STATE_READY, InstanceScript::instance, m_pInstance, ScriptedAI::me, NOT_STARTED, OrbGUID, RandomUnfreeze, Unit::SetControlled(), ZoneScript::SetData(), Unit::SetUnitFlag(), SPELL_FREEZE, STATIS_GENERATOR, summons, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_NOT_SELECTABLE, UNIT_STATE_STUNNED, and urand().

◆ UpdateAI()

void boss_palehoof::boss_palehoofAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

226 {
227 if (!UpdateVictim())
228 return;
229
230 events.Update(diff);
231 switch (events.ExecuteEvent())
232 {
234 {
236 {
238 {
239 Counter++;
240 miniBoss->AI()->DoAction(ACTION_UNFREEZE);
241 orb->CastSpell(miniBoss, SPELL_AWAKEN_SUBBOSS, true);
242 events.ScheduleEvent(EVENT_UNFREEZE_MONSTER2, 6s);
243 }
244 else
246 }
247 break;
248 }
250 {
252 {
254 {
255 miniBoss->AI()->DoAction(ACTION_UNFREEZE2);
256 orb->RemoveAurasDueToSpell(SPELL_AWAKEN_SUBBOSS);
257 }
258 else
260 }
261 break;
262 }
264 {
266 {
267 orb->CastSpell(me, SPELL_AWAKEN_SUBBOSS, true);
268 events.ScheduleEvent(EVENT_PALEHOOF_START2, 6s);
269 }
270 break;
271 }
273 {
276 orb->RemoveAurasDueToSpell(SPELL_AWAKEN_SUBBOSS);
277
281 // SETINCOMBATWITHZONE
282
283 // schedule combat events
284 events.ScheduleEvent(EVENT_PALEHOOF_WITHERING_ROAR, 10s);
285 events.ScheduleEvent(EVENT_PALEHOOF_IMPALE, 12s);
286 events.ScheduleEvent(EVENT_PALEHOOF_ARCING_SMASH, 15s);
287 break;
288 }
290 {
292 events.Repeat(8s, 12s);
293 break;
294 }
296 {
298 me->CastSpell(tgt, SPELL_IMPALE, false);
299
300 events.Repeat(8s, 12s);
301 break;
302 }
304 {
306 events.Repeat(13s, 17s);
307 break;
308 }
309 }
310
312 }
@ SPELL_WITHERING_ROAR
Definition boss_palehoof.cpp:38
@ SAY_AGGRO
Definition boss_palehoof.cpp:25
@ ACTION_UNFREEZE2
Definition boss_palehoof.cpp:67
@ ACTION_UNFREEZE
Definition boss_palehoof.cpp:64
@ SPELL_ARCING_SMASH
Definition boss_palehoof.cpp:36
@ SPELL_AWAKEN_SUBBOSS
Definition boss_palehoof.cpp:33
@ SPELL_IMPALE
Definition boss_palehoof.cpp:37
@ EVENT_PALEHOOF_ARCING_SMASH
Definition boss_palehoof.cpp:80
@ EVENT_PALEHOOF_IMPALE
Definition boss_palehoof.cpp:79
@ EVENT_PALEHOOF_START2
Definition boss_palehoof.cpp:77
@ EVENT_UNFREEZE_MONSTER2
Definition boss_palehoof.cpp:74
@ EVENT_PALEHOOF_WITHERING_ROAR
Definition boss_palehoof.cpp:78
bool UpdateVictim()
Definition CreatureAI.cpp:287
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:215
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:39
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:110
Definition Unit.h:650
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4977
Unit * GetVictim() const
Definition Unit.h:886
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:734

References ACTION_UNFREEZE, ACTION_UNFREEZE2, Unit::CastSpell(), Counter, DATA_NPC_FRENZIED_WORGEN, UnitAI::DoMeleeAttackIfReady(), CreatureAI::EnterEvadeMode(), EVENT_PALEHOOF_ARCING_SMASH, EVENT_PALEHOOF_IMPALE, EVENT_PALEHOOF_START, EVENT_PALEHOOF_START2, EVENT_PALEHOOF_WITHERING_ROAR, EVENT_UNFREEZE_MONSTER, EVENT_UNFREEZE_MONSTER2, ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), Unit::GetVictim(), m_pInstance, ScriptedAI::me, OrbGUID, Random, RandomUnfreeze, Unit::RemoveAurasDueToSpell(), Unit::RemoveUnitFlag(), SAY_AGGRO, UnitAI::SelectTarget(), Unit::SetControlled(), SPELL_ARCING_SMASH, SPELL_AWAKEN_SUBBOSS, SPELL_FREEZE, SPELL_IMPALE, SPELL_WITHERING_ROAR, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_NOT_SELECTABLE, UNIT_STATE_STUNNED, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ Counter

uint8 boss_palehoof::boss_palehoofAI::Counter

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

◆ events

EventMap boss_palehoof::boss_palehoofAI::events

◆ m_pInstance

InstanceScript* boss_palehoof::boss_palehoofAI::m_pInstance

◆ OrbGUID

ObjectGuid boss_palehoof::boss_palehoofAI::OrbGUID

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

◆ RandomUnfreeze

uint8 boss_palehoof::boss_palehoofAI::RandomUnfreeze[4]

Referenced by Reset(), and UpdateAI().

◆ summons

SummonList boss_palehoof::boss_palehoofAI::summons

Referenced by DoAction(), and Reset().


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