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

Public Member Functions

 boss_leotheras_the_blindAI (Creature *creature)
 
void Reset () override
 
void InitializeAI () override
 
void JustReachedHome () override
 
void SummonChannelers ()
 
void MoveInLineOfSight (Unit *) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDies (Creature *summon, Unit *) override
 
void KilledUnit (Unit *) override
 
void JustDied (Unit *killer) override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged.
 
void AttackStart (Unit *who) 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
 

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

boss_leotheras_the_blind::boss_leotheras_the_blindAI::boss_leotheras_the_blindAI ( Creature creature)
inline
96 {
97 }
@ DATA_LEOTHERAS_THE_BLIND
Definition: serpent_shrine.h:36
Definition: ScriptedCreature.h:456

Member Function Documentation

◆ AttackStart()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::AttackStart ( Unit who)
inlineoverridevirtual

Reimplemented from ScriptedAI.

182 {
183 if (who && me->Attack(who, true))
184 me->GetMotionMaster()->MoveChase(who, me->GetDisplayId() == me->GetNativeDisplayId() ? 0.0f : 25.0f);
185 }
Creature * me
Definition: ScriptedCreature.h:282
MotionMaster * GetMotionMaster()
Definition: Unit.h:2262
uint32 GetDisplayId() const
Definition: Unit.h:2168
uint32 GetNativeDisplayId() const
Definition: Unit.h:2170
bool Attack(Unit *victim, bool meleeAttack)
Definition: Unit.cpp:10245
void MoveChase(Unit *target, std::optional< ChaseRange > dist={}, std::optional< ChaseAngle > angle={})
Definition: MotionMaster.cpp:299

References Unit::Attack(), Unit::GetDisplayId(), Unit::GetMotionMaster(), Unit::GetNativeDisplayId(), ScriptedAI::me, and MotionMaster::MoveChase().

◆ InitializeAI()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::InitializeAI ( )
inlineoverridevirtual

Reimplemented from UnitAI.

110 {
113 }
virtual void InitializeAI()
Definition: UnitAI.h:193
void SummonChannelers()
Definition: boss_leotheras_the_blind.cpp:121

References UnitAI::InitializeAI(), and SummonChannelers().

◆ JustDied()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::JustDied ( Unit killer)
inlineoverridevirtual

Reimplemented from BossAI.

169 {
172 BossAI::JustDied(killer);
173 }
@ SPELL_CLEAR_CONSUMING_MADNESS
Definition: boss_leotheras_the_blind.cpp:52
Talk
Definition: boss_leotheras_the_blind.cpp:24
@ SAY_DEATH
Definition: boss_leotheras_the_blind.cpp:31
void JustDied(Unit *) override
Definition: ScriptedCreature.h:484
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:1169

References Unit::CastSpell(), BossAI::JustDied(), ScriptedAI::me, SAY_DEATH, and SPELL_CLEAR_CONSUMING_MADNESS.

◆ JustEngagedWith()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

176 {
179 }
@ UNIT_STAND_STATE_KNEEL
Definition: Unit.h:61
void JustEngagedWith(Unit *) override
Called for reaction when initially engaged.
Definition: ScriptedCreature.h:483
void SetStandState(uint8 state)
Definition: Unit.cpp:16900

References BossAI::JustEngagedWith(), ScriptedAI::me, Unit::SetStandState(), and UNIT_STAND_STATE_KNEEL.

◆ JustReachedHome()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from BossAI.

116 {
119 }
void JustReachedHome() override
Definition: ScriptedCreature.h:485

References BossAI::JustReachedHome(), and SummonChannelers().

◆ JustSummoned()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

135 {
136 summons.Summon(summon);
137 }
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90
SummonList summons
Definition: ScriptedCreature.h:497

References SummonList::Summon(), and BossAI::summons.

◆ KilledUnit()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

160 {
161 if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
162 {
164 events.ScheduleEvent(EVENT_KILL_TALK, 6000);
165 }
166 }
events
Definition: boss_sartura.cpp:43
@ EVENT_KILL_TALK
Definition: boss_leotheras_the_blind.cpp:67
@ SAY_DEMON_SLAY
Definition: boss_leotheras_the_blind.cpp:28
@ SAY_NIGHTELF_SLAY
Definition: boss_leotheras_the_blind.cpp:29

References EVENT_KILL_TALK, Unit::GetDisplayId(), Unit::GetNativeDisplayId(), ScriptedAI::me, SAY_DEMON_SLAY, and SAY_NIGHTELF_SLAY.

◆ MoveInLineOfSight()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

132{ }

◆ Reset()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

100 {
105 me->LoadEquipment(0, true);
107 }
@ REACT_PASSIVE
Definition: Unit.h:1023
@ SPELL_DUAL_WIELD
Definition: boss_leotheras_the_blind.cpp:36
void Reset() override
Definition: ScriptedCreature.h:482
void LoadEquipment(int8 id=1, bool force=false)
Definition: Creature.cpp:1777
void SetReactState(ReactStates st)
Definition: Creature.h:89

