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

Public Member Functions

 boss_sindragosaAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void JustDied (Unit *) override
 
void EnterCombat (Unit *victim) override
 
void EnterEvadeMode (EvadeReason why) override
 
void JustReachedHome () override
 
void KilledUnit (Unit *victim) override
 
void DoAction (int32 action) override
 
uint32 GetData (uint32 type) const override
 
void MovementInform (uint32 type, uint32 point) override
 
void DamageTaken (Unit *, uint32 &) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
virtual ~BossAI ()
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
bool CanAIAttack (Unit const *target) const override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void SpellHit (Unit *, SpellInfo const *) 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 IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted () const
 
virtual void JustRespawned ()
 
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 InitializeAI ()
 
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)
 

Private Attributes

uint8 _mysticBuffetStack
 
bool _isInAirPhase
 
bool _isThirdPhase
 
bool _summoned
 

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 ()
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 
- 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_sindragosa::boss_sindragosaAI::boss_sindragosaAI ( Creature creature)
inline
222  : BossAI(creature, DATA_SINDRAGOSA), _summoned(false)
223  {
224  Initialize();
225  }
Definition: icecrown_citadel.h:86
bool _summoned
Definition: boss_sindragosa.cpp:553
void Initialize()
Definition: boss_sindragosa.cpp:227
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444

+ Here is the call graph for this function:

Member Function Documentation

