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

Public Member Functions

 boss_flame_leviathanAI (Creature *creature)
 
void Initialize ()
 
void InitializeAI () override
 
void Reset () override
 
void EnterCombat (Unit *) override
 
void ActiveTower ()
 
void JustDied (Unit *) override
 
void SpellHit (Unit *, SpellInfo const *spell) override
 
uint32 GetData (uint32 type) const override
 
void SetData (uint32 id, uint32 data) override
 
void UpdateAI (uint32 diff) override
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
void DoAction (int32 action) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
virtual ~BossAI ()
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void JustReachedHome () override
 
bool CanAIAttack (Unit const *target) const override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &) override
 
void KilledUnit (Unit *) override
 
void OnPossess (bool)
 
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 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
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
void OnCharmed (bool apply) override
 
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 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

uint8 ActiveTowersCount
 
uint8 Shutdown
 
bool ActiveTowers
 
bool towerOfStorms
 
bool towerOfLife
 
bool towerOfFlames
 
bool towerOfFrost
 
bool Shutout
 
bool Unbroken
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 

Private Member Functions

void DoBatteringRamIfReady ()
 

Private Attributes

ObjectGuid _pursueTarget
 

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 BossAI
void _Reset ()
 
void _EnterCombat ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _DespawnAtEvade ()
 
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)
 
bool CheckBoundary (Position const *who=nullptr) const
 
void SetBoundary (CreatureBoundary const *boundary)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

boss_flame_leviathan::boss_flame_leviathanAI::boss_flame_leviathanAI ( Creature creature)
inline
224  : BossAI(creature, BOSS_LEVIATHAN)
225  {
226  Initialize();
227  }
Definition: ulduar.h:32
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444
void Initialize()
Definition: boss_flame_leviathan.cpp:229

+ Here is the call graph for this function:

Member Function Documentation

void boss_flame_leviathan::boss_flame_leviathanAI::ActiveTower ( )
inline
289  {
290  if (ActiveTowers)
291  {
292  if (towerOfStorms)
293  {
296  }
297 
298  if (towerOfFlames)
299  {
302  }
303 
304  if (towerOfFrost)
305  {
308  }
309 
310  if (towerOfLife)
311  {
314  }
315 
318  else
320  }
321  else
322  Talk(SAY_AGGRO);
323  }
bool towerOfFrost
Definition: boss_flame_leviathan.cpp:261
bool towerOfLife
Definition: boss_flame_leviathan.cpp:259
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:14463
Definition: boss_flame_leviathan.cpp:120
Definition: boss_flame_leviathan.cpp:157
Definition: boss_flame_leviathan.cpp:69
Definition: boss_flame_leviathan.cpp:68
Definition: boss_flame_leviathan.cpp:121
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_flame_leviathan.cpp:122
bool towerOfStorms
Definition: boss_flame_leviathan.cpp:258
Definition: boss_flame_leviathan.cpp:67
Definition: boss_flame_leviathan.cpp:152
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
bool towerOfFlames
Definition: boss_flame_leviathan.cpp:260
Definition: Common.h:103
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_flame_leviathan.cpp:123
Definition: boss_flame_leviathan.cpp:70
bool ActiveTowers
Definition: boss_flame_leviathan.cpp:257
Definition: boss_flame_leviathan.cpp:156

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_flame_leviathan::boss_flame_leviathanAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

476  {
477  if (action && action <= 4) // Tower destruction, debuff leviathan loot and reduce active tower count
478  {
481 
484 
487 
490  }
491 
492  switch (action)
493  {
495  if (towerOfStorms)
496  {
497  towerOfStorms = false;
499  }
500  break;
502  if (towerOfFrost)
503  {
504  towerOfFrost = false;
506  }
507  break;
509  if (towerOfFlames)
510  {
511  towerOfFlames = false;
513  }
514  break;
516  if (towerOfLife)
517  {
518  towerOfLife = false;
520  }
521  break;
522  case ACTION_START_HARD_MODE: // Activate hard-mode enable all towers, apply buffs on leviathan
523  ActiveTowers = true;
524  towerOfStorms = true;
525  towerOfLife = true;
526  towerOfFlames = true;
527  towerOfFrost = true;
529  break;
530  case ACTION_MOVE_TO_CENTER_POSITION: // Triggered by 2 Collossus near door
531  if (!me->isDead())
532  {
537  return;
538  }
539  break;
540  default:
541  break;
542  }
543  }
bool towerOfFrost
Definition: boss_flame_leviathan.cpp:261
bool towerOfLife
Definition: boss_flame_leviathan.cpp:259
Definition: SharedDefines.h:73
Definition: Unit.h:674
Definition: Unit.h:1131
bool HasLootMode(uint16 lootMode)
Definition: Creature.h:593
Definition: ulduar.h:291
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
void MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, bool generatePath=false)
Definition: MotionMaster.cpp:465
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:670
Definition: SharedDefines.h:69
Definition: SharedDefines.h:70
uint8 ActiveTowersCount
Definition: boss_flame_leviathan.cpp:255
void RemoveLootMode(uint16 lootMode)
Definition: Creature.h:596
Creature *const me
Definition: CreatureAI.h:71
bool towerOfStorms
Definition: boss_flame_leviathan.cpp:258
Definition: ulduar.h:288
Definition: ulduar.h:287
float GetPositionY() const
Definition: Position.h:105
void SetLootMode(uint16 lootMode)
Definition: Creature.h:594
float GetPositionZ() const
Definition: Position.h:106
Position const Center
Definition: boss_flame_leviathan.cpp:179
Definition: SharedDefines.h:72
Definition: ulduar.h:289
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
bool isDead() const
Definition: Unit.h:1694
Definition: boss_flame_leviathan.cpp:172
Definition: UpdateFields.h:109
bool towerOfFlames
Definition: boss_flame_leviathan.cpp:260
Definition: Unit.h:691
Definition: ulduar.h:290
float GetPositionX() const
Definition: Position.h:104
void SetReactState(ReactStates st)
Definition: Creature.h:502
Definition: Unit.h:698
bool ActiveTowers
Definition: boss_flame_leviathan.cpp:257
Definition: SharedDefines.h:71

+ Here is the call graph for this function:

void boss_flame_leviathan::boss_flame_leviathanAI::DoBatteringRamIfReady ( )
inlineprivate

Copypasta from DoSpellAttackIfReady, only difference is the target - it cannot be selected trough GetVictim this way - I also removed the spellInfo check

549  {
550  if (me->isAttackReady())
551  {
553 
554  // Pursue was unable to acquire a valid target, so get the current victim as target.
555  if (!target && me->GetVictim())
556  target = me->GetVictim();
557 
558  if (me->IsWithinCombatRange(target, 30.0f))
559  {
560  DoCast(target, SPELL_BATTERING_RAM);
561  me->resetAttackTimer();
562  }
563  }
564  }
bool IsWithinCombatRange(const Unit *obj, float dist2compare) const
Definition: Unit.cpp:492
ObjectGuid _pursueTarget
Definition: boss_flame_leviathan.cpp:566
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
Creature *const me
Definition: CreatureAI.h:71
Unit * GetVictim() const
Definition: Unit.h:1379
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition: Unit.h:1357
void resetAttackTimer(WeaponAttackType type=BASE_ATTACK)
Definition: Unit.cpp:481
Definition: boss_flame_leviathan.cpp:47
Definition: Unit.h:1305

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_flame_leviathan::boss_flame_leviathanAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

276  {
277  _EnterCombat();
285  ActiveTower(); //void ActiveTower
286  }
void _EnterCombat()
Definition: ScriptedCreature.cpp:480
Definition: Unit.h:1129
Definition: boss_flame_leviathan.cpp:114
Definition: boss_flame_leviathan.cpp:113
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_flame_leviathan.cpp:116
void ActiveTower()
Definition: boss_flame_leviathan.cpp:288
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: boss_flame_leviathan.cpp:117
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_flame_leviathan.cpp:115
Definition: boss_flame_leviathan.cpp:118
Definition: Common.h:103
EventMap events
Definition: ScriptedCreature.h:371
void SetReactState(ReactStates st)
Definition: Creature.h:502

+ Here is the call graph for this function:

uint32 boss_flame_leviathan::boss_flame_leviathanAI::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

347  {
348  switch (type)
349  {
350  case DATA_SHUTOUT:
351  return Shutout ? 1 : 0;
352  case DATA_UNBROKEN:
353  return Unbroken ? 1 : 0;
355  if (ActiveTowers) // Only on HardMode
356  return ActiveTowersCount;
357  default:
358  break;
359  }
360 
361  return 0;
362  }
bool Unbroken
Definition: boss_flame_leviathan.cpp:263
Definition: ulduar.h:419
Definition: boss_flame_leviathan.cpp:143
uint8 ActiveTowersCount
Definition: boss_flame_leviathan.cpp:255
Definition: boss_flame_leviathan.cpp:144
bool Shutout
Definition: boss_flame_leviathan.cpp:262
bool ActiveTowers
Definition: boss_flame_leviathan.cpp:257
void boss_flame_leviathan::boss_flame_leviathanAI::Initialize ( void  )
inline
230  {
231  ActiveTowersCount = 4;
232  Shutdown = 0;
233  ActiveTowers = false;
234  towerOfStorms = false;
235  towerOfLife = false;
236  towerOfFlames = false;
237  towerOfFrost = false;
238  Shutout = true;
239  Unbroken = true;
240  }
bool towerOfFrost
Definition: boss_flame_leviathan.cpp:261
bool towerOfLife
Definition: boss_flame_leviathan.cpp:259
bool Unbroken
Definition: boss_flame_leviathan.cpp:263
uint8 ActiveTowersCount
Definition: boss_flame_leviathan.cpp:255
bool towerOfStorms
Definition: boss_flame_leviathan.cpp:258
uint8 Shutdown
Definition: boss_flame_leviathan.cpp:256
bool towerOfFlames
Definition: boss_flame_leviathan.cpp:260
bool Shutout
Definition: boss_flame_leviathan.cpp:262
bool ActiveTowers
Definition: boss_flame_leviathan.cpp:257

+ Here is the caller graph for this function:

void boss_flame_leviathan::boss_flame_leviathanAI::InitializeAI ( )
inlineoverridevirtual

Reimplemented from UnitAI.

243  {
244  if (!me->isDead())
245  Reset();
246 
247  Initialize();
248 
250 
253  }
Definition: Unit.h:674
Definition: Unit.h:1129
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Creature *const me
Definition: CreatureAI.h:71
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
bool isDead() const
Definition: Unit.h:1694
Definition: UpdateFields.h:109
Definition: Unit.h:691
void Reset() override
Definition: boss_flame_leviathan.cpp:265
Definition: boss_flame_leviathan.cpp:59
void SetReactState(ReactStates st)
Definition: Creature.h:502
void Initialize()
Definition: boss_flame_leviathan.cpp:229
Definition: Unit.h:698

+ Here is the call graph for this function:

void boss_flame_leviathan::boss_flame_leviathanAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

326  {
327  _JustDied();
328  // Set Field Flags 67108928 = 64 | 67108864 = UNIT_FLAG_UNK_6 | UNIT_FLAG_SKINNABLE
329  // Set DynFlags 12
330  // Set NPCFlags 0
331  Talk(SAY_DEATH);
332  }
void _JustDied()
Definition: ScriptedCreature.cpp:471
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_flame_leviathan.cpp:154

+ Here is the call graph for this function:

void boss_flame_leviathan::boss_flame_leviathanAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

266  {
267  _Reset();
268  //resets shutdown counter to 0. 2 or 4 depending on raid mode
269  Shutdown = 0;
271 
273  }
ObjectGuid _pursueTarget
Definition: boss_flame_leviathan.cpp:566
Definition: Unit.h:1130
Creature *const me
Definition: CreatureAI.h:71
void _Reset()
Definition: ScriptedCreature.cpp:457
uint8 Shutdown
Definition: boss_flame_leviathan.cpp:256
void Clear()
Definition: ObjectGuid.h:215
void SetReactState(ReactStates st)
Definition: Creature.h:502

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_flame_leviathan::boss_flame_leviathanAI::SetData ( uint32  id,
uint32  data 
)
inlineoverridevirtual

Reimplemented from UnitAI.

365  {
366  if (id == DATA_UNBROKEN)
367  Unbroken = data ? true : false;
368  }
bool Unbroken
Definition: boss_flame_leviathan.cpp:263
Definition: ulduar.h:419
void boss_flame_leviathan::boss_flame_leviathanAI::SpellHit ( Unit ,
SpellInfo const spell 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

335  {
336  if (spell->Id == SPELL_START_THE_ENGINE)
337  ASSERT_NOTNULL(me->GetVehicleKit())->InstallAllAccessories(false);
338 
339  if (spell->Id == SPELL_ELECTROSHOCK)
341 
342  if (spell->Id == SPELL_OVERLOAD_CIRCUIT)
343  ++Shutdown;
344  }
T * ASSERT_NOTNULL(T *pointer)
Definition: Errors.h:58
Definition: Unit.h:1110
Creature *const me
Definition: CreatureAI.h:71
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed=true, bool withInstant=true)
Definition: Unit.cpp:2849
Definition: boss_flame_leviathan.cpp:52
uint8 Shutdown
Definition: boss_flame_leviathan.cpp:256
Definition: boss_flame_leviathan.cpp:51
Definition: boss_flame_leviathan.cpp:57
Vehicle * GetVehicleKit() const
Definition: Unit.h:2165

+ Here is the call graph for this function:

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

Reimplemented from ScriptedAI.

470  {
471  if (spell->Id == SPELL_PURSUED)
472  _pursueTarget = target->GetGUID();
473  }
ObjectGuid _pursueTarget
Definition: boss_flame_leviathan.cpp:566
Definition: boss_flame_leviathan.cpp:45
ObjectGuid const & GetGUID() const
Definition: Object.h:105

+ Here is the call graph for this function:

void boss_flame_leviathan::boss_flame_leviathanAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

