TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boss_felmyst::boss_felmystAI Struct Reference

Public Member Functions

 boss_felmystAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void EnterCombat (Unit *) override
 
void AttackStart (Unit *who) override
 
void MoveInLineOfSight (Unit *who) override
 
void KilledUnit (Unit *) override
 
void JustRespawned () override
 
void JustDied (Unit *) override
 
void SpellHit (Unit *caster, const SpellInfo *spell) override
 
void JustSummoned (Creature *summon) override
 
void MovementInform (uint32, uint32) override
 
void DamageTaken (Unit *, uint32 &damage) override
 
void EnterPhase (PhaseFelmyst NextPhase)
 
void HandleFlightSequence ()
 
void UpdateAI (uint32 diff) override
 
void DespawnSummons (uint32 entry)
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void OnPossess (bool)
 
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 DoResetThreat ()
 
float DoGetThreat (Unit *unit)
 
void DoModifyThreatPercent (Unit *unit, int32 pct)
 
void DoTeleportTo (float x, float y, float z, uint32 time=0)
 
void DoTeleportTo (float const pos[4])
 
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 constSelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, 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
 
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
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
 CreatureAI (Creature *creature)
 
virtual ~CreatureAI ()
 
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 IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted () const
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=NULL, float maxRangeToNearestTarget=50.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 void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary constGetBoundary () const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
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 (SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectAggroTarget targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectAggroTarget targetType)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
void DoCast (uint32 spellId)
 
void DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
void DoCastVictim (uint32 spellId, bool triggered=false)
 
void DoCastAOE (uint32 spellId, bool triggered=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
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 sQuestReward (Player *, Quest const *, uint32)
 
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
 
virtual void sOnGameEvent (bool, uint16)
 

Public Attributes

InstanceScriptinstance
 
PhaseFelmyst phase
 
EventMap events
 
uint32 uiFlightCount
 
uint32 uiBreathCount
 
float breathX
 
float breathY
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason { EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_SEQUENCE_BREAK, EVADE_REASON_OTHER }
 
- 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)
 
bool CheckBoundary (Position const *who=nullptr) const
 
void SetBoundary (CreatureBoundary const *boundary)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

boss_felmyst::boss_felmystAI::boss_felmystAI ( Creature creature)
inline
117  : ScriptedAI(creature)
118  {
119  Initialize();
120  instance = creature->GetInstanceScript();
121  uiBreathCount = 0;
122  breathX = 0.f;
123  breathY = 0.f;
124  }
ScriptedAI(Creature *creature)
Definition: ScriptedCreature.cpp:100
float breathX
Definition: boss_felmyst.cpp:139
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
float breathY
Definition: boss_felmyst.cpp:139
InstanceScript * instance
Definition: boss_felmyst.cpp:132
void Initialize()
Definition: boss_felmyst.cpp:126
uint32 uiBreathCount
Definition: boss_felmyst.cpp:137

+ Here is the call graph for this function:

Member Function Documentation

void boss_felmyst::boss_felmystAI::AttackStart ( Unit who)
inlineoverridevirtual

Reimplemented from ScriptedAI.