References Unit::CastSpell(), Creature::LoadEquipment(), ScriptedAI::me, REACT_PASSIVE, BossAI::Reset(), Creature::SetReactState(), Unit::SetStandState(), SPELL_CLEAR_CONSUMING_MADNESS, SPELL_DUAL_WIELD, and UNIT_STAND_STATE_KNEEL.

◆ SummonChannelers()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::SummonChannelers ( )
inline
122 {
124 me->CastSpell(me, SPELL_BANISH, true);
126
128 for (uint8 i = 0; i < MAX_CHANNELERS; ++i)
130 }
std::uint8_t uint8
Definition: Define.h:110
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: Object.h:47
const Position channelersPos[MAX_CHANNELERS]
Definition: boss_leotheras_the_blind.cpp:76
@ NPC_GREYHEART_SPELLBINDER
Definition: boss_leotheras_the_blind.cpp:60
@ MAX_CHANNELERS
Definition: boss_leotheras_the_blind.cpp:58
@ SPELL_BANISH
Definition: boss_leotheras_the_blind.cpp:37
@ MECHANIC_BANISH
Definition: SharedDefines.h:1315
@ IMMUNITY_MECHANIC
Definition: SharedDefines.h:1371
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:67
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:2318
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition: Unit.cpp:13300

References Unit::ApplySpellImmune(), Unit::CastSpell(), channelersPos, SummonList::DespawnAll(), IMMUNITY_MECHANIC, MAX_CHANNELERS, ScriptedAI::me, MECHANIC_BANISH, NPC_GREYHEART_SPELLBINDER, SPELL_BANISH, WorldObject::SummonCreature(), BossAI::summons, and TEMPSUMMON_CORPSE_TIMED_DESPAWN.

Referenced by InitializeAI(), and JustReachedHome().

◆ SummonedCreatureDies()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::SummonedCreatureDies ( Creature summon,
Unit  
)
inlineoverridevirtual

Reimplemented from CreatureAI.

140 {
142 summons.Despawn(summon);
143 if (summon->GetEntry() == NPC_GREYHEART_SPELLBINDER)
145 {
147 me->LoadEquipment();
151
152 events.ScheduleEvent(EVENT_SPELL_BERSERK, 600000);
153 events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000);
154 events.ScheduleEvent(EVENT_SWITCH_TO_DEMON, 55000);
155 events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 10000);
156 }
157 }
@ REACT_AGGRESSIVE
Definition: Unit.h:1025
@ UNIT_STAND_STATE_STAND
Definition: Unit.h:53
@ EVENT_SWITCH_TO_DEMON
Definition: boss_leotheras_the_blind.cpp:65
@ EVENT_SPELL_WHIRLWIND
Definition: boss_leotheras_the_blind.cpp:66
@ EVENT_SPELL_BERSERK
Definition: boss_leotheras_the_blind.cpp:63
@ EVENT_HEALTH_CHECK
Definition: boss_leotheras_the_blind.cpp:64
@ SAY_AGGRO
Definition: boss_leotheras_the_blind.cpp:25
bool HasEntry(uint32 entry) const
Definition: ScriptedCreature.cpp:89
void Despawn(Creature const *summon)
Definition: ScriptedCreature.h:91
void SetInCombatWithZone()
Definition: Creature.cpp:2723
uint32 GetEntry() const
Definition: Object.h:109
void RemoveAllAuras()
Definition: Unit.cpp:5239

References SummonList::Despawn(), EVENT_HEALTH_CHECK, EVENT_SPELL_BERSERK, EVENT_SPELL_WHIRLWIND, EVENT_SWITCH_TO_DEMON, Object::GetEntry(), SummonList::HasEntry(), Creature::LoadEquipment(), ScriptedAI::me, NPC_GREYHEART_SPELLBINDER, REACT_AGGRESSIVE, Unit::RemoveAllAuras(), SAY_AGGRO, Creature::SetInCombatWithZone(), Creature::SetReactState(), Unit::SetStandState(), BossAI::summons, and UNIT_STAND_STATE_STAND.

◆ UpdateAI()

void boss_leotheras_the_blind::boss_leotheras_the_blindAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

