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

Public Member Functions

 boss_felmyst (Creature *creature)
 
void InitializeAI () override
 
void Reset () override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged.
 
void KilledUnit (Unit *victim) override
 
void SpellHitTarget (Unit *target, const SpellInfo *spell) override
 
void JustDied (Unit *killer) override
 
void ScheduleGroundAbilities ()
 
void MovementInform (uint32 type, uint32 point) override
 
void StartIntro ()
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
- 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
 Called at any Damage from any attacker (before damage apply)
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec)
 
void ScheduleEnrageTimer (uint32 spellId, Milliseconds timer, uint8 textId=0)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER) override
 
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
 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=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.
 
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 void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureEvade (Creature *)
 
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 ()
 
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 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:
 
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
 

Private Attributes

uint8 _currentLane = 0
 
uint8 _strafeCount = 0
 

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
float callForHelpRange
 
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
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
SummonList summons
 
- 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_felmyst()

boss_felmyst::boss_felmyst ( Creature creature)
inline
143: BossAI(creature, DATA_FELMYST), _currentLane(0), _strafeCount(0) { }
Definition ScriptedCreature.h:467
uint8 _currentLane
Definition boss_felmyst.cpp:382
uint8 _strafeCount
Definition boss_felmyst.cpp:383
@ DATA_FELMYST
Definition sunwell_plateau.h:31

Member Function Documentation

◆ InitializeAI()

void boss_felmyst::InitializeAI ( )
inlineoverridevirtual

Reimplemented from UnitAI.

146 {
148
150 {
152 me->SetImmuneToPC(true);
153 StartIntro();
154 }
155 else
156 {
157 me->SetCanFly(true);
158 me->SetDisableGravity(true);
160 me->GetMotionMaster()->MovePath(me->GetEntry() * 10, true);
161 }
162 }
@ TO_BE_DECIDED
Definition InstanceScript.h:63
@ UNIT_STAND_STATE_SLEEP
Definition UnitDefines.h:35
@ REACT_PASSIVE
Definition Unit.h:548
InstanceScript *const instance
Definition ScriptedCreature.h:474
bool SetDisableGravity(bool disable, bool packetOnly=false, bool updateAnimationTier=true) override
Enable or disable the creature's fly mode by adding or removing: MOVEMENTFLAG_FLYING....
Definition Creature.cpp:3222
bool SetCanFly(bool enable, bool packetOnly=false) override
Add the movement flag: MOVEMENTFLAGCAN_FLY. Generaly only use by players, allowing them to fly by pre...
Definition Creature.cpp:3307
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:95
EncounterState GetBossState(uint32 id) const
Definition InstanceScript.h:242
void MovePath(uint32 path_id, bool repeatable)
Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:852
uint32 GetEntry() const
Definition Object.h:115
MotionMaster * GetMotionMaster()
Definition Unit.h:1673
void SendMovementFlagUpdate(bool self=false)
Definition Unit.cpp:16756
void SetImmuneToPC(bool apply, bool keepCombat=false)
Definition Unit.cpp:13653
void SetStandState(uint8 state)
Definition Unit.cpp:16778
Creature * me
Definition ScriptedCreature.h:280
void StartIntro()
Definition boss_felmyst.cpp:349

References DATA_FELMYST, InstanceScript::GetBossState(), Object::GetEntry(), Unit::GetMotionMaster(), BossAI::instance, ScriptedAI::me, MotionMaster::MovePath(), REACT_PASSIVE, Unit::SendMovementFlagUpdate(), Creature::SetCanFly(), Creature::SetDisableGravity(), Unit::SetImmuneToPC(), Creature::SetReactState(), Unit::SetStandState(), StartIntro(), TO_BE_DECIDED, and UNIT_STAND_STATE_SLEEP.

◆ JustDied()

void boss_felmyst::JustDied ( Unit killer)
inlineoverridevirtual

Reimplemented from CreatureAI.

200 {
201 BossAI::JustDied(killer);
202 me->m_Events.KillAllEvents(false);
205
206 // Summon Kalecgos (human form of kalecgos fight)
207 if (Creature* kalec = me->SummonCreature(NPC_KALECGOS_FELMYST, 1573.1461f, 755.20245f, 99.524956f, 3.595378f))
208 kalec->GetMotionMaster()->MovePoint(POINT_KALECGOS, 1474.2347f, 624.0703f, 29.32589f, false, true);
209 }
@ NPC_KALECGOS_FELMYST
Definition boss_felmyst.cpp:91
@ POINT_KALECGOS
Definition boss_felmyst.cpp:84
@ YELL_DEATH
Definition boss_felmyst.cpp:35
@ SPELL_FOG_OF_CORRUPTION_CHARM
Definition boss_felmyst.cpp:66
void JustDied(Unit *) override
Definition ScriptedCreature.h:505
Definition Creature.h:43
void KillAllEvents(bool force)
Definition EventProcessor.cpp:82
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
Definition InstanceScript.cpp:683
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:2368
EventProcessor m_Events
Definition Object.h:639
Talk
Definition hyjal.cpp:82

