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. More...
 
void MoveInLineOfSight (Unit *who) override
 
void JustReachedHome () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
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) More...
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
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. More...
 
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. More...
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon. More...
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
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. More...
 
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 SummonedCreatureEvade (Creature *)
 
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
 Called when unit is charmed. More...
 
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 ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
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 AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
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)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following: More...
 
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. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_palehoofAI()

boss_palehoof::boss_palehoofAI::boss_palehoofAI ( Creature pCreature)
inline
123 : ScriptedAI(pCreature), summons(me)
124 {
125 m_pInstance = pCreature->GetInstanceScript();
126 }
Definition: ScriptedCreature.h:190
Creature * me
Definition: ScriptedCreature.h:280
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
SummonList summons
Definition: boss_palehoof.cpp:130
InstanceScript * m_pInstance
Definition: boss_palehoof.cpp:128

References WorldObject::GetInstanceScript(), and m_pInstance.

Member Function Documentation

◆ DoAction()

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

Reimplemented from UnitAI.

191 {
192 if (param == ACTION_START_EVENT)
193 {
194 if (Creature* cr = me->SummonCreature(NPC_ORB_TRIGGER, 238.608f, -460.71f, 109.567f))
195 {
196 OrbGUID = cr->GetGUID();
197 cr->AddAura(SPELL_ORB_VISUAL, cr);
198 summons.Summon(cr);
199 cr->SetDisableGravity(true);
200 cr->GetMotionMaster()->MovePoint(0, 275.4f, -453, 110); // ROOM CENTER
201 events.RescheduleEvent(EVENT_UNFREEZE_MONSTER, 10s);
204 }
205 }
206 else if (param == ACTION_MINIBOSS_DIED)
207 {
208 if (Counter > (IsHeroic() ? 3 : 1))
209 events.RescheduleEvent(EVENT_PALEHOOF_START, 3s);
210 else
211 events.RescheduleEvent(EVENT_UNFREEZE_MONSTER, 3s);
212 }
213 }
events
Definition: boss_sartura.cpp:43
@ SPELL_ORB_VISUAL
Definition: boss_palehoof.cpp:30
@ NPC_ORB_TRIGGER
Definition: boss_palehoof.cpp:32
@ ACTION_START_EVENT
Definition: boss_palehoof.cpp:71
@ ACTION_MINIBOSS_DIED
Definition: boss_palehoof.cpp:74
@ EVENT_UNFREEZE_MONSTER
Definition: boss_palehoof.cpp:80
@ EVENT_PALEHOOF_START
Definition: boss_palehoof.cpp:84
@ UNIT_STATE_STUNNED
Definition: UnitDefines.h:152
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:88
bool IsHeroic() const
Definition: ScriptedCreature.h:379
Definition: Creature.h:43
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition: Creature.cpp:2811
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:2366
void SetControlled(bool apply, UnitState state, Unit *source=nullptr, bool isFear=false)
Definition: Unit.cpp:18034
uint8 Counter
Definition: boss_palehoof.cpp:132
ObjectGuid OrbGUID
Definition: boss_palehoof.cpp:131

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

323 {
325 if (m_pInstance)
327 }
@ SOUND_DEATH
Definition: boss_palehoof.cpp:27
@ DATA_GORTOK_PALEHOOF
Definition: utgarde_pinnacle.h:30
@ DONE
Definition: InstanceScript.h:60
void PlayDirectSound(uint32 sound_id, Player *target=nullptr)
Definition: Object.cpp:2903
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52

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

215 {
216 if (m_pInstance)
218 }
@ IN_PROGRESS
Definition: InstanceScript.h:58

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

◆ JustReachedHome()

void boss_palehoof::boss_palehoofAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

229 {
231 }
@ UNIT_STAND_STATE_STAND
Definition: UnitDefines.h:32
void SetStandState(uint8 state)
Definition: Unit.cpp:16726

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

◆ KilledUnit()

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

Reimplemented from ScriptedAI.

330 {
331 if (!victim->IsPlayer())
332 return;
333
334 Talk(SAY_SLAY);
335 }
Talk
Definition: hyjal.cpp:82
@ SAY_SLAY
Definition: boss_palehoof.cpp:26
bool IsPlayer() const
Definition: Object.h:200

References Object::IsPlayer(), and SAY_SLAY.

◆ MoveInLineOfSight()

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

Reimplemented from CreatureAI.