188 {
189 if (!UpdateVictim())
190 return;
191
192 events.Update(diff);
194 return;
195
196 switch (events.ExecuteEvent())
197 {
199 me->CastSpell(me, SPELL_BERSERK, true);
200 break;
202 if (me->HealthBelowPct(15))
203 {
205 {
207 me->LoadEquipment();
209 events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 10000);
210 }
211 events.CancelEvent(EVENT_SWITCH_TO_DEMON);
213 events.DelayEvents(10000);
214 events.ScheduleEvent(EVENT_SUMMON_DEMON, 4000);
215 events.ScheduleEvent(EVENT_RESTORE_FIGHT, 6000);
219 me->StopMoving();
221 break;
222 }
223 events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000);
224 break;
228 me->LoadEquipment(0, true);
229 me->GetMotionMaster()->MoveChase(me->GetVictim(), 25.0f);
231
232 events.CancelEvent(EVENT_SPELL_WHIRLWIND);
233 events.ScheduleEvent(EVENT_SPELL_INSIDIOUS_WHISPER, 25000);
234 events.ScheduleEvent(EVENT_SWITCH_TO_ELF, 60000);
235 break;
238 me->LoadEquipment();
241 events.ScheduleEvent(EVENT_SWITCH_TO_DEMON, 55000);
242 events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 10000);
243 break;
245 me->CastSpell(me, SPELL_WHIRLWIND, false);
246 events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 27000);
247 break;
251 break;
254 break;
259 break;
260 }
261
264 else if (me->isAttackReady(BASE_ATTACK))
265 {
268 }
269 }
@ BASE_ATTACK
Definition: Unit.h:396
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ SPELLVALUE_MAX_TARGETS
Definition: SpellDefines.h:118
@ EVENT_SPELL_INSIDIOUS_WHISPER
Definition: boss_leotheras_the_blind.cpp:69
@ EVENT_RESTORE_FIGHT
Definition: boss_leotheras_the_blind.cpp:71
@ EVENT_SUMMON_DEMON
Definition: boss_leotheras_the_blind.cpp:70
@ EVENT_SWITCH_TO_ELF
Definition: boss_leotheras_the_blind.cpp:68
@ SPELL_METAMORPHOSIS
Definition: boss_leotheras_the_blind.cpp:47
@ SPELL_CHAOS_BLAST
Definition: boss_leotheras_the_blind.cpp:44
@ SPELL_BERSERK
Definition: boss_leotheras_the_blind.cpp:39
@ SPELL_WHIRLWIND
Definition: boss_leotheras_the_blind.cpp:40
@ SPELL_SUMMON_SHADOW_OF_LEOTHERAS
Definition: boss_leotheras_the_blind.cpp:41
@ SPELL_INSIDIOUS_WHISPER
Definition: boss_leotheras_the_blind.cpp:46
@ SAY_SWITCH_TO_DEMON
Definition: boss_leotheras_the_blind.cpp:26
@ SAY_FINAL_FORM
Definition: boss_leotheras_the_blind.cpp:30
@ SAY_INNER_DEMONS
Definition: boss_leotheras_the_blind.cpp:27
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
bool UpdateVictim()
Definition: CreatureAI.cpp:269
void DoResetThreatList()
Definition: ScriptedCreature.cpp:411
void setAttackTimer(WeaponAttackType type, int32 time)
Definition: Unit.h:1340
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1226
void StopMoving()
Definition: Unit.cpp:16824
bool HealthBelowPct(int32 pct) const
Definition: Unit.h:1444
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4835
Unit * GetVictim() const
Definition: Unit.h:1386
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition: Unit.h:1343
void Clear(bool reset=true)
Definition: MotionMaster.h:165

References BASE_ATTACK, Unit::CastCustomSpell(), Unit::CastSpell(), MotionMaster::Clear(), UnitAI::DoMeleeAttackIfReady(), ScriptedAI::DoResetThreatList(), EVENT_HEALTH_CHECK, EVENT_RESTORE_FIGHT, EVENT_SPELL_BERSERK, EVENT_SPELL_INSIDIOUS_WHISPER, EVENT_SPELL_WHIRLWIND, EVENT_SUMMON_DEMON, EVENT_SWITCH_TO_DEMON, EVENT_SWITCH_TO_ELF, Unit::GetDisplayId(), Unit::GetMotionMaster(), Unit::GetNativeDisplayId(), Unit::GetVictim(), Unit::HasUnitState(), Unit::HealthBelowPct(), Unit::isAttackReady(), Creature::LoadEquipment(), ScriptedAI::me, MotionMaster::MoveChase(), REACT_AGGRESSIVE, REACT_PASSIVE, Unit::RemoveAurasDueToSpell(), SAY_FINAL_FORM, SAY_INNER_DEMONS, SAY_SWITCH_TO_DEMON, Unit::setAttackTimer(), Creature::SetReactState(), Unit::SetStandState(), SPELL_BERSERK, SPELL_CHAOS_BLAST, SPELL_INSIDIOUS_WHISPER, SPELL_METAMORPHOSIS, SPELL_SUMMON_SHADOW_OF_LEOTHERAS, SPELL_WHIRLWIND, SPELLVALUE_MAX_TARGETS, Unit::StopMoving(), UNIT_STAND_STATE_KNEEL, UNIT_STAND_STATE_STAND, UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().