371  {
372  if (!UpdateVictim())
373  return;
374 
375  events.Update(diff);
376 
378  {
379  Shutdown = 0;
383  return;
384  }
385 
387  return;
388 
389  while (uint32 eventId = events.ExecuteEvent())
390  {
391  switch (eventId)
392  {
393  case EVENT_PURSUE:
394  Talk(SAY_TARGET);
395  DoCast(SPELL_PURSUED); // Will select target in spellscript
397  break;
398  case EVENT_MISSILE:
401  break;
402  case EVENT_VENT:
405  break;
406  case EVENT_SPEED:
409  break;
410  case EVENT_SUMMON:
411  if (summons.size() < 15)
412  if (Creature* lift = DoSummonFlyer(NPC_MECHANOLIFT, me, 30.0f, 50.0f, 0))
413  lift->GetMotionMaster()->MoveRandom(100);
415  break;
416  case EVENT_SHUTDOWN:
420  if (Shutout)
421  Shutout = false;
424  break;
425  case EVENT_REPAIR:
430  break;
431  case EVENT_THORIM_S_HAMMER: // Tower of Storms
432  for (uint8 i = 0; i < 7; ++i)
433  {
434  if (Creature* thorim = DoSummon(NPC_THORIM_BEACON, me, float(urand(20, 60)), 20000, TEMPSUMMON_TIMED_DESPAWN))
435  thorim->GetMotionMaster()->MoveRandom(100);
436  }
439  break;
440  case EVENT_MIMIRON_S_INFERNO: // Tower of Flames
444  break;
445  case EVENT_HODIR_S_FURY: // Tower of Frost
446  for (uint8 i = 0; i < 7; ++i)
447  {
448  if (Creature* hodir = DoSummon(NPC_HODIR_BEACON, me, 50, 0))
449  hodir->GetMotionMaster()->MoveRandom(100);
450  }
453  break;
454  case EVENT_FREYA_S_WARD: // Tower of Nature
456  for (int32 i = 0; i < 4; ++i)
458 
459  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
460  DoCast(target, SPELL_FREYA_S_WARD);
462  break;
463  }
464  }
465 
467  }
Definition: boss_flame_leviathan.cpp:158
Definition: boss_flame_leviathan.cpp:64
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: boss_flame_leviathan.cpp:163
Definition: Unit.h:565
Definition: boss_flame_leviathan.cpp:160
Definition: boss_flame_leviathan.cpp:93
Definition: boss_flame_leviathan.cpp:114
Definition: boss_flame_leviathan.cpp:120
Definition: boss_flame_leviathan.cpp:46
Definition: boss_flame_leviathan.cpp:161
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:89
Position const FreyaBeacons[FREYA_SPAWNS]
Definition: boss_flame_leviathan.cpp:209
Definition: Creature.h:467
Definition: boss_flame_leviathan.cpp:92
Definition: boss_flame_leviathan.cpp:95
Definition: boss_flame_leviathan.cpp:121
Definition: boss_flame_leviathan.cpp:165
Definition: boss_flame_leviathan.cpp:159
Definition: boss_flame_leviathan.cpp:113
void ClearUnitState(uint32 f)
Definition: Unit.h:1396
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_flame_leviathan.cpp:122
Definition: boss_flame_leviathan.cpp:89
Definition: boss_flame_leviathan.cpp:45
Definition: boss_flame_leviathan.cpp:176
Definition: boss_flame_leviathan.cpp:116
Definition: boss_flame_leviathan.cpp:49
Definition: Unit.h:553
Definition: UnitAI.h:35
Position const InfernoStart
Definition: boss_flame_leviathan.cpp:180
Definition: Object.h:56
Definition: boss_flame_leviathan.cpp:48
Creature * DoSummon(uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
Definition: CreatureAI.cpp:377
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: boss_flame_leviathan.cpp:94
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
Definition: boss_flame_leviathan.cpp:117
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
uint8 Shutdown
Definition: boss_flame_leviathan.cpp:256
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_flame_leviathan.cpp:51
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
SummonList summons
Definition: ScriptedCreature.h:372
Definition: boss_flame_leviathan.cpp:119
Definition: boss_flame_leviathan.cpp:115
void Update(uint32 time)
Definition: EventMap.h:54
const T & RAID_MODE(const T &normal10, const T &normal25) const
Definition: ScriptedCreature.h:293
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
Definition: boss_flame_leviathan.cpp:166
Definition: boss_flame_leviathan.cpp:118
void DoBatteringRamIfReady()
Definition: boss_flame_leviathan.cpp:548
Definition: Common.h:103
Definition: Unit.h:560
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
bool Shutout
Definition: boss_flame_leviathan.cpp:262
Definition: boss_flame_leviathan.cpp:50
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
uint8_t uint8
Definition: Define.h:152
EventMap events
Definition: ScriptedCreature.h:371
Creature * DoSummonFlyer(uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
Definition: CreatureAI.cpp:388
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
Definition: boss_flame_leviathan.cpp:123
void DelayEvents(Milliseconds const &delay)
Definition: EventMap.h:219
Definition: boss_flame_leviathan.cpp:155
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346
size_type size() const
Definition: ScriptedCreature.h:87
Definition: boss_flame_leviathan.cpp:175

+ Here is the call graph for this function:

Member Data Documentation

ObjectGuid boss_flame_leviathan::boss_flame_leviathanAI::_pursueTarget
private
bool boss_flame_leviathan::boss_flame_leviathanAI::ActiveTowers
uint8 boss_flame_leviathan::boss_flame_leviathanAI::ActiveTowersCount
uint8 boss_flame_leviathan::boss_flame_leviathanAI::Shutdown
bool boss_flame_leviathan::boss_flame_leviathanAI::Shutout
bool boss_flame_leviathan::boss_flame_leviathanAI::towerOfFlames
bool boss_flame_leviathan::boss_flame_leviathanAI::towerOfFrost
bool boss_flame_leviathan::boss_flame_leviathanAI::towerOfLife
bool boss_flame_leviathan::boss_flame_leviathanAI::towerOfStorms
bool boss_flame_leviathan::boss_flame_leviathanAI::Unbroken

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