171  {
172  if (phase != PHASE_FLIGHT)
174  }
Definition: boss_felmyst.cpp:91
PhaseFelmyst phase
Definition: boss_felmyst.cpp:133
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:117

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_felmyst::boss_felmystAI::DamageTaken ( Unit ,
uint32 damage 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

239  {
240  if (phase != PHASE_GROUND && damage >= me->GetHealth())
241  damage = 0;
242  }
Creature *const me
Definition: CreatureAI.h:71
PhaseFelmyst phase
Definition: boss_felmyst.cpp:133
Definition: boss_felmyst.cpp:90
uint32 GetHealth() const
Definition: Unit.h:1426

+ Here is the call graph for this function:

void boss_felmyst::boss_felmystAI::DespawnSummons ( uint32  entry)
inline
483  {
484  std::list<Creature*> templist;
485  float x, y, z;
486  me->GetPosition(x, y, z);
487 
489  Cell cell(pair);
490  cell.SetNoCreate();
491 
495  cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
496 
497  for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
498  {
499  if (entry == NPC_VAPOR_TRAIL && phase == PHASE_FLIGHT)
500  {
501  (*i)->GetPosition(x, y, z);
503  }
504  (*i)->SetVisible(false);
505  (*i)->setDeathState(JUST_DIED);
506  if ((*i)->getDeathState() == CORPSE)
507  (*i)->RemoveCorpse();
508  }
509  }
float GetGridActivationRange() const
Definition: Object.cpp:1902
Definition: boss_felmyst.cpp:91
Definition: TypeContainerVisitor.h:32
Definition: sunwell_plateau.h:72
Map * GetMap() const
Definition: Object.h:543
Definition: Unit.h:542
CellCoord ComputeCellCoord(float x, float y)
Definition: GridDefines.h:193
Definition: Unit.h:543
Definition: TypeContainer.h:86
Creature *const me
Definition: CreatureAI.h:71
PhaseFelmyst phase
Definition: boss_felmyst.cpp:133
G3D::int16 z
Definition: Vector3int16.h:46
Definition: GridNotifiers.h:459
void GetPosition(float &x, float &y) const
Definition: Position.h:109
void SetVisible(bool x)
Definition: Unit.cpp:10368
G3D::int16 y
Definition: Vector2int16.h:38
Definition: GridNotifiers.h:1265
Definition: Cell.h:49
G3D::int16 x
Definition: Vector2int16.h:37
Definition: sunwell_plateau.h:67
T check(T value)
Definition: format.h:305
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_felmyst::boss_felmystAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

158  {
160 
161  me->setActive(true);
162  DoZoneInCombat();
164  DoCast(me, AURA_NOXIOUS_FUMES, true);
166 
168  }
EventMap events
Definition: boss_felmyst.cpp:134
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
Definition: sunwell_plateau.h:31
Creature *const me
Definition: CreatureAI.h:71
InstanceScript * instance
Definition: boss_felmyst.cpp:132
Definition: boss_felmyst.cpp:46
Definition: InstanceScript.h:59
Definition: boss_felmyst.cpp:90
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: boss_felmyst.cpp:47
Definition: boss_felmyst.cpp:97
void EnterPhase(PhaseFelmyst NextPhase)
Definition: boss_felmyst.cpp:244

+ Here is the call graph for this function:

void boss_felmyst::boss_felmystAI::EnterPhase ( PhaseFelmyst  NextPhase)
inline
245  {
246  switch (NextPhase)
247  {
248  case PHASE_GROUND:
251  me->StopMoving();
252  me->SetSpeed(MOVE_RUN, 2.0f);
253 
254  events.ScheduleEvent(EVENT_CLEAVE, urand(5000, 10000));
255  events.ScheduleEvent(EVENT_CORROSION, urand(10000, 20000));
256  events.ScheduleEvent(EVENT_GAS_NOVA, urand(15000, 20000));
259  break;
260  case PHASE_FLIGHT:
261  me->SetDisableGravity(true);
263  uiFlightCount = 0;
264  uiBreathCount = 0;
265  break;
266  default:
267  break;
268  }
269  phase = NextPhase;
270  }
Definition: boss_felmyst.cpp:91
Definition: boss_felmyst.cpp:100
EventMap events
Definition: boss_felmyst.cpp:134
Definition: boss_felmyst.cpp:105
void CastStop(uint32 except_spellid=0)
Definition: Unit.cpp:862
bool SetDisableGravity(bool disable, bool packetOnly=false)
Definition: Unit.cpp:15818
Definition: boss_felmyst.cpp:99
Creature *const me
Definition: CreatureAI.h:71
PhaseFelmyst phase
Definition: boss_felmyst.cpp:133
Definition: boss_felmyst.cpp:102
Definition: boss_felmyst.cpp:69
uint32 uiFlightCount
Definition: boss_felmyst.cpp:136
Definition: boss_felmyst.cpp:90
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_felmyst.cpp:103
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
Definition: Unit.h:600
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:10531
Definition: boss_felmyst.cpp:101
void StopMoving()
-------—End of Pet responses methods-------—
Definition: Unit.cpp:12743
uint32 uiBreathCount
Definition: boss_felmyst.cpp:137

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_felmyst::boss_felmystAI::HandleFlightSequence ( )
inline
273  {
274  switch (uiFlightCount)
275  {
276  case 0:
277  //me->AttackStop();
278  me->GetMotionMaster()->Clear(false);
280  me->StopMoving();
283  break;
284  case 1:
286  break;
287  case 2:
288  {
289  Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
290  if (!target)
292 
293  if (!target)
294  {
295  EnterEvadeMode();
296  return;
297  }
298 
299  if (Creature* Vapor = me->SummonCreature(NPC_VAPOR, target->GetPositionX() - 5 + rand32() % 10, target->GetPositionY() - 5 + rand32() % 10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000))
300  {
301  Vapor->AI()->AttackStart(target);
302  me->InterruptNonMeleeSpells(false);
303  DoCast(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
304  Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
305  }
306 
308  break;
309  }
310  case 3:
311  {
313  //DoCast(me, SPELL_VAPOR_SELECT); need core support
314 
315  Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
316  if (!target)
318 
319  if (!target)
320  {
321  EnterEvadeMode();
322  return;
323  }
324 
325  //target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
326  if (Creature* pVapor = me->SummonCreature(NPC_VAPOR, target->GetPositionX() - 5 + rand32() % 10, target->GetPositionY() - 5 + rand32() % 10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000))
327  {
328  if (pVapor->AI())
329  pVapor->AI()->AttackStart(target);
330  me->InterruptNonMeleeSpells(false);
331  DoCast(pVapor, SPELL_VAPOR_CHANNEL, false); // core bug
332  pVapor->CastSpell(pVapor, SPELL_VAPOR_TRIGGER, true);
333  }
334 
336  break;
337  }
338  case 4:
341  break;
342  case 5:
343  {
344  Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
345  if (!target)
347 
348  if (!target)
349  {
350  EnterEvadeMode();
351  return;
352  }
353 
354  breathX = target->GetPositionX();
355  breathY = target->GetPositionY();
356  float x, y, z;
357  target->GetContactPoint(me, x, y, z, 70);
358  me->GetMotionMaster()->MovePoint(0, x, y, z+10);
359  break;
360  }
361  case 6:
363  //DoTextEmote("takes a deep breath.", NULL);
365  break;
366  case 7:
367  {
368  DoCast(me, SPELL_FOG_BREATH, true);
369  float x, y, z;
370  me->GetPosition(x, y, z);
371  x = 2 * breathX - x;
372  y = 2 * breathY - y;
373  me->GetMotionMaster()->MovePoint(0, x, y, z);
375  break;
376  }
377  case 8:
380  ++uiBreathCount;
382  if (uiBreathCount < 3)
383  uiFlightCount = 4;
384  break;
385  case 9:
387  DoStartMovement(target);
388  else
389  {
390  EnterEvadeMode();
391  return;
392  }
393  break;
394  case 10:
395  me->SetDisableGravity(false);
399  break;
400  }
401  ++uiFlightCount;
402  }
Definition: UnitAI.h:36
Definition: sunwell_plateau.h:72
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
EventMap events
Definition: boss_felmyst.cpp:134
float breathX
Definition: boss_felmyst.cpp:139
void Clear(bool reset=true)
Definition: MotionMaster.h:138
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
Definition: boss_felmyst.cpp:105
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: Creature.h:467
void CastStop(uint32 except_spellid=0)
Definition: Unit.cpp:862
bool SetDisableGravity(bool disable, bool packetOnly=false)
Definition: Unit.cpp:15818
void DespawnSummons(uint32 entry)
Definition: boss_felmyst.cpp:482
float breathY
Definition: boss_felmyst.cpp:139
Creature *const me
Definition: CreatureAI.h:71
void AttackStart(Unit *who) override
Definition: boss_felmyst.cpp:170
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
InstanceScript * instance
Definition: boss_felmyst.cpp:132
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: UnitAI.h:35
Definition: sunwell_plateau.h:71
Definition: boss_felmyst.cpp:69
uint32 uiFlightCount
Definition: boss_felmyst.cpp:136
float GetPositionY() const
Definition: Position.h:105
Definition: Object.h:56
G3D::int16 z
Definition: Vector3int16.h:46
Definition: boss_felmyst.cpp:90
Definition: sunwell_plateau.h:53
Definition: SharedDefines.h:2482
void GetPosition(float &x, float &y) const
Definition: Position.h:109
Definition: boss_felmyst.cpp:37
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
float GetPositionZ() const
Definition: Position.h:106
float GetAngle(Position const *pos) const
Definition: Position.cpp:63
G3D::int16 y
Definition: Vector2int16.h:38
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void SetFacingTo(float ori)
Definition: Unit.cpp:15777
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_felmyst.cpp:61
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_felmyst.cpp:62
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
Definition: boss_felmyst.cpp:107
Definition: SharedDefines.h:2478
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916
uint32 rand32()
Definition: Random.cpp:64
void HandleEmoteCommand(uint32 anim_id)
Definition: Unit.cpp:1444
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
Definition: ScriptedCreature.cpp:134
G3D::int16 x
Definition: Vector2int16.h:37
float GetPositionX() const
Definition: Position.h:104
Definition: Unit.h:1305
void StopMoving()
-------—End of Pet responses methods-------—
Definition: Unit.cpp:12743
void EnterPhase(PhaseFelmyst NextPhase)
Definition: boss_felmyst.cpp:244
uint32 uiBreathCount
Definition: boss_felmyst.cpp:137
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346
void GetContactPoint(WorldObject const *obj, float &x, float &y, float &z, float distance2d=CONTACT_DISTANCE) const
Definition: Object.cpp:2650

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_felmyst::boss_felmystAI::Initialize ( void  )
inline
127  {
128  phase = PHASE_NONE;
129  uiFlightCount = 0;
130  }
Definition: boss_felmyst.cpp:89
PhaseFelmyst phase
Definition: boss_felmyst.cpp:133
uint32 uiFlightCount
Definition: boss_felmyst.cpp:136

+ Here is the caller graph for this function:

void boss_felmyst::boss_felmystAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

193  {
194  Talk(YELL_DEATH);
195 
197  }
Definition: inflate.h:49
Definition: sunwell_plateau.h:31
InstanceScript * instance
Definition: boss_felmyst.cpp:132
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: boss_felmyst.cpp:39

+ Here is the call graph for this function:

void boss_felmyst::boss_felmystAI::JustRespawned ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

188  {
189  Talk(YELL_BIRTH);
190  }
Definition: boss_felmyst.cpp:34
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42

+ Here is the call graph for this function:

void boss_felmyst::boss_felmystAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from ScriptedAI.

223  {
224  if (summon->GetEntry() == NPC_DEAD)
225  {
227  DoZoneInCombat(summon);
228  summon->CastSpell(summon, SPELL_DEAD_PASSIVE, true);
229  }
230  }
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
Definition: boss_felmyst.cpp:68
Definition: UnitAI.h:35
CreatureAI * AI() const
Definition: Creature.h:525
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
uint32 GetEntry() const
Definition: Object.h:107
Definition: sunwell_plateau.h:67
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29

+ Here is the call graph for this function:

void boss_felmyst::boss_felmystAI::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

183  {
184  Talk(YELL_KILL);
185  }
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_felmyst.cpp:35

+ Here is the call graph for this function:

void boss_felmyst::boss_felmystAI::MoveInLineOfSight ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

177  {
178  if (phase != PHASE_FLIGHT)
180  }
Definition: boss_felmyst.cpp:91
PhaseFelmyst phase
Definition: boss_felmyst.cpp:133
virtual void MoveInLineOfSight(Unit *)
Definition: CreatureAI.cpp:128

+ Here is the call graph for this function:

void boss_felmyst::boss_felmystAI::MovementInform ( uint32  ,
uint32   
)
inlineoverridevirtual

Reimplemented from CreatureAI.

233  {
234  if (phase == PHASE_FLIGHT)
236  }
Definition: boss_felmyst.cpp:91
EventMap events
Definition: boss_felmyst.cpp:134
Definition: boss_felmyst.cpp:105
PhaseFelmyst phase
Definition: boss_felmyst.cpp:133
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123

+ Here is the call graph for this function:

void boss_felmyst::boss_felmystAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

142  {
143  Initialize();
144 
145  events.Reset();
146 
147  me->SetDisableGravity(true);
150 
152  me->setActive(false);
153 
155  }
Definition: sunwell_plateau.h:72
EventMap events
Definition: boss_felmyst.cpp:134
void Reset()
Definition: EventMap.cpp:20
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
Definition: sunwell_plateau.h:31
bool SetDisableGravity(bool disable, bool packetOnly=false)
Definition: Unit.cpp:15818
void DespawnSummons(uint32 entry)
Definition: boss_felmyst.cpp:482
Creature *const me
Definition: CreatureAI.h:71
Definition: UpdateFields.h:115
InstanceScript * instance
Definition: boss_felmyst.cpp:132
void Initialize()
Definition: boss_felmyst.cpp:126
Definition: InstanceScript.h:58
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: UpdateFields.h:116
void SetFloatValue(uint16 index, float value)
Definition: Object.cpp:1067

+ Here is the call graph for this function:

void boss_felmyst::boss_felmystAI::SpellHit ( Unit caster,
const SpellInfo spell 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

200  {
201  // workaround for linked aura
202  /*if (spell->Id == SPELL_VAPOR_FORCE)
203  {
204  caster->CastSpell(caster, SPELL_VAPOR_TRIGGER, true);
205  }*/
206  // workaround for mind control
207  if (spell->Id == SPELL_FOG_INFORM)
208  {
209  float x, y, z;
210  caster->GetPosition(x, y, z);
211  if (Unit* summon = me->SummonCreature(NPC_DEAD, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
212  {
213  summon->SetMaxHealth(caster->GetMaxHealth());
214  summon->SetHealth(caster->GetMaxHealth());
215  summon->CastSpell(summon, SPELL_FOG_CHARM, true);
216  summon->CastSpell(summon, SPELL_FOG_CHARM2, true);
217  }
218  me->DealDamage(caster, caster->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
219  }
220  }
uint32 Id
Definition: SpellInfo.h:329
uint32 GetMaxHealth() const
Definition: Unit.h:1427
Definition: boss_felmyst.cpp:73
arena_t NULL
Definition: jemalloc_internal.h:624
Creature *const me
Definition: CreatureAI.h:71
Definition: SharedDefines.h:288
G3D::int16 z
Definition: Vector3int16.h:46
void GetPosition(float &x, float &y) const
Definition: Position.h:109
G3D::int16 y
Definition: Vector2int16.h:38
Definition: boss_felmyst.cpp:74
Definition: boss_felmyst.cpp:72
Definition: Unit.h:662
G3D::int16 x
Definition: Vector2int16.h:37
Definition: sunwell_plateau.h:67
uint32 GetHealth() const
Definition: Unit.h:1426
Definition: Unit.h:1305
uint32 DealDamage(Unit *victim, uint32 damage, CleanDamage const *cleanDamage=NULL, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=NULL, bool durabilityLoss=true)
Definition: Unit.cpp:613
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:

void boss_felmyst::boss_felmystAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

405  {
406  if (!UpdateVictim())
407  {
408  if (phase == PHASE_FLIGHT && !me->IsInEvadeMode())
409  EnterEvadeMode();
410  return;
411  }
412 
413  events.Update(diff);
414 
415  if (me->IsNonMeleeSpellCast(false))
416  return;
417 
418  if (phase == PHASE_GROUND)
419  {
420  switch (events.ExecuteEvent())
421  {
422  case EVENT_BERSERK:
424  DoCast(me, SPELL_BERSERK, true);
426  break;
427  case EVENT_CLEAVE:
428  DoCastVictim(SPELL_CLEAVE, false);
429  events.ScheduleEvent(EVENT_CLEAVE, urand(5000, 10000));
430  break;
431  case EVENT_CORROSION:
433  events.ScheduleEvent(EVENT_CORROSION, urand(20000, 30000));
434  break;
435  case EVENT_GAS_NOVA:
436  DoCast(me, SPELL_GAS_NOVA, false);
437  events.ScheduleEvent(EVENT_GAS_NOVA, urand(20000, 25000));
438  break;
439  case EVENT_ENCAPSULATE:
440  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true))
441  DoCast(target, SPELL_ENCAPSULATE_CHANNEL, false);
443  break;
444  case EVENT_FLIGHT:
446  break;
447  default:
449  break;
450  }
451  }
452 
453  if (phase == PHASE_FLIGHT)
454  {
455  switch (events.ExecuteEvent())
456  {
457  case EVENT_BERSERK:
459  DoCast(me, SPELL_BERSERK, true);
460  break;
463  break;
464  case EVENT_SUMMON_FOG:
465  {
466  float x, y, z;
467  me->GetPosition(x, y, z);
468  me->UpdateGroundPositionZ(x, y, z);
469  if (Creature* Fog = me->SummonCreature(NPC_VAPOR_TRAIL, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000))
470  {
471  Fog->RemoveAurasDueToSpell(SPELL_TRAIL_TRIGGER);
472  Fog->CastSpell(Fog, SPELL_FOG_TRIGGER, true);
473  me->CastSpell(Fog, SPELL_FOG_FORCE, true);
474  }
475  }
477  break;
478  }
479  }
480  }
Definition: boss_felmyst.cpp:91
Definition: boss_felmyst.cpp:65
Definition: boss_felmyst.cpp:100
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: sunwell_plateau.h:72
EventMap events
Definition: boss_felmyst.cpp:134
Definition: boss_felmyst.cpp:53
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
Definition: boss_felmyst.cpp:105
Definition: boss_felmyst.cpp:52
bool IsInEvadeMode() const
Definition: Creature.h:520
Definition: Creature.h:467
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition: Unit.cpp:2886
Definition: boss_felmyst.cpp:38
Definition: boss_felmyst.cpp:99
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_felmyst.cpp:51
PhaseFelmyst phase
Definition: boss_felmyst.cpp:133
Definition: boss_felmyst.cpp:102
Definition: boss_felmyst.cpp:82
Definition: UnitAI.h:35
Definition: Object.h:56
G3D::int16 z
Definition: Vector3int16.h:46
Definition: boss_felmyst.cpp:90
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
void GetPosition(float &x, float &y) const
Definition: Position.h:109
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
Definition: boss_felmyst.cpp:71
G3D::int16 y
Definition: Vector2int16.h:38
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: boss_felmyst.cpp:70
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
void Update(uint32 time)
Definition: EventMap.h:54
Definition: boss_felmyst.cpp:50
Definition: boss_felmyst.cpp:103
Definition: boss_felmyst.cpp:107
Definition: boss_felmyst.cpp:97
void HandleFlightSequence()
Definition: boss_felmyst.cpp:272
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
G3D::int16 x
Definition: Vector2int16.h:37
Definition: boss_felmyst.cpp:101
Definition: Unit.h:1305
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
void EnterPhase(PhaseFelmyst NextPhase)
Definition: boss_felmyst.cpp:244
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346
void UpdateGroundPositionZ(float x, float y, float &z) const
Definition: Object.cpp:1827

+ Here is the call graph for this function:

Member Data Documentation

float boss_felmyst::boss_felmystAI::breathX
float boss_felmyst::boss_felmystAI::breathY
EventMap boss_felmyst::boss_felmystAI::events
InstanceScript* boss_felmyst::boss_felmystAI::instance
PhaseFelmyst boss_felmyst::boss_felmystAI::phase
uint32 boss_felmyst::boss_felmystAI::uiBreathCount
uint32 boss_felmyst::boss_felmystAI::uiFlightCount

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