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

Public Member Functions

 boss_skadiAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void JustReachedHome () override
 
void EnterCombat (Unit *) override
 
void JustSummoned (Creature *summoned) override
 
void SummonedCreatureDespawn (Creature *summoned) override
 
void SpellHit (Unit *, const SpellInfo *spell) override
 
void UpdateAI (uint32 diff) override
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *who) override
 
void SpawnMobs ()
 
void SpawnTrigger ()
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &) override
 
void SpellHitTarget (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 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 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
 
SummonList Summons
 
ObjectGuid m_uiGraufGUID
 
uint32 m_uiCrushTimer
 
uint32 m_uiPoisonedSpearTimer
 
uint32 m_uiWhirlwindTimer
 
uint32 m_uiWaypointId
 
uint32 m_uiMovementTimer
 
uint32 m_uiMountTimer
 
uint32 m_uiSummonTimer
 
uint8 m_uiSpellHitCount
 
bool m_bSaidEmote
 
CombatPhase Phase
 
- 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)
 
virtual void MoveInLineOfSight (Unit *)
 
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_skadi::boss_skadiAI::boss_skadiAI ( Creature creature)
inline
170  : ScriptedAI(creature), Summons(me)
171  {
172  Initialize();
173  instance = creature->GetInstanceScript();
174  m_uiMovementTimer = 0;
175  m_uiSummonTimer = 0;
176  }
ScriptedAI(Creature *creature)
Definition: ScriptedCreature.cpp:100
SummonList Summons
Definition: boss_skadi.cpp:192
uint32 m_uiMovementTimer
Definition: boss_skadi.cpp:199
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
Creature *const me
Definition: CreatureAI.h:71
InstanceScript * instance
Definition: boss_skadi.cpp:191
void Initialize()
Definition: boss_skadi.cpp:178
uint32 m_uiSummonTimer
Definition: boss_skadi.cpp:201

+ Here is the call graph for this function:

Member Function Documentation

void boss_skadi::boss_skadiAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

229  {
230  Talk(SAY_AGGRO);
231 
233 
234  Phase = FLYING;
235 
236  m_uiMovementTimer = 1000;
237  m_uiSummonTimer = 10000;
241  me->GetMotionMaster()->MoveJump(Location[0], 5.0f, 10.0f);
242  me->SetWalk(false);
243  m_uiMountTimer = 1000;
244  Summons.DespawnEntry(NPC_GRAUF);
245  }
Definition: Unit.h:674
uint32 m_uiMovementTimer
Definition: boss_skadi.cpp:199
Definition: boss_skadi.cpp:148
uint32 m_uiMountTimer
Definition: boss_skadi.cpp:200
Definition: utgarde_pinnacle.h:31
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: DBCEnums.h:183
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Definition: boss_skadi.cpp:155
Creature *const me
Definition: CreatureAI.h:71
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition: InstanceScript.cpp:518
InstanceScript * instance
Definition: boss_skadi.cpp:191
Definition: boss_skadi.cpp:128
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=EVENT_JUMP, bool hasOrientation=false, uint32 arrivalSpellId=0, ObjectGuid const &arrivalSpellTargetGuid=ObjectGuid::Empty)
Definition: MotionMaster.h:184
Definition: InstanceScript.h:59
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
static Position Location[]
Definition: boss_skadi.cpp:46
Definition: UpdateFields.h:109
Definition: boss_skadi.cpp:36
bool SetWalk(bool enable)
Definition: Unit.cpp:15800
void SetInCombatWithZone()
Definition: Creature.cpp:2299
uint32 m_uiSummonTimer
Definition: boss_skadi.cpp:201
Phase
Definition: boss_kiljaeden.cpp:153
Definition: Unit.h:698
Definition: boss_urom.cpp:72

+ Here is the call graph for this function:

void boss_skadi::boss_skadiAI::Initialize ( void  )
inline
179  {
180  m_uiCrushTimer = 8000;
181  m_uiPoisonedSpearTimer = 10000;
182  m_uiWhirlwindTimer = 20000;
183  m_uiMountTimer = 3000;
184  m_uiWaypointId = 0;
185  m_bSaidEmote = false;
186  m_uiSpellHitCount = 0;
187 
188  Phase = SKADI;
189  }
uint8 m_uiSpellHitCount
Definition: boss_skadi.cpp:202
uint32 m_uiPoisonedSpearTimer
Definition: boss_skadi.cpp:196
uint32 m_uiMountTimer
Definition: boss_skadi.cpp:200
uint32 m_uiWhirlwindTimer
Definition: boss_skadi.cpp:197
Definition: boss_skadi.cpp:129
uint32 m_uiWaypointId
Definition: boss_skadi.cpp:198
bool m_bSaidEmote
Definition: boss_skadi.cpp:203
Phase
Definition: boss_kiljaeden.cpp:153
uint32 m_uiCrushTimer
Definition: boss_skadi.cpp:195

+ Here is the caller graph for this function:

void boss_skadi::boss_skadiAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

409  {
410  Talk(SAY_DEATH);
411  Summons.DespawnAll();
413  }
Definition: utgarde_pinnacle.h:31
Definition: inflate.h:49
InstanceScript * instance
Definition: boss_skadi.cpp:191
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_skadi.cpp:39
Definition: boss_urom.cpp:72

+ Here is the call graph for this function:

void boss_skadi::boss_skadiAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

220  {
221  me->SetCanFly(false);
222  me->Dismount();
225  me->SummonCreature(NPC_GRAUF, Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 3.0f);
226  }
Definition: Unit.h:674
Definition: boss_skadi.cpp:148
void Dismount()
Definition: Unit.cpp:9734
Creature *const me
Definition: CreatureAI.h:71
bool SetCanFly(bool enable)
Definition: Unit.cpp:15899
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
static Position Location[]
Definition: boss_skadi.cpp:46
Definition: UpdateFields.h:109
ObjectGuid m_uiGraufGUID
Definition: boss_skadi.cpp:193
Definition: Unit.h:698
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_skadi::boss_skadiAI::JustSummoned ( Creature summoned)
inlineoverridevirtual

Reimplemented from ScriptedAI.

248  {
249  switch (summoned->GetEntry())
250  {
251  case NPC_GRAUF:
252  m_uiGraufGUID = summoned->GetGUID();
253  break;
254  case NPC_YMIRJAR_WARRIOR:
257  summoned->setActive(true);
258  summoned->SetInCombatWithZone();
259  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
260  summoned->AI()->AttackStart(target);
261  break;
262  case NPC_TRIGGER:
263  summoned->CastSpell((Unit*)NULL, SPELL_FREEZING_CLOUD, true);
264  summoned->DespawnOrUnsummon(10*IN_MILLISECONDS);
265  break;
266  }
267  Summons.Summon(summoned);
268  }
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
Definition: Creature.cpp:1774
Definition: boss_skadi.cpp:149
Definition: boss_skadi.cpp:145
Definition: boss_skadi.cpp:148
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: boss_skadi.cpp:147
Definition: boss_skadi.cpp:146
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
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: Common.h:103
void SetInCombatWithZone()
Definition: Creature.cpp:2299
ObjectGuid m_uiGraufGUID
Definition: boss_skadi.cpp:193
uint32 GetEntry() const
Definition: Object.h:107
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
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29
Definition: boss_skadi.cpp:140
Definition: boss_urom.cpp:72

+ Here is the call graph for this function:

void boss_skadi::boss_skadiAI::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from ScriptedAI.

416  {
417  if (who->GetTypeId() == TYPEID_PLAYER)
418  Talk(SAY_KILL);
419  }
Definition: boss_skadi.cpp:37
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_skadi::boss_skadiAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

