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

Public Member Functions

 boss_eregosAI (Creature *c)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
void JustDied (Unit *) override
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply) More...
 
void KilledUnit (Unit *) override
 
void MoveInLineOfSight (Unit *) override
 
void JustSummoned (Creature *pSummon) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
- 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
 
- 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)
 
 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

InstanceScriptpInstance
 
EventMap events
 
uint8 shiftNumber
 
- 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_eregosAI()

boss_eregos::boss_eregosAI::boss_eregosAI ( Creature c)
inline
82 : ScriptedAI(c)
83 {
85 }
Definition: ScriptedCreature.h:190
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
InstanceScript * pInstance
Definition: boss_eregos.cpp:87

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ DamageTaken()

void boss_eregos::boss_eregosAI::DamageTaken ( Unit ,
uint32 ,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Called at any Damage from any attacker (before damage apply)

Note
It use for recalculation damage or special reaction at damage for attack reaction use AttackedBy called for non DOT damage in Unit::DealDamage also

Reimplemented from ScriptedAI.

150 {
151 if (!me->GetMap()->IsHeroic())
152 return;
153
154 if (shiftNumber <= uint32(1) && uint32(me->GetHealth() * 100 / me->GetMaxHealth()) <= uint32(60 - shiftNumber * 40))
155 {
156 ++shiftNumber;
157 events.RescheduleEvent(EVENT_SPELL_PLANAR_SHIFT, 0ms);
158 }
159 }
std::uint32_t uint32
Definition: Define.h:107
@ EVENT_SPELL_PLANAR_SHIFT
Definition: boss_eregos.cpp:55
events
Definition: boss_sartura.cpp:43
Creature * me
Definition: ScriptedCreature.h:280
Map * GetMap() const
Definition: Object.h:531
uint32 GetMaxHealth() const
Definition: Unit.h:870
uint32 GetHealth() const
Definition: Unit.h:869
bool IsHeroic() const
Definition: Map.h:452
uint8 shiftNumber
Definition: boss_eregos.cpp:89

References EVENT_SPELL_PLANAR_SHIFT, Unit::GetHealth(), WorldObject::GetMap(), Unit::GetMaxHealth(), Map::IsHeroic(), ScriptedAI::me, and shiftNumber.

◆ JustDied()

void boss_eregos::boss_eregosAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

140 {
142
143 if (pInstance)
145
146 me->SummonGameObject(GO_SPOTLIGHT, 1018.06f, 1051.09f, 605.619019f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0);
147 }
@ DONE
Definition: InstanceScript.h:60
@ GO_SPOTLIGHT
Definition: oculus.h:86
@ DATA_EREGOS
Definition: oculus.h:37
@ SAY_DEATH
Definition: boss_eregos.cpp:66
Talk
Definition: hyjal.cpp:82
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport=true, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition: Object.cpp:2369
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

References DATA_EREGOS, DONE, GO_SPOTLIGHT, ScriptedAI::me, pInstance, SAY_DEATH, ZoneScript::SetData(), and WorldObject::SummonGameObject().

◆ JustEngagedWith()

void boss_eregos::boss_eregosAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from ScriptedAI.

106 {
108
109 if (pInstance)
110 {
112
113 if (me->FindNearestCreature(NPC_AMBER_DRAKE, 750.0f, true))
115 else
117
118 if (me->FindNearestCreature(NPC_EMERALD_DRAKE, 750.0f, true))
120 else
122
123 if (me->FindNearestCreature(NPC_RUBY_DRAKE, 750.0f, true))
125 else
127 }
128
130
131 shiftNumber = 0;
132
133 events.RescheduleEvent(EVENT_SPELL_ARCANE_BARRAGE, 0ms);
134 events.RescheduleEvent(EVENT_SPELL_ARCANE_VOLLEY, 5s);
135 events.RescheduleEvent(EVENT_SPELL_ENRAGED_ASSAULT, 35s);
136 events.RescheduleEvent(EVENT_SUMMON_WHELPS, 40s);
137 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ NPC_AMBER_DRAKE
Definition: oculus.h:59
@ NPC_EMERALD_DRAKE
Definition: oculus.h:60
@ NPC_RUBY_DRAKE
Definition: oculus.h:61
@ DATA_EMERALD_VOID
Definition: oculus.h:41
@ DATA_AMBER_VOID
Definition: oculus.h:40
@ DATA_RUBY_VOID
Definition: oculus.h:42
@ SAY_AGGRO
Definition: boss_eregos.cpp:63
@ EVENT_SPELL_ENRAGED_ASSAULT
Definition: boss_eregos.cpp:54
@ EVENT_SPELL_ARCANE_BARRAGE
Definition: boss_eregos.cpp:52
@ EVENT_SPELL_ARCANE_VOLLEY
Definition: boss_eregos.cpp:53
@ EVENT_SUMMON_WHELPS
Definition: boss_eregos.cpp:56
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition: Creature.cpp:2806
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446

References DATA_AMBER_VOID, DATA_EMERALD_VOID, DATA_EREGOS, DATA_RUBY_VOID, EVENT_SPELL_ARCANE_BARRAGE, EVENT_SPELL_ARCANE_VOLLEY, EVENT_SPELL_ENRAGED_ASSAULT, EVENT_SUMMON_WHELPS, WorldObject::FindNearestCreature(), IN_PROGRESS, ScriptedAI::me, NPC_AMBER_DRAKE, NPC_EMERALD_DRAKE, NPC_RUBY_DRAKE, pInstance, SAY_AGGRO, ZoneScript::SetData(), Creature::SetInCombatWithZone(), and shiftNumber.

◆ JustSummoned()

void boss_eregos::boss_eregosAI::JustSummoned ( Creature pSummon)
inlineoverridevirtual

Reimplemented from ScriptedAI.

169 {
170 if (pSummon->GetEntry() != NPC_LEY_GUARDIAN_WHELP )
171 return;
172
173 DoZoneInCombat(pSummon, 300.0f);
174 }
@ NPC_LEY_GUARDIAN_WHELP
Definition: boss_eregos.cpp:46
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:95
uint32 GetEntry() const
Definition: Object.h:112

References CreatureAI::DoZoneInCombat(), Object::GetEntry(), and NPC_LEY_GUARDIAN_WHELP.

◆ KilledUnit()

void boss_eregos::boss_eregosAI::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

162 {
163 Talk(SAY_KILL);
164 }
@ SAY_KILL
Definition: boss_eregos.cpp:65

References SAY_KILL.

◆ MoveInLineOfSight()

void boss_eregos::boss_eregosAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

166{}

◆ Reset()

void boss_eregos::boss_eregosAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

92 {
93 if (pInstance)
94 {
98 else
100 }
101
102 events.Reset();
103 }
@ NOT_STARTED
Definition: InstanceScript.h:57
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
@ DATA_UROM
Definition: oculus.h:36
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:683
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:684
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:52

References DATA_EREGOS, DATA_UROM, DONE, ZoneScript::GetData(), ScriptedAI::me, NOT_STARTED, pInstance, Unit::RemoveUnitFlag(), ZoneScript::SetData(), Unit::SetUnitFlag(), and UNIT_FLAG_NON_ATTACKABLE.

◆ UpdateAI()

void boss_eregos::boss_eregosAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Reimplemented from ScriptedAI.

177 {
178 if (!UpdateVictim())
179 return;
180
182 return;
183
184 events.Update(diff);
185
187 return;
188
190
191 switch (events.ExecuteEvent())
192 {
193 case 0:
194 break;
196 if (Unit* v = me->GetVictim())
198 events.Repeat(2500ms);
199 break;
202 events.Repeat(8s);
203 break;
207 events.Repeat(35s);
208 break;
210 for( uint8 i = 0; i < 5; ++i )
211 events.ScheduleEvent(EVENT_SUMMON_SINGLE_WHELP, urand(0, 8000));
212 events.Repeat(40s);
213 break;
215 {
216 float x = rand_norm() * 50.0f - 25.0f;
217 float y = rand_norm() * 50.0f - 25.0f;
218 float z = rand_norm() * 50.0f - 25.0f;
220 }
221 break;
223 //me->Yell(TEXT_PLANAR_SHIFT_SAY, LANG_UNIVERSAL);
226 for( uint8 i = 0; i < 3; ++i )
227 if (Unit* t = SelectTarget(SelectTargetMethod::Random, 0, 300.0f, false))
229 {
230 pa->SetCanFly(true);
231 pa->SetDisableGravity(true);
232 pa->SendMovementFlagUpdate();
233 pa->CastSpell(pa, SPELL_PLANAR_AURA_VISUAL, true);
234 pa->CastSpell(pa, SPELL_PLANAR_AURA_DAMAGE, true);
235 if (Aura* a = pa->GetAura(SPELL_PLANAR_AURA_DAMAGE))
236 a->SetDuration(15000);
237 if (pa->AI())
238 {
239 pa->AI()->AttackStart(t);
240 pa->GetMotionMaster()->MoveChase(t, 0.01f);
241 }
242 }
243 break;
244 }
245 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
double rand_norm()
Definition: Random.cpp:77
std::uint8_t uint8
Definition: Define.h:109
@ UNIT_STATE_CASTING
Definition: UnitDefines.h:164
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:47
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: Object.h:48
#define SPELL_ARCANE_BARRAGE
Definition: boss_eregos.cpp:41
@ SAY_SHIELD
Definition: boss_eregos.cpp:67
@ SAY_ENRAGE
Definition: boss_eregos.cpp:64
#define SPELL_ARCANE_VOLLEY
Definition: boss_eregos.cpp:42
@ SPELL_ENRAGED_ASSAULT
Definition: boss_eregos.cpp:29
@ SPELL_DRAKE_STOP_TIME
Definition: boss_eregos.cpp:38
@ SPELL_PLANAR_AURA_DAMAGE
Definition: boss_eregos.cpp:33
@ SPELL_PLANAR_AURA_VISUAL
Definition: boss_eregos.cpp:34
@ SPELL_PLANAR_SHIFT
Definition: boss_eregos.cpp:31
@ EVENT_SUMMON_SINGLE_WHELP
Definition: boss_eregos.cpp:57
@ NPC_PLANAR_ANOMALY
Definition: boss_eregos.cpp:47
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:269
Definition: Creature.h:46
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:2355
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Definition: Unit.h:630
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5669
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:1168
Unit * GetVictim() const
Definition: Unit.h:789
bool HasUnitState(const uint32 f) const
Definition: Unit.h:673
Definition: SpellAuras.h:87

References Unit::CastSpell(), UnitAI::DoMeleeAttackIfReady(), EVENT_SPELL_ARCANE_BARRAGE, EVENT_SPELL_ARCANE_VOLLEY, EVENT_SPELL_ENRAGED_ASSAULT, EVENT_SPELL_PLANAR_SHIFT, EVENT_SUMMON_SINGLE_WHELP, EVENT_SUMMON_WHELPS, Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::GetVictim(), Unit::HasAura(), Unit::HasUnitState(), ScriptedAI::me, NPC_LEY_GUARDIAN_WHELP, NPC_PLANAR_ANOMALY, rand_norm(), SAY_ENRAGE, SAY_SHIELD, UnitAI::SelectTarget(), SPELL_ARCANE_BARRAGE, SPELL_ARCANE_VOLLEY, SPELL_DRAKE_STOP_TIME, SPELL_ENRAGED_ASSAULT, SPELL_PLANAR_AURA_DAMAGE, SPELL_PLANAR_AURA_VISUAL, SPELL_PLANAR_SHIFT, WorldObject::SummonCreature(), TEMPSUMMON_TIMED_DESPAWN, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, UNIT_STATE_CASTING, CreatureAI::UpdateVictim(), and urand().

Member Data Documentation

◆ events

EventMap boss_eregos::boss_eregosAI::events

◆ pInstance

InstanceScript* boss_eregos::boss_eregosAI::pInstance

◆ shiftNumber

uint8 boss_eregos::boss_eregosAI::shiftNumber

Referenced by DamageTaken(), and JustEngagedWith().