References InstanceScript::DoRemoveAurasDueToSpellOnPlayers(), BossAI::instance, BossAI::JustDied(), EventProcessor::KillAllEvents(), WorldObject::m_Events, ScriptedAI::me, NPC_KALECGOS_FELMYST, POINT_KALECGOS, SPELL_FOG_OF_CORRUPTION_CHARM, WorldObject::SummonCreature(), and YELL_DEATH.

◆ JustEngagedWith()

void boss_felmyst::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from CreatureAI.

174 {
176
178
180
183 me->GetMotionMaster()->MoveLand(POINT_GROUND, landPos);
184 }, 1s);
185 }
@ POINT_GROUND
Definition boss_felmyst.cpp:74
@ YELL_BERSERK
Definition boss_felmyst.cpp:34
@ SPELL_BERSERK
Definition boss_felmyst.cpp:45
Position const landPos
Definition boss_nightbane.cpp:110
void JustEngagedWith(Unit *) override
Called for reaction when initially engaged.
Definition ScriptedCreature.h:503
void ScheduleEnrageTimer(uint32 spellId, Milliseconds timer, uint8 textId=0)
Definition ScriptedCreature.cpp:791
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
Definition EventProcessor.h:107
void Clear(bool reset=true)
Definition MotionMaster.h:167
Definition Position.h:27
void GetPosition(float &x, float &y) const
Definition Position.h:126

References EventProcessor::AddEventAtOffset(), MotionMaster::Clear(), Unit::GetMotionMaster(), Position::GetPosition(), BossAI::JustEngagedWith(), landPos, WorldObject::m_Events, ScriptedAI::me, POINT_GROUND, BossAI::ScheduleEnrageTimer(), SPELL_BERSERK, and YELL_BERSERK.

◆ KilledUnit()

void boss_felmyst::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from CreatureAI.

188 {
189 if (victim->IsPlayer() && roll_chance_i(50))
191 }
bool roll_chance_i(int chance)
Definition Random.h:60
@ YELL_KILL
Definition boss_felmyst.cpp:31
bool IsPlayer() const
Definition Object.h:200

References Object::IsPlayer(), roll_chance_i(), and YELL_KILL.

◆ MovementInform()

