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 - this happens after JustEnteredCombat.
 
void KilledUnit (Unit *victim) override
 
void SpellHitTarget (Unit *target, SpellInfo const *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 OnSpellCast (SpellInfo const *spell) override
 
void OnChannelFinished (SpellInfo const *spell) override
 
void OnSpellFailed (SpellInfo const *spell) 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, bool allowedWhileCasting=true)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 
void ProcessHealthCheck ()
 
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 - this happens after JustEnteredCombat.
 
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 (Position const *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
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)
 
Unit * DoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
Player * GetPlayerAtMinimumRange (float minRange)
 
Creature * DoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
T const & DUNGEON_MODE (T const &normal5, T const &heroic10) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25, T const &heroic10, T const &heroic25) const
 
Player * SelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObject * GetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool IsEscortNPC (bool=true) const
 
void JustEnteredCombat (Unit *who) override
 Called when the unit enters combat.
 
virtual void JustStartedThreateningMe (Unit *who)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, 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 *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
Unit * SelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
Unit * SelectTarget (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 OnDespawn ()
 Called when the unit is about to be removed from the world (despawn, grid unload, corpse disappearing, player logging out etc.)
 
virtual void EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
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, int32 aura=0)
 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
Creature * me
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoType * AISpellInfo
 
- 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)
 
Creature * DoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummonFlyer (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
 
bool _isEngaged
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_felmyst()

boss_felmyst::boss_felmyst ( Creature *  creature)
inline
140: BossAI(creature, DATA_FELMYST), _currentLane(0), _strafeCount(0) { }
Definition ScriptedCreature.h:496
uint8 _currentLane
Definition boss_felmyst.cpp:380
uint8 _strafeCount
Definition boss_felmyst.cpp:381
@ DATA_FELMYST
Definition sunwell_plateau.h:31

Member Function Documentation

◆ InitializeAI()

void boss_felmyst::InitializeAI ( )
inlineoverridevirtual

Reimplemented from UnitAI.

143 {
145
147 {
149 me->SetImmuneToPC(true);
150 StartIntro();
151 }
152 else
153 {
154 me->SetCanFly(true);
155 me->SetDisableGravity(true);
157 me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, true);
158 }
159 }
@ TO_BE_DECIDED
Definition InstanceScript.h:63
@ UNIT_STAND_STATE_SLEEP
Definition UnitDefines.h:38
@ REACT_PASSIVE
Definition Unit.h:574
InstanceScript *const instance
Definition ScriptedCreature.h:503
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:99
EncounterState GetBossState(uint32 id) const
Definition InstanceScript.h:252
void MoveWaypoint(uint32 path_id, bool repeatable, PathSource pathSource=PathSource::WAYPOINT_MGR)
Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:1017
uint32 GetEntry() const
Definition Object.h:123
MotionMaster * GetMotionMaster()
Definition Unit.h:1774
void SetCanFly(bool enable)
Add the movement flag: MOVEMENTFLAGCAN_FLY. Generaly only use by players, allowing them to fly by pre...
Definition Unit.cpp:16268
void SendMovementFlagUpdate(bool self=false)
Definition Unit.cpp:12763
void SetDisableGravity(bool disable)
Definition Unit.cpp:16208
void SetImmuneToPC(bool apply, bool keepCombat=false)
Definition Unit.cpp:10423
void SetStandState(uint8 state)
Definition Unit.cpp:12801
Creature * me
Definition ScriptedCreature.h:292
void StartIntro()
Definition boss_felmyst.cpp:347

References DATA_FELMYST, InstanceScript::GetBossState(), Object::GetEntry(), Unit::GetMotionMaster(), BossAI::instance, ScriptedAI::me, MotionMaster::MoveWaypoint(), REACT_PASSIVE, Unit::SendMovementFlagUpdate(), Unit::SetCanFly(), Unit::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.