208  {
209  Initialize();
210 
211  Summons.DespawnAll();
212  me->SetSpeed(MOVE_FLIGHT, 3.0f);
217  }
Definition: Unit.h:605
Definition: boss_skadi.cpp:148
Definition: utgarde_pinnacle.h:31
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition: InstanceScript.cpp:529
Definition: DBCEnums.h:183
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: boss_skadi.cpp:155
Creature *const me
Definition: CreatureAI.h:71
InstanceScript * instance
Definition: boss_skadi.cpp:191
float GetPositionY() const
Definition: Position.h:105
Definition: InstanceScript.h:58
void Initialize()
Definition: boss_skadi.cpp:178
float GetPositionZ() const
Definition: Position.h:106
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
static Position Location[]
Definition: boss_skadi.cpp:46
bool IsMounted() const
Definition: Unit.h:1496
ObjectGuid m_uiGraufGUID
Definition: boss_skadi.cpp:193
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:10531
float GetPositionX() const
Definition: Position.h:104
Definition: boss_urom.cpp:72
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_skadi::boss_skadiAI::SpawnMobs ( )
inline
422  {
423  for (uint8 i = 0; i < DUNGEON_MODE(5, 6); ++i)
424  {
425  switch (urand(0, 2))
426  {
427  case 0:
429  break;
430 
431  case 1:
433  break;
434 
435  case 2:
437  break;
438  }
439  }
440  }
Definition: boss_skadi.cpp:145
static Position SpawnLoc
Definition: boss_skadi.cpp:45
Definition: boss_skadi.cpp:147
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_skadi.cpp:146
float GetPositionY() const
Definition: Position.h:105
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
float GetPositionZ() const
Definition: Position.h:106
const T & DUNGEON_MODE(const T &normal5, const T &heroic10) const
Definition: ScriptedCreature.h:277
uint32 rand32()
Definition: Random.cpp:64
uint8_t uint8
Definition: Define.h:152
float GetPositionX() const
Definition: Position.h:104
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_skadi::boss_skadiAI::SpawnTrigger ( )
inline
443  {
444  uint8 iStart = 0, iEnd = 0;
445  switch (urand(0, 1))
446  {
447  case 0:
448  iStart = 8;
449  iEnd = 37;
450  break;
451  case 1:
452  iStart = 38;
453  iEnd = 68;
454  break;
455  default:
456  break;
457  }
458  for (uint32 i = iStart; i < iEnd; ++i)
460  }
Definition: boss_skadi.cpp:149
Creature *const me
Definition: CreatureAI.h:71
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
uint32_t uint32
Definition: Define.h:150
static Position Location[]
Definition: boss_skadi.cpp:46
uint8_t uint8
Definition: Define.h:152
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_skadi::boss_skadiAI::SpellHit ( Unit ,
const SpellInfo spell 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

278  {
279  if (spell->Id == SPELL_HARPOON_DAMAGE)
280  {
282  if (m_uiSpellHitCount >= 3)
283  {
284  Phase = SKADI;
285  me->SetCanFly(false);
286  me->Dismount();
288  {
289  pGrauf->GetMotionMaster()->MoveFall();
290  pGrauf->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
291  }
292  me->GetMotionMaster()->MoveJump(Location[4], 5.0f, 10.0f);
295  m_uiCrushTimer = 8000;
296  m_uiPoisonedSpearTimer = 10000;
297  m_uiWhirlwindTimer = 20000;
299  }
300  }
301  }
uint32 Id
Definition: SpellInfo.h:329
uint8 m_uiSpellHitCount
Definition: boss_skadi.cpp:202
Definition: Unit.h:674
Definition: boss_skadi.cpp:148
uint32 m_uiPoisonedSpearTimer
Definition: boss_skadi.cpp:196
void Dismount()
Definition: Unit.cpp:9734
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: Creature.h:467
uint32 m_uiWhirlwindTimer
Definition: boss_skadi.cpp:197
Creature *const me
Definition: CreatureAI.h:71
Definition: UnitAI.h:35
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=EVENT_JUMP, bool hasOrientation=false, uint32 arrivalSpellId=0, ObjectGuid const &arrivalSpellTargetGuid=ObjectGuid::Empty)
Definition: MotionMaster.h:184
Definition: boss_skadi.cpp:129
float GetPositionY() const
Definition: Position.h:105
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
float GetPositionZ() const
Definition: Position.h:106
Definition: boss_skadi.cpp:40
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
static Position Location[]
Definition: boss_skadi.cpp:46
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:117
Definition: UpdateFields.h:109
Definition: Common.h:103
Definition: Object.h:59
float GetPositionX() const
Definition: Position.h:104
Phase
Definition: boss_kiljaeden.cpp:153
Definition: SharedDefines.h:2557
Definition: Unit.h:698
Definition: boss_skadi.cpp:139
uint32 m_uiCrushTimer
Definition: boss_skadi.cpp:195
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_skadi::boss_skadiAI::SummonedCreatureDespawn ( Creature summoned)
inlineoverridevirtual