void boss_felmyst::MovementInform ( uint32  type,
uint32  point 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

255 {
256 if (type != EFFECT_MOTION_TYPE && type != POINT_MOTION_TYPE)
257 return;
258
259 switch (point)
260 {
261 case POINT_GROUND:
262
265
268 me->SetCanFly(false);
269 me->SetDisableGravity(false);
271 SetInvincibility(false);
272
275
276 if (me->GetVictim())
278
280 me->SetCombatMovement(true);
281 }, 5s);
282
284 break;
285 case POINT_TAKEOFF:
288 }, 5s);
289
292 }, 17s);
293
295 {
298 else
300 });
301 break;
302 case POINT_AIR_UP:
304 bool isRightSide = me->FindNearestCreature(NPC_WORLD_TRIGGER_RIGHT, 30.0f);
305 if (_strafeCount >= 3)
306 {
307 _strafeCount = 0;
309 return;
310 }
311
312 ++_strafeCount;
313 _currentLane = urand(0, 2);
314 if (isRightSide)
316 else
318 }, 5s);
319 break;
320 case POINT_LANE:
323 for (uint8 i = 0; i < 16; ++i)
325 }, 5s);
326
329
332 else
334 }, 5s);
335 break;
338
342 else
344 }, 2s);
345 break;
346 }
347 }
std::uint8_t uint8
Definition Define.h:109
@ POINT_MOTION_TYPE
Definition MotionMaster.h:48
@ EFFECT_MOTION_TYPE
Definition MotionMaster.h:56
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
@ EMOTE_ONESHOT_LAND
Definition SharedDefines.h:1964
@ SPELLVALUE_MAX_TARGETS
Definition SpellDefines.h:117
@ REACT_AGGRESSIVE
Definition Unit.h:550
@ POINT_LANE
Definition boss_felmyst.cpp:78
@ POINT_TAKEOFF
Definition boss_felmyst.cpp:75
@ NPC_WORLD_TRIGGER_RIGHT
Definition boss_felmyst.cpp:92
@ POINT_AIR_UP
Definition boss_felmyst.cpp:77
@ POINT_AIR_BREATH_END
Definition boss_felmyst.cpp:80
@ GROUP_BREATH
Definition boss_felmyst.cpp:87
@ EMOTE_BREATH
Definition boss_felmyst.cpp:36
const Position LeftSideLanes[3]
Definition boss_felmyst.cpp:95
@ SPELL_FELMYST_SPEED_BURST
Definition boss_felmyst.cpp:64
@ SPELL_SUMMON_DEMONIC_VAPOR
Definition boss_felmyst.cpp:58
@ SPELL_NOXIOUS_FUMES
Definition boss_felmyst.cpp:42
const Position RightSideLanes[3]
Definition boss_felmyst.cpp:102
const Position LeftSide
Definition boss_felmyst.cpp:110
const Position LandingRightPos
Definition boss_felmyst.cpp:112
const Position LandingLeftPos
Definition boss_felmyst.cpp:111
const Position RightSide
Definition boss_felmyst.cpp:109
Definition boss_felmyst.cpp:115
TaskScheduler scheduler
Definition CreatureAI.h:75
void SetTarget(ObjectGuid guid=ObjectGuid::Empty) override
Definition Creature.cpp:3562
void SetCombatMovement(bool allowMovement)
Definition Creature.cpp:3863
void ResumeChasingVictim()
Helper to resume chasing current victim.
Definition Creature.h:414
void AddEvent(BasicEvent *Event, uint64 e_time, bool set_addtime=true)
Definition EventProcessor.h:103
uint64 CalculateTime(uint64 t_offset) const
Definition EventProcessor.cpp:159
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition MotionMaster.h:213
void MoveLand(uint32 id, Position const &pos, float speed=0.0f)
Use to move the unit from the air to the ground. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:488
void MoveIdle()
Definition MotionMaster.cpp:232
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:112
Definition TaskScheduler.h:421
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
Definition TaskScheduler.h:232
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:392
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:1235
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5753
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4941
Unit * GetVictim() const
Definition Unit.h:862
void HandleEmoteCommand(uint32 emoteId)
Definition Unit.cpp:2011
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2459
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1256
void SetInvincibility(bool apply)
Definition ScriptedCreature.h:442
void ScheduleGroundAbilities()
Definition boss_felmyst.cpp:211

References _currentLane, _strafeCount, EventProcessor::AddEvent(), EventProcessor::AddEventAtOffset(), EventProcessor::CalculateTime(), Unit::CastCustomSpell(), UnitAI::DoCastSelf(), EFFECT_MOTION_TYPE, EMOTE_BREATH, EMOTE_ONESHOT_LAND, WorldObject::FindNearestCreature(), WorldObject::GetDistance(), Object::GetGUID(), Unit::GetMotionMaster(), Unit::GetVictim(), GROUP_BREATH, Unit::HandleEmoteCommand(), Unit::HasAura(), LandingLeftPos, LandingRightPos, LeftSide, LeftSideLanes, WorldObject::m_Events, ScriptedAI::me, MotionMaster::MoveIdle(), MotionMaster::MoveLand(), MotionMaster::MovePoint(), NPC_WORLD_TRIGGER_RIGHT, POINT_AIR_BREATH_END, POINT_AIR_UP, POINT_GROUND, POINT_LANE, POINT_MOTION_TYPE, POINT_TAKEOFF, REACT_AGGRESSIVE, Unit::RemoveAurasDueToSpell(), Creature::ResumeChasingVictim(), RightSide, RightSideLanes, TaskScheduler::Schedule(), ScheduleGroundAbilities(), CreatureAI::scheduler, Unit::SendMovementFlagUpdate(), Creature::SetCanFly(), Creature::SetCombatMovement(), Creature::SetDisableGravity(), ScriptedAI::SetInvincibility(), Creature::SetReactState(), Creature::SetTarget(), SPELL_FELMYST_SPEED_BURST, SPELL_NOXIOUS_FUMES, SPELL_SUMMON_DEMONIC_VAPOR, SPELLVALUE_MAX_TARGETS, and urand().

◆ Reset()

void boss_felmyst::Reset ( )
inlineoverridevirtual

◆ ScheduleGroundAbilities()

void boss_felmyst::ScheduleGroundAbilities ( )
inline
212 {
213 ScheduleTimedEvent(7500ms, [&] {
215 }, 7500ms);
216
217 ScheduleTimedEvent(13s, 30s, [&] {
219 {
220 Talk(YELL_BREATH);
221 DoCastVictim(SPELL_CORROSION);
222 }
223 }, 30s, 39s);
224
225 ScheduleTimedEvent(18s, 43s, [&] {
228 }, 18s, 43s);
229
230 ScheduleTimedEvent(26s, 53s, [&] {
233 }, 26s, 53s);
234
236 {
240 me->SetTarget();
241 me->AttackStop();
242 me->SetCombatMovement(false);
245 me->SetCanFly(true);
246 me->SetDisableGravity(true);
248 SetInvincibility(true);
251 });
252 }
@ EMOTE_ONESHOT_LIFTOFF
Definition SharedDefines.h:1960
@ GROUP_TAKEOFF
Definition boss_felmyst.cpp:88
@ YELL_TAKEOFF
Definition boss_felmyst.cpp:33
@ SPELL_CLEAVE
Definition boss_felmyst.cpp:46
@ SPELL_GAS_NOVA
Definition boss_felmyst.cpp:48
@ SPELL_ENCAPSULATE_CHANNEL
Definition boss_felmyst.cpp:49
TaskScheduler & CancelAll()
Definition TaskScheduler.cpp:45
Milliseconds GetNextGroupOccurrence(group_t const group) const
Definition TaskScheduler.cpp:127
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.
Definition UnitAI.cpp:259
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:240
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:10448
float GetPositionZ() const
Definition Position.h:123
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122
void ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
Definition ScriptedCreature.cpp:321

References Unit::AttackStop(), TaskScheduler::CancelAll(), MotionMaster::Clear(), UnitAI::DoCastRandomTarget(), UnitAI::DoCastSelf(), UnitAI::DoCastVictim(), EMOTE_ONESHOT_LIFTOFF, Unit::GetMotionMaster(), TaskScheduler::GetNextGroupOccurrence(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GROUP_TAKEOFF, Unit::HandleEmoteCommand(), ScriptedAI::me, MotionMaster::MoveIdle(), MotionMaster::MovePoint(), POINT_TAKEOFF, REACT_PASSIVE, TaskScheduler::Schedule(), CreatureAI::scheduler, ScriptedAI::ScheduleTimedEvent(), Unit::SendMovementFlagUpdate(), Creature::SetCanFly(), Creature::SetCombatMovement(), Creature::SetDisableGravity(), ScriptedAI::SetInvincibility(), Creature::SetReactState(), Creature::SetTarget(), SPELL_CLEAVE, SPELL_ENCAPSULATE_CHANNEL, SPELL_GAS_NOVA, and YELL_TAKEOFF.

Referenced by MovementInform().

◆ SpellHitTarget()

void boss_felmyst::SpellHitTarget ( Unit target,
const SpellInfo spell 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

194 {
195 if (spell->Id == SPELL_STRAFE_TOP || spell->Id == SPELL_STRAFE_MIDDLE || spell->Id == SPELL_STRAFE_BOTTOM)
196 target->CastSpell(target, SPELL_FOG_OF_CORRUPTION, true);
197 }
@ SPELL_FOG_OF_CORRUPTION
Definition boss_felmyst.cpp:65
@ SPELL_STRAFE_TOP
Definition boss_felmyst.cpp:55
@ SPELL_STRAFE_BOTTOM
Definition boss_felmyst.cpp:57
@ SPELL_STRAFE_MIDDLE
Definition boss_felmyst.cpp:56
uint32 Id
Definition SpellInfo.h:320
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:1178

References Unit::CastSpell(), SpellInfo::Id, SPELL_FOG_OF_CORRUPTION, SPELL_STRAFE_BOTTOM, SPELL_STRAFE_MIDDLE, and SPELL_STRAFE_TOP.

◆ StartIntro()

◆ UpdateAI()

void boss_felmyst::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

371 {
372 scheduler.Update(diff);
373
374 if (!UpdateVictim())
375 return;
376
379 }
@ MOVEMENTFLAG_DISABLE_GRAVITY
Definition UnitDefines.h:375
bool UpdateVictim()
Definition CreatureAI.cpp:280
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition TaskScheduler.cpp:27
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:39
bool HasUnitMovementFlag(uint32 f) const
Definition Unit.h:745

References UnitAI::DoMeleeAttackIfReady(), Unit::HasUnitMovementFlag(), ScriptedAI::me, MOVEMENTFLAG_DISABLE_GRAVITY, CreatureAI::scheduler, TaskScheduler::Update(), and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _currentLane

uint8 boss_felmyst::_currentLane = 0
private

Referenced by MovementInform(), and Reset().

◆ _strafeCount

uint8 boss_felmyst::_strafeCount = 0
private

Referenced by MovementInform(), and Reset().


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