221 {
223 return;
224
226 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
virtual void MoveInLineOfSight(Unit *)
Definition: CreatureAI.cpp:169
bool HasUnitFlag(UnitFlags flags) const
Definition: Unit.h:712

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

◆ Reset()

void boss_palehoof::boss_palehoofAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

136 {
137 for (uint8 i = 0; i < 4; ++i)
138 {
139 bool good;
140 do
141 {
142 good = true;
143 RandomUnfreeze[i] = urand(0, 3);
144
145 for (uint8 j = 0; j < i; ++j)
146 if (RandomUnfreeze[i] == RandomUnfreeze[j])
147 {
148 good = false;
149 break;
150 }
151 } while (!good);
152 }
153
154 events.Reset();
157 OrbGUID.Clear();
158 Counter = 0;
159 me->CastSpell(me, SPELL_FREEZE, true);
162
163 if (m_pInstance)
164 {
166
167 // Reset statue
169 {
170 statisGenerator->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
171 statisGenerator->SetGoState(GO_STATE_READY);
172 }
173
174 // Reset mini bosses
175 for(uint8 i = 0; i < 4; ++i)
176 {
178 {
179 Animal->SetPosition(Animal->GetHomePosition());
180 Animal->StopMovingOnCurrentPos();
181 if (Animal->isDead())
182 Animal->Respawn(true);
183
184 Animal->CastSpell(Animal, SPELL_FREEZE, true);
185 }
186 }
187 }
188 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
std::uint8_t uint8
Definition: Define.h:109
@ SPELL_FREEZE
Definition: boss_palehoof.cpp:41
@ ACTION_DESPAWN_ADDS
Definition: boss_palehoof.cpp:73
@ DATA_NPC_FRENZIED_WORGEN
Definition: utgarde_pinnacle.h:35
@ STATIS_GENERATOR
Definition: utgarde_pinnacle.h:41
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1607
@ NOT_STARTED
Definition: InstanceScript.h:57
@ GO_STATE_READY
Definition: GameObjectData.h:690
@ UNIT_FLAG_NOT_SELECTABLE
Definition: UnitDefines.h:254
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:210
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
void DoAction(int32 info, uint16 max=0)
Definition: ScriptedCreature.h:102
Definition: GameObject.h:120
void Clear()
Definition: ObjectGuid.h:138
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:1167
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:713
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:98
Map * instance
Definition: InstanceScript.h:148
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3322
uint8 RandomUnfreeze[4]
Definition: boss_palehoof.cpp:133

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

Reimplemented from ScriptedAI.

234 {
235 if (!UpdateVictim())
236 return;
237
238 events.Update(diff);
239 switch (events.ExecuteEvent())
240 {
242 {
244 {
246 {
247 Counter++;
248 miniBoss->AI()->DoAction(ACTION_UNFREEZE);
249 orb->CastSpell(miniBoss, SPELL_AWAKEN_SUBBOSS, true);
250 events.ScheduleEvent(EVENT_UNFREEZE_MONSTER2, 6s);
251 }
252 else
254 }
255 break;
256 }
258 {
260 {
262 {
263 miniBoss->AI()->DoAction(ACTION_UNFREEZE2);
264 orb->RemoveAurasDueToSpell(SPELL_AWAKEN_SUBBOSS);
265 }
266 else
268 }
269 break;
270 }
272 {
274 {
275 orb->CastSpell(me, SPELL_AWAKEN_SUBBOSS, true);
276 events.ScheduleEvent(EVENT_PALEHOOF_START2, 6s);
277 }
278 break;
279 }
281 {
284 orb->RemoveAurasDueToSpell(SPELL_AWAKEN_SUBBOSS);
285
289 // SETINCOMBATWITHZONE
290
291 // schedule combat events
292 events.ScheduleEvent(EVENT_PALEHOOF_WITHERING_ROAR, 10s);
293 events.ScheduleEvent(EVENT_PALEHOOF_IMPALE, 12s);
294 events.ScheduleEvent(EVENT_PALEHOOF_ARCING_SMASH, 15s);
295 break;
296 }
298 {
300 events.Repeat(8s, 12s);
301 break;
302 }
304 {
305 if (Unit* tgt = SelectTarget(SelectTargetMethod::Random, 0))
307
308 events.Repeat(8s, 12s);
309 break;
310 }
312 {
314 events.Repeat(13s, 17s);
315 break;
316 }
317 }
318
320 }
@ SPELL_WITHERING_ROAR_H
Definition: boss_palehoof.cpp:40
@ SAY_AGGRO
Definition: boss_palehoof.cpp:25
@ SPELL_WITHERING_ROAR_N
Definition: boss_palehoof.cpp:39
@ ACTION_UNFREEZE2
Definition: boss_palehoof.cpp:75
@ ACTION_UNFREEZE
Definition: boss_palehoof.cpp:72
@ SPELL_IMPALE_H
Definition: boss_palehoof.cpp:38
@ SPELL_ARCING_SMASH
Definition: boss_palehoof.cpp:36
@ SPELL_IMPALE_N
Definition: boss_palehoof.cpp:37
@ SPELL_AWAKEN_SUBBOSS
Definition: boss_palehoof.cpp:33
@ EVENT_PALEHOOF_ARCING_SMASH
Definition: boss_palehoof.cpp:88
@ EVENT_PALEHOOF_IMPALE
Definition: boss_palehoof.cpp:87
@ EVENT_PALEHOOF_START2
Definition: boss_palehoof.cpp:85
@ EVENT_UNFREEZE_MONSTER2
Definition: boss_palehoof.cpp:82
@ EVENT_PALEHOOF_WITHERING_ROAR
Definition: boss_palehoof.cpp:86
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
bool UpdateVictim()
Definition: CreatureAI.cpp:280
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:208
Definition: Unit.h:630
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4909
Unit * GetVictim() const
Definition: Unit.h:853
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:714

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(), ScriptedAI::IsHeroic(), m_pInstance, ScriptedAI::me, OrbGUID, RandomUnfreeze, Unit::RemoveAurasDueToSpell(), Unit::RemoveUnitFlag(), SAY_AGGRO, UnitAI::SelectTarget(), Unit::SetControlled(), SPELL_ARCING_SMASH, SPELL_AWAKEN_SUBBOSS, SPELL_FREEZE, SPELL_IMPALE_H, SPELL_IMPALE_N, SPELL_WITHERING_ROAR_H, SPELL_WITHERING_ROAR_N, 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().