Reimplemented from ScriptedAI.

271  {
272  if (summoned->GetEntry() == NPC_GRAUF)
274  Summons.Despawn(summoned);
275  }
Definition: boss_skadi.cpp:148
void Clear()
Definition: ObjectGuid.h:215
ObjectGuid m_uiGraufGUID
Definition: boss_skadi.cpp:193
uint32 GetEntry() const
Definition: Object.h:107
Definition: boss_urom.cpp:72

+ Here is the call graph for this function:

void boss_skadi::boss_skadiAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

304  {
305  switch (Phase)
306  {
307  case FLYING:
308  if (!UpdateVictim())
309  return;
310 
311  if (me->GetPositionX() >= 519)
312  {
314  if (!m_bSaidEmote)
315  {
316  Talk(EMOTE_RANGE);
317  m_bSaidEmote = true;
318  }
319  }
320  else
321  {
323  m_bSaidEmote = false;
324  }
325 
326  if (m_uiMountTimer && m_uiMountTimer <= diff)
327  {
328  me->Mount(DATA_MOUNT);
329  me->SetCanFly(true);
330  m_uiMountTimer = 0;
331  } else m_uiMountTimer -= diff;
332 
333  if (m_uiSummonTimer <= diff)
334  {
335  SpawnMobs();
336  m_uiSummonTimer = 25000;
337  } else m_uiSummonTimer -= diff;
338 
339  if (m_uiMovementTimer <= diff)
340  {
341  switch (m_uiWaypointId)
342  {
343  case 0:
344  me->GetMotionMaster()->MovePoint(0, Location[1].GetPositionX(), Location[1].GetPositionY(), Location[1].GetPositionZ());
345  m_uiMovementTimer = 5000;
346  break;
347  case 1:
348  me->GetMotionMaster()->MovePoint(0, Location[2].GetPositionX(), Location[2].GetPositionY(), Location[2].GetPositionZ());
349  m_uiMovementTimer = 2000;
350  break;
351  case 2:
352  me->GetMotionMaster()->MovePoint(0, Location[3].GetPositionX(), Location[3].GetPositionY(), Location[3].GetPositionZ());
353  m_uiMovementTimer = 15000;
354  break;
355  case 3:
356  me->GetMotionMaster()->MovePoint(0, Location[69].GetPositionX(), Location[69].GetPositionY(), Location[69].GetPositionZ());
359  m_uiMovementTimer = 2500;
360  break;
361  case 4:
362  me->GetMotionMaster()->MovePoint(0, Location[70].GetPositionX(), Location[70].GetPositionY(), Location[70].GetPositionZ());
363  m_uiMovementTimer = 2000;
364  SpawnTrigger();
365  break;
366  case 5:
367  me->GetMotionMaster()->MovePoint(0, Location[71].GetPositionX(), Location[71].GetPositionY(), Location[71].GetPositionZ());
368  m_uiMovementTimer = 3000;
369  break;
370  case 6:
371  me->GetMotionMaster()->MovePoint(0, Location[3].GetPositionX(), Location[3].GetPositionY(), Location[3].GetPositionZ());
372  m_uiWaypointId = 2;
373  m_uiMovementTimer = 15000;
374  break;
375  }
376  m_uiWaypointId++;
377  } else m_uiMovementTimer -= diff;
378  break;
379  case SKADI:
380  //Return since we have no target
381  if (!UpdateVictim())
382  return;
383 
384  if (m_uiCrushTimer <= diff)
385  {
387  m_uiCrushTimer = 8000;
388  } else m_uiCrushTimer -= diff;
389 
390  if (m_uiPoisonedSpearTimer <= diff)
391  {
392  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
393  DoCast(target, SPELL_POISONED_SPEAR);
394  m_uiPoisonedSpearTimer = 10000;
395  } else m_uiPoisonedSpearTimer -= diff;
396 
397  if (m_uiWhirlwindTimer <= diff)
398  {
400  m_uiWhirlwindTimer = 20000;
401  } else m_uiWhirlwindTimer -= diff;
402 
404  break;
405  }
406  }
void SpawnMobs()
Definition: boss_skadi.cpp:421
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
Definition: Unit.h:674
bool UpdateVictim()
Definition: CreatureAI.cpp:233
uint32 m_uiMovementTimer
Definition: boss_skadi.cpp:199
uint32 m_uiPoisonedSpearTimer
Definition: boss_skadi.cpp:196
Definition: boss_skadi.cpp:150
uint32 m_uiMountTimer
Definition: boss_skadi.cpp:200
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: boss_skadi.cpp:135
uint32 m_uiWhirlwindTimer
Definition: boss_skadi.cpp:197
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
void Mount(uint32 mount, uint32 vehicleId=0, uint32 creatureEntry=0)
Definition: Unit.cpp:9695
Definition: boss_skadi.cpp:41
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
Definition: boss_skadi.cpp:42
Definition: boss_skadi.cpp:128
Definition: boss_skadi.cpp:136
Definition: UnitAI.h:35
Definition: boss_skadi.cpp:129
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
void SpawnTrigger()
Definition: boss_skadi.cpp:442
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_skadi.cpp:38
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
static Position Location[]
Definition: boss_skadi.cpp:46
Definition: UpdateFields.h:109
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
uint32 m_uiWaypointId
Definition: boss_skadi.cpp:198
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
bool m_bSaidEmote
Definition: boss_skadi.cpp:203
float GetPositionX() const
Definition: Position.h:104
uint32 m_uiSummonTimer
Definition: boss_skadi.cpp:201
Definition: Unit.h:1305
Phase
Definition: boss_kiljaeden.cpp:153
Definition: Unit.h:698
Definition: boss_skadi.cpp:137
uint32 m_uiCrushTimer
Definition: boss_skadi.cpp:195

+ Here is the call graph for this function:

Member Data Documentation

InstanceScript* boss_skadi::boss_skadiAI::instance
bool boss_skadi::boss_skadiAI::m_bSaidEmote
uint32 boss_skadi::boss_skadiAI::m_uiCrushTimer
ObjectGuid boss_skadi::boss_skadiAI::m_uiGraufGUID
uint32 boss_skadi::boss_skadiAI::m_uiMountTimer
uint32 boss_skadi::boss_skadiAI::m_uiMovementTimer
uint32 boss_skadi::boss_skadiAI::m_uiPoisonedSpearTimer
uint8 boss_skadi::boss_skadiAI::m_uiSpellHitCount
uint32 boss_skadi::boss_skadiAI::m_uiSummonTimer
uint32 boss_skadi::boss_skadiAI::m_uiWaypointId
uint32 boss_skadi::boss_skadiAI::m_uiWhirlwindTimer
CombatPhase boss_skadi::boss_skadiAI::Phase
SummonList boss_skadi::boss_skadiAI::Summons

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