void boss_sindragosa::boss_sindragosaAI::DamageTaken ( Unit ,
uint32  
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

389  {
390  if (!_isThirdPhase && !HealthAbovePct(35))
391  {
394  _isThirdPhase = true;
395  }
396  }
bool _isThirdPhase
Definition: boss_sindragosa.cpp:552
bool HealthAbovePct(uint32 pct) const
Definition: ScriptedCreature.h:248
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:89
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_sindragosa.cpp:108
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_sindragosa.cpp:103

+ Here is the call graph for this function:

void boss_sindragosa::boss_sindragosaAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

301  {
302  if (action == ACTION_START_FROSTWYRM)
303  {
304  if (_summoned)
305  return;
306 
307  _summoned = true;
308  if (TempSummon* summon = me->ToTempSummon())
309  summon->SetTempSummonType(TEMPSUMMON_DEAD_DESPAWN);
310 
311  if (me->isDead())
312  return;
313 
314  me->setActive(true);
315  me->SetCanFly(true);
316  me->SetDisableGravity(true);
318  me->SetSpeed(MOVE_FLIGHT, 4.0f);
320  float moveTime = me->GetExactDist(&SindragosaFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f);
324  }
325  }
Definition: icecrown_citadel.h:490
EventProcessor m_Events
Definition: Unit.h:1948
Definition: Unit.h:605
Definition: TemporarySummon.h:40
Definition: Unit.h:674
bool _summoned
Definition: boss_sindragosa.cpp:553
float GetSpeed(UnitMoveType mtype) const
Definition: Unit.cpp:10526
Position const SindragosaLandPos
Definition: boss_sindragosa.cpp:161
void AddEvent(BasicEvent *Event, uint64 e_time, bool set_addtime=true)
Definition: EventProcessor.cpp:88
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: Unit.h:254
Definition: Unit.h:253
bool SetDisableGravity(bool disable, bool packetOnly=false)
Definition: Unit.cpp:15818
Definition: Object.h:60
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
void SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
Definition: Object.cpp:1252
TempSummon * ToTempSummon()
Definition: Unit.h:2206
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
bool SetCanFly(bool enable)
Definition: Unit.cpp:15899
uint64 CalculateTime(uint64 t_offset) const
Definition: EventProcessor.cpp:95
uint64_t uint64
Definition: Define.h:149
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
bool isDead() const
Definition: Unit.h:1694
Definition: UpdateFields.h:109
float GetExactDist(float x, float y, float z) const
Definition: Position.h:157
Definition: UpdateFields.h:124
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:10531
Definition: boss_sindragosa.cpp:166
Definition: boss_sindragosa.cpp:45
Position const SindragosaFlyPos
Definition: boss_sindragosa.cpp:160
Definition: boss_sindragosa.cpp:141

+ Here is the call graph for this function:

void boss_sindragosa::boss_sindragosaAI::EnterCombat ( Unit victim)
inlineoverridevirtual

Reimplemented from BossAI.

265  {
267  {
270  return;
271  }
272 
273  BossAI::EnterCombat(victim);
276  Talk(SAY_AGGRO);
277  }
void DoCastSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:558
Definition: icecrown_citadel.h:86
Definition: boss_sindragosa.cpp:48
void EnterCombat(Unit *) override
Definition: ScriptedCreature.h:356
Player * ToPlayer()
Definition: Object.h:191
Definition: boss_sindragosa.cpp:27
Creature *const me
Definition: CreatureAI.h:71
Definition: CreatureAI.h:89
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void EnterEvadeMode(EvadeReason why) override
Definition: boss_sindragosa.cpp:279
Definition: boss_sindragosa.cpp:47
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition: InstanceScript.h:236
Definition: icecrown_citadel.h:63
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

void boss_sindragosa::boss_sindragosaAI::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

280  {
281  if (_isInAirPhase && why == EVADE_REASON_BOUNDARY)
282  return;
284  }
bool _isInAirPhase
Definition: boss_sindragosa.cpp:551
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
Definition: CreatureAI.h:88

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32 boss_sindragosa::boss_sindragosaAI::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

328  {
329  if (type == DATA_MYSTIC_BUFFET_STACK)
330  return _mysticBuffetStack;
331  return 0xFFFFFFFF;
332  }
uint8 _mysticBuffetStack
Definition: boss_sindragosa.cpp:550
Definition: boss_sindragosa.cpp:132
void boss_sindragosa::boss_sindragosaAI::Initialize ( void  )
inline
228  {
229  _mysticBuffetStack = 0;
230  _isInAirPhase = false;
231  _isThirdPhase = false;
232  }
bool _isInAirPhase
Definition: boss_sindragosa.cpp:551
bool _isThirdPhase
Definition: boss_sindragosa.cpp:552
uint8 _mysticBuffetStack
Definition: boss_sindragosa.cpp:550

+ Here is the caller graph for this function:

void boss_sindragosa::boss_sindragosaAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

255  {
256  _JustDied();
257  Talk(SAY_DEATH);
258 
261 
262  }
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4240
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
Definition: icecrown_citadel.h:58
Definition: boss_sindragosa.cpp:38
void _JustDied()
Definition: ScriptedCreature.cpp:471
Creature *const me
Definition: CreatureAI.h:71
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_sindragosa.cpp:87
bool Is25ManRaid() const
Definition: ScriptedCreature.h:274

+ Here is the call graph for this function:

void boss_sindragosa::boss_sindragosaAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from BossAI.

287  {
290  me->SetCanFly(false);
291  me->SetDisableGravity(false);
292  }
void JustReachedHome() override
Definition: ScriptedCreature.h:358
Definition: icecrown_citadel.h:86
bool SetDisableGravity(bool disable, bool packetOnly=false)
Definition: Unit.cpp:15818
Definition: InstanceScript.h:60
Creature *const me
Definition: CreatureAI.h:71
bool SetCanFly(bool enable)
Definition: Unit.cpp:15899
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

void boss_sindragosa::boss_sindragosaAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

399  {
400  summons.Summon(summon);
401  if (summon->GetEntry() == NPC_FROST_BOMB)
402  {
403  summon->CastSpell(summon, SPELL_FROST_BOMB_VISUAL, true);
404  summon->CastSpell(summon, SPELL_BIRTH_NO_VISUAL, true);
405  summon->m_Events.AddEvent(new FrostBombExplosion(summon, me->GetGUID()), summon->m_Events.CalculateTime(5500));
406  }
407  }
EventProcessor m_Events
Definition: Unit.h:1948
void AddEvent(BasicEvent *Event, uint64 e_time, bool set_addtime=true)
Definition: EventProcessor.cpp:88
Definition: boss_sindragosa.cpp:182
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:92
Definition: icecrown_citadel.h:298
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_sindragosa.cpp:66
uint64 CalculateTime(uint64 t_offset) const
Definition: EventProcessor.cpp:95
SummonList summons
Definition: ScriptedCreature.h:372
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: boss_sindragosa.cpp:65
uint32 GetEntry() const
Definition: Object.h:107
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

+ Here is the call graph for this function:

void boss_sindragosa::boss_sindragosaAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

295  {
296  if (victim->GetTypeId() == TYPEID_PLAYER)
297  Talk(SAY_KILL);
298  }
Definition: boss_sindragosa.cpp:35
TypeID GetTypeId() const
Definition: Object.h:113
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: ObjectGuid.h:33

+ Here is the call graph for this function:

void boss_sindragosa::boss_sindragosaAI::MovementInform ( uint32  type,
uint32  point 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

335  {
336  if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
337  return;
338 
339  switch (point)
340  {
342  me->setActive(false);
343  me->SetCanFly(false);
344  me->SetDisableGravity(false);
348  me->SetSpeed(MOVE_FLIGHT, 2.5f);
349 
350  // Sindragosa enters combat as soon as she lands
351  DoZoneInCombat();
352  break;
353  case POINT_TAKEOFF:
355  break;
356  case POINT_AIR_PHASE:
358  me->SetFacingTo(float(M_PI));
361  break;
362  case POINT_AIR_PHASE_FAR:
363  me->SetFacingTo(float(M_PI));
365  break;
366  case POINT_LAND:
368  break;
369  case POINT_LAND_GROUND:
370  {
371  me->SetCanFly(false);
372  me->SetDisableGravity(false);
377  _isInAirPhase = false;
378  // trigger Asphyxiation
381  break;
382  }
383  default:
384  break;
385  }
386  }
Definition: boss_sindragosa.cpp:145
Definition: boss_sindragosa.cpp:109
Definition: boss_sindragosa.cpp:142
Definition: Unit.h:605
Definition: Unit.h:674
bool _isInAirPhase
Definition: boss_sindragosa.cpp:551
Definition: Unit.h:163
#define M_PI
Definition: Common.h:163
Position const SindragosaLandPos
Definition: boss_sindragosa.cpp:161
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
Definition: boss_sindragosa.cpp:144
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: Unit.h:254
void DoAction(int32 info, Predicate &predicate, uint16 max=0)
Definition: ScriptedCreature.h:104
Definition: Unit.h:1130
Definition: boss_sindragosa.cpp:105
MovementGeneratorType GetCurrentMovementGeneratorType() const
Definition: MotionMaster.cpp:663
arena_t NULL
Definition: jemalloc_internal.h:624
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:670
Will ignore most target checks (mostly DBC target checks)
Definition: Unit.h:479
Definition: Unit.h:253
bool SetDisableGravity(bool disable, bool packetOnly=false)
Definition: Unit.cpp:15818
Definition: boss_sindragosa.cpp:110
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_sindragosa.cpp:107
Definition: boss_sindragosa.cpp:146
bool SetCanFly(bool enable)
Definition: Unit.cpp:15899
void RemoveByteFlag(uint16 index, uint8 offset, uint8 newFlag)
Definition: Object.cpp:1271
Definition: MotionMaster.h:54
void SetFacingTo(float ori)
Definition: Unit.cpp:15777
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_sindragosa.cpp:59
Definition: ScriptedCreature.h:126
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: boss_sindragosa.cpp:147
Definition: UpdateFields.h:109
Definition: icecrown_citadel.h:299
Definition: boss_sindragosa.cpp:106
Definition: UpdateFields.h:124
EventMap events
Definition: ScriptedCreature.h:371
Definition: icecrown_citadel.h:491
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:10531
void MovementExpired(bool reset=true)
Definition: MotionMaster.h:151
void SetReactState(ReactStates st)
Definition: Creature.h:502
Definition: MotionMaster.h:46
void CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:920
Definition: boss_sindragosa.cpp:143

+ Here is the call graph for this function:

void boss_sindragosa::boss_sindragosaAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

235  {
236  BossAI::Reset();
237  DoCast(me, SPELL_TANK_MARKER, true);
245  Initialize();
246 
247  if (!_summoned)
248  {
249  me->SetCanFly(true);
250  me->SetDisableGravity(true);
251  }
252  }
Definition: boss_sindragosa.cpp:98
Definition: boss_sindragosa.cpp:46
Definition: boss_sindragosa.cpp:95
bool _summoned
Definition: boss_sindragosa.cpp:553
bool SetDisableGravity(bool disable, bool packetOnly=false)
Definition: Unit.cpp:15818
Definition: boss_sindragosa.cpp:127
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_sindragosa.cpp:100
void Initialize()
Definition: boss_sindragosa.cpp:227
Definition: boss_sindragosa.cpp:99
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
bool SetCanFly(bool enable)
Definition: Unit.cpp:15899
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Reset() override
Definition: ScriptedCreature.h:355
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_sindragosa.cpp:97
Definition: boss_sindragosa.cpp:96
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_sindragosa.cpp:103

+ Here is the call graph for this function:

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

Reimplemented from ScriptedAI.

417  {
418  if (spell->Id == 70127)
419  if (Aura const* mysticBuffet = target->GetAura(spell->Id))
420  _mysticBuffetStack = std::max<uint8>(_mysticBuffetStack, mysticBuffet->GetStackAmount());
421 
422  }
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4151
uint8 _mysticBuffetStack
Definition: boss_sindragosa.cpp:550
Definition: SpellAuras.h:116

+ Here is the call graph for this function:

void boss_sindragosa::boss_sindragosaAI::SummonedCreatureDespawn ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

410  {
412  if (summon->GetEntry() == NPC_ICE_TOMB)
413  summon->AI()->JustDied(summon);
414  }
void SummonedCreatureDespawn(Creature *summon) override
Definition: ScriptedCreature.cpp:518
CreatureAI * AI() const
Definition: Creature.h:525
virtual void JustDied(Unit *)
Definition: CreatureAI.h:117
Definition: icecrown_citadel.h:299
uint32 GetEntry() const
Definition: Object.h:107

+ Here is the call graph for this function:

void boss_sindragosa::boss_sindragosaAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

425  {
426  if (!UpdateVictim())
427  return;
428 
429  events.Update(diff);
430 
432  return;
433 
434  while (uint32 eventId = events.ExecuteEvent())
435  {
436  switch (eventId)
437  {
438  case EVENT_BERSERK:
440  Talk(SAY_BERSERK);
442  break;
443  case EVENT_CLEAVE:
446  break;
447  case EVENT_TAIL_SMASH:
450  break;
451  case EVENT_FROST_BREATH:
454  break;
459  break;
460  case EVENT_ICY_GRIP:
463  break;
468  break;
471  break;
472  case EVENT_AIR_PHASE:
473  {
474  _isInAirPhase = true;
476  me->SetCanFly(true);
477  me->SetDisableGravity(true);
480  me->AttackStop();
481  Position pos;
482  pos.Relocate(me);
483  pos.m_positionZ += 17.0f;
487  break;
488  }
489  case EVENT_AIR_MOVEMENT:
491  break;
494  break;
495  case EVENT_ICE_TOMB:
497  {
498  Talk(EMOTE_WARN_FROZEN_ORB, target);
500  }
501  events.ScheduleEvent(EVENT_ICE_TOMB, urand(16000, 23000));
502  break;
503  case EVENT_FROST_BOMB:
504  {
505  float destX, destY, destZ;
506  destX = float(rand_norm()) * 75.0f + 4350.0f;
507  destY = float(rand_norm()) * 75.0f + 2450.0f;
508  destZ = 205.0f; // random number close to ground, get exact in next call
509  me->UpdateGroundPositionZ(destX, destY, destZ);
510  me->CastSpell(destX, destY, destZ, SPELL_FROST_BOMB_TRIGGER, false);
512  break;
513  }
514  case EVENT_LAND:
515  {
518  break;
519  }
520  case EVENT_LAND_GROUND:
527  break;
529  {
530  if (!_isInAirPhase)
531  {
532  Talk(SAY_PHASE_2);
533  events.ScheduleEvent(EVENT_ICE_TOMB, urand(7000, 10000));
534  events.RescheduleEvent(EVENT_ICY_GRIP, urand(35000, 40000));
535  DoCast(me, SPELL_MYSTIC_BUFFET, true);
536  }
537  else
539  break;
540  }
541  default:
542  break;
543  }
544  }
545 
547  }
bool AttackStop()
Definition: Unit.cpp:7337
Definition: boss_sindragosa.cpp:30
Definition: boss_sindragosa.cpp:98
Definition: boss_sindragosa.cpp:145
Definition: boss_sindragosa.cpp:109
Definition: boss_sindragosa.cpp:49
Definition: boss_sindragosa.cpp:95
Definition: boss_sindragosa.cpp:57
Definition: boss_sindragosa.cpp:39
bool UpdateVictim()
Definition: CreatureAI.cpp:233
void CancelEventGroup(uint32 group)
Definition: EventMap.cpp:103
bool _isInAirPhase
Definition: boss_sindragosa.cpp:551
Definition: Unit.h:163
bool _isThirdPhase
Definition: boss_sindragosa.cpp:552
Definition: Unit.h:565
Definition: Unit.h:1129
Position const SindragosaLandPos
Definition: boss_sindragosa.cpp:161
Definition: boss_sindragosa.cpp:144
Definition: boss_sindragosa.cpp:51
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: Unit.h:254
Definition: boss_sindragosa.cpp:105
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:89
Will ignore most target checks (mostly DBC target checks)
Definition: Unit.h:479
Definition: Unit.h:253
bool SetDisableGravity(bool disable, bool packetOnly=false)
Definition: Unit.cpp:15818
Definition: boss_sindragosa.cpp:110
Position const SindragosaFlyInPos
Definition: boss_sindragosa.cpp:164
Definition: boss_sindragosa.cpp:127
Definition: boss_sindragosa.cpp:102
Definition: boss_sindragosa.cpp:29
Definition: boss_sindragosa.cpp:34
void SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
Definition: Object.cpp:1252
Definition: boss_sindragosa.cpp:199
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
Definition: boss_sindragosa.cpp:107
Definition: boss_sindragosa.cpp:146
Definition: boss_sindragosa.cpp:100
void Relocate(float x, float y)
Definition: Position.h:67
Definition: UnitAI.h:35
Definition: boss_sindragosa.cpp:37
Position const SindragosaAirPos
Definition: boss_sindragosa.cpp:162
Definition: boss_sindragosa.cpp:99
Definition: boss_sindragosa.cpp:104
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
bool SetCanFly(bool enable)
Definition: Unit.cpp:15899
uint32_t uint32
Definition: Define.h:150
Definition: boss_sindragosa.cpp:52
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
float m_positionZ
Definition: Position.h:54
#define SPELL_BERSERK
Definition: boss_four_horsemen.cpp:74
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_sindragosa.cpp:108
Position const SindragosaAirPosFar
Definition: boss_sindragosa.cpp:163
void Update(uint32 time)
Definition: EventMap.h:54
void MoveLand(uint32 id, Position const &pos)
Definition: MotionMaster.cpp:299
Definition: boss_sindragosa.cpp:59
void RescheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:146
Definition: boss_sindragosa.cpp:147
double rand_norm()
Definition: Random.cpp:69
Definition: boss_sindragosa.cpp:55
Definition: boss_sindragosa.cpp:97
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
Definition: boss_sindragosa.cpp:106
Definition: UpdateFields.h:124
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
Definition: boss_sindragosa.cpp:96
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
Definition: boss_sindragosa.cpp:53
Definition: Position.h:27
Definition: boss_sindragosa.cpp:28
Definition: boss_sindragosa.cpp:64
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_sindragosa.cpp:68
Definition: boss_sindragosa.cpp:33
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
Definition: boss_sindragosa.cpp:32
Definition: boss_sindragosa.cpp:50
void MoveTakeoff(uint32 id, Position const &pos)
Definition: MotionMaster.cpp:313
Definition: Unit.h:1305
void SetReactState(ReactStates st)
Definition: Creature.h:502
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_sindragosa.cpp:103
Definition: boss_sindragosa.cpp:101
void CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:920
Definition: boss_sindragosa.cpp:143
void UpdateGroundPositionZ(float x, float y, float &z) const
Definition: Object.cpp:1827

+ Here is the call graph for this function:

Member Data Documentation

bool boss_sindragosa::boss_sindragosaAI::_isInAirPhase
private
bool boss_sindragosa::boss_sindragosaAI::_isThirdPhase
private
uint8 boss_sindragosa::boss_sindragosaAI::_mysticBuffetStack
private
bool boss_sindragosa::boss_sindragosaAI::_summoned
private

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