196 {
197 BossAI::JustDied(killer);
198 me->m_Events.KillAllEvents(false);
201
202 // Summon Kalecgos (human form of kalecgos fight)
204 kalec->GetMotionMaster()->MovePoint(POINT_KALECGOS_FELMYST, KalecgosFelmystLandPos,
205 FORCED_MOVEMENT_NONE, 0.f, false, true);
206 }
@ FORCED_MOVEMENT_NONE
Definition MotionMaster.h:86
@ YELL_DEATH
Definition boss_felmyst.cpp:35
@ SPELL_FOG_OF_CORRUPTION_CHARM
Definition boss_felmyst.cpp:66
void JustDied(Unit *) override
Definition ScriptedCreature.h:538
Definition Creature.h:47
void KillAllEvents(bool force)
Definition EventProcessor.cpp:82
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
Definition InstanceScript.cpp:707
EventProcessor m_Events
Definition Object.h:749
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition Object.cpp:2460
Talk
Definition hyjal.cpp:82
@ POINT_KALECGOS_FELMYST
Definition sunwell_plateau.h:119
Position const KalecgosFelmystSpawnPos
Definition sunwell_plateau.h:122
@ NPC_KALECGOS_FELMYST
Definition sunwell_plateau.h:72
Position const KalecgosFelmystLandPos
Definition sunwell_plateau.h:123

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

◆ JustEngagedWith()

void boss_felmyst::JustEngagedWith ( Unit *  )
inlineoverridevirtual

Called for reaction when initially engaged - this happens after JustEnteredCombat.

Reimplemented from CreatureAI.

171 {
173
175
177
180 me->GetMotionMaster()->MoveLand(POINT_GROUND, landPos);
181 }, 1s);
182 }
@ 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 - this happens after JustEnteredCombat.
Definition ScriptedCreature.h:536
void ScheduleEnrageTimer(uint32 spellId, Milliseconds timer, uint8 textId=0)
Definition ScriptedCreature.cpp:863
void AddEventAtOffset(BasicEvent *event, Milliseconds offset, uint8 eventGroup=0)
Definition EventProcessor.h:108
void Clear(bool reset=true)
Definition MotionMaster.h:194
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.

185 {
186 Talk(YELL_KILL, victim);
187 }
@ YELL_KILL
Definition boss_felmyst.cpp:31

References YELL_KILL.

◆ MovementInform()

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

Reimplemented from CreatureAI.

252 {
253 if (type != EFFECT_MOTION_TYPE && type != POINT_MOTION_TYPE)
254 return;
255
256 switch (point)
257 {
258 case POINT_GROUND:
259
262
265 me->SetCanFly(false);
266 me->SetDisableGravity(false);
268 SetInvincibility(false);
269
272
273 if (me->GetVictim())
275
277 me->SetCombatMovement(true);
278 }, 5s);
279
281 break;
282 case POINT_TAKEOFF:
285 }, 5s);
286
289 }, 17s);
290
292 {
295 else
297 });
298 break;
299 case POINT_AIR_UP:
301 bool isRightSide = me->FindNearestCreature(NPC_WORLD_TRIGGER_RIGHT, 30.0f);
302 if (_strafeCount >= 3)
303 {
304 _strafeCount = 0;
306 return;
307 }
308
309 ++_strafeCount;
310 _currentLane = urand(0, 2);
311 if (isRightSide)
313 else
315 }, 5s);
316 break;
317 case POINT_LANE:
320 {
321 for (uint8 i = 0; i < 16; ++i)
323 }, 5s);
324
327
330 else
332 }, 5s);
333 break;
336
340 else
342 }, 2s);
343 break;
344 }
345 }
std::uint8_t uint8
Definition Define.h:109
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:27
@ 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:1968
@ SPELLVALUE_MAX_TARGETS
Definition SpellDefines.h:125
@ REACT_AGGRESSIVE
Definition Unit.h:576
@ POINT_LANE
Definition boss_felmyst.cpp:78
@ POINT_TAKEOFF
Definition boss_felmyst.cpp:75
@ NPC_WORLD_TRIGGER_RIGHT
Definition boss_felmyst.cpp:89
@ POINT_AIR_UP
Definition boss_felmyst.cpp:77
@ POINT_AIR_BREATH_END
Definition boss_felmyst.cpp:80
@ GROUP_BREATH
Definition boss_felmyst.cpp:85
@ EMOTE_BREATH
Definition boss_felmyst.cpp:36
const Position LeftSideLanes[3]
Definition boss_felmyst.cpp:92
@ 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:99
const Position LeftSide
Definition boss_felmyst.cpp:107
const Position LandingRightPos
Definition boss_felmyst.cpp:109
const Position LandingLeftPos
Definition boss_felmyst.cpp:108
const Position RightSide
Definition boss_felmyst.cpp:106
Definition boss_felmyst.cpp:112
TaskScheduler scheduler
Definition CreatureAI.h:74
void SetTarget(ObjectGuid guid=ObjectGuid::Empty) override
Definition Creature.cpp:3616
void SetCombatMovement(bool allowMovement)
Definition Creature.cpp:3972
void ResumeChasingVictim()
Helper to resume chasing current victim.
Definition Creature.h:438
void MovePoint(uint32 id, Position const &pos, ForcedMovement forcedMovement=FORCED_MOVEMENT_NONE, float speed=0.f, bool generatePath=true, bool forceDestination=true, std::optional< AnimTier > animTier=std::nullopt)
Definition MotionMaster.h:241
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:554
void MoveIdle()
Definition MotionMaster.cpp:235
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:120
Definition TaskScheduler.h:422
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
Definition TaskScheduler.h:233
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:399
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:1435
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5798
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4969
Unit * GetVictim() const
Definition Unit.h:910
void HandleEmoteCommand(uint32 emoteId)
Definition Unit.cpp:2202
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2565
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1304
void SetInvincibility(bool apply)
Definition ScriptedCreature.h:457
void ScheduleGroundAbilities()
Definition boss_felmyst.cpp:208

References _currentLane, _strafeCount, EventProcessor::AddEventAtOffset(), Unit::CastCustomSpell(), UnitAI::DoCastSelf(), EFFECT_MOTION_TYPE, EMOTE_BREATH, EMOTE_ONESHOT_LAND, WorldObject::FindNearestCreature(), FORCED_MOVEMENT_NONE, 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(), Unit::SetCanFly(), Creature::SetCombatMovement(), Unit::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
209 {
210 ScheduleTimedEvent(7500ms, [&] {
212 }, 7500ms);
213
214 ScheduleTimedEvent(13s, 30s, [&] {
216 {
217 Talk(YELL_BREATH);
218 DoCastVictim(SPELL_CORROSION);
219 }
220 }, 30s, 39s);
221
222 ScheduleTimedEvent(18s, 43s, [&] {
225 }, 18s, 43s);
226
227 ScheduleTimedEvent(26s, 53s, [&] {
230 }, 26s, 53s);
231
233 {
237 me->SetTarget();
238 me->AttackStop();
239 me->SetCombatMovement(false);
242 me->SetCanFly(true);
243 me->SetDisableGravity(true);
245 SetInvincibility(true);
248 });
249 }
@ EMOTE_ONESHOT_LIFTOFF
Definition SharedDefines.h:1964
@ GROUP_TAKEOFF
Definition boss_felmyst.cpp:86
@ 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, int32 aura=0)
Cast the spell on a random unit from the threat list.
Definition UnitAI.cpp:297
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:274
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:7270
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=0ms, uint32 uniqueId=0)
Definition ScriptedCreature.cpp:349

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(), Unit::SetCanFly(), Creature::SetCombatMovement(), Unit::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,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

190 {
191 if (spell->Id == SPELL_STRAFE_TOP || spell->Id == SPELL_STRAFE_MIDDLE || spell->Id == SPELL_STRAFE_BOTTOM)
192 target->CastSpell(target, SPELL_FOG_OF_CORRUPTION, true);
193 }
@ 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
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:1378

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.

369 {
370 scheduler.Update(diff);
371
372 if (!UpdateVictim())
373 return;
374
377 }
@ MOVEMENTFLAG_DISABLE_GRAVITY
Definition UnitDefines.h:382
bool UpdateVictim()
Definition CreatureAI.cpp:350
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition TaskScheduler.cpp:27
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:41
bool HasUnitMovementFlag(uint32 f) const
Definition Unit.h:780

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: