AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_skadi::boss_skadiAI Struct Reference
Inheritance diagram for boss_skadi::boss_skadiAI:
ScriptedAI CreatureAI UnitAI

Public Member Functions

 boss_skadiAI (Creature *creature)
 
void Reset () override
 
void JustSummoned (Creature *summon) override
 
void SpawnFirstWave ()
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void DoAction (int32 param) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *who) override
 
void EnterEvadeMode (EvadeReason=EVADE_REASON_OTHER) override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
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 IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
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
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual bool IsEscortNPC (bool=true) const
 
void JustEnteredCombat (Unit *who) override
 Called when the unit enters combat.
 
virtual void JustStartedThreateningMe (Unit *who)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnChannelFinished (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast.
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Private Attributes

InstanceScript_instance
 
EventMap _events
 
SummonList _summons
 
CombatPhase _phase
 
bool _firstWaveSummoned
 
bool _encounterStarted
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
- 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)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
bool _isEngaged
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_skadiAI()

boss_skadi::boss_skadiAI::boss_skadiAI ( Creature creature)
inline
163 : ScriptedAI(creature), _summons(me)
164 {
165 _instance = creature->GetInstanceScript();
166 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1238
Definition ScriptedCreature.h:191
Creature * me
Definition ScriptedCreature.h:281
InstanceScript * _instance
Definition boss_skadi.cpp:366
SummonList _summons
Definition boss_skadi.cpp:368

References _instance, and WorldObject::GetInstanceScript().

Member Function Documentation

◆ DoAction()

void boss_skadi::boss_skadiAI::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

233 {
234 switch (param)
235 {
238 return;
239
240 _encounterStarted = true;
243
245 me->setActive(true);
246
248
249 if (_instance)
250 {
251 if (IsHeroic())
254 }
255
256 if (Creature* summonTrigger = me->SummonCreature(NPC_WORLD_TRIGGER, SpawnLoc))
257 summonTrigger->CastSpell(summonTrigger, SPELL_SUMMON_GAUNTLET_MOBS_PERIODIC, true);
258
259 if (Creature* combatTrigger = me->SummonCreature(NPC_COMBAT_TRIGGER, SpawnLoc))
260 combatTrigger->AI()->DoZoneInCombat();
261
264 break;
267 break;
268 case ACTION_PHASE2:
273 me->SetImmuneToPC(false);
276
280 break;
281 }
282 }
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition DBCEnums.h:110
@ IN_PROGRESS
Definition InstanceScript.h:59
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:282
@ REACT_AGGRESSIVE
Definition Unit.h:568
@ NPC_COMBAT_TRIGGER
Definition boss_skadi.cpp:87
@ NPC_WORLD_TRIGGER
Definition boss_skadi.cpp:86
@ ACHIEV_TIMED_LODI_DODI
Definition boss_skadi.cpp:89
@ ACTION_PHASE2
Definition boss_skadi.cpp:73
@ ACTION_START_ENCOUNTER
Definition boss_skadi.cpp:71
@ ACTION_DRAKE_BREATH
Definition boss_skadi.cpp:72
@ SPELL_SKADI_TELEPORT
Definition boss_skadi.cpp:37
@ SPELL_SUMMON_GAUNTLET_MOBS_PERIODIC
Definition boss_skadi.cpp:47
@ SAY_DRAKE_DEATH
Definition boss_skadi.cpp:63
@ SAY_AGGRO
Definition boss_skadi.cpp:60
@ SAY_DRAKE_BREATH
Definition boss_skadi.cpp:64
Position const SpawnLoc
Definition boss_skadi.cpp:96
@ PHASE_FLYING
Definition boss_skadi.cpp:78
@ PHASE_GROUND
Definition boss_skadi.cpp:79
@ EVENT_SKADI_WHIRLWIND
Definition boss_skadi.cpp:141
@ EVENT_SKADI_SPEAR
Definition boss_skadi.cpp:140
@ EVENT_SKADI_RESET_CHECK
Definition boss_skadi.cpp:142
@ EVENT_SKADI_CRUSH
Definition boss_skadi.cpp:139
@ EVENT_GRAUF_START
Definition boss_skadi.cpp:145
Definition Creature.h:47
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:100
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:48
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition InstanceScript.cpp:676
void DespawnEntry(uint32 entry)
Definition ScriptedCreature.cpp:55
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:394
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:748
void SetImmuneToPC(bool apply, bool keepCombat=false)
Definition Unit.cpp:10623
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:749
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition Object.cpp:2393
void setActive(bool isActiveObject)
Definition Object.cpp:1082
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
Talk
Definition hyjal.cpp:82
bool IsHeroic() const
Definition ScriptedCreature.h:383
bool _encounterStarted
Definition boss_skadi.cpp:371
CombatPhase _phase
Definition boss_skadi.cpp:369
void SpawnFirstWave()
Definition boss_skadi.cpp:211
EventMap _events
Definition boss_skadi.cpp:367
@ DATA_SKADI_THE_RUTHLESS
Definition utgarde_pinnacle.h:31

References _encounterStarted, _events, _instance, _phase, _summons, ACHIEV_TIMED_LODI_DODI, ACHIEVEMENT_TIMED_TYPE_EVENT, ACTION_DRAKE_BREATH, ACTION_PHASE2, ACTION_START_ENCOUNTER, DATA_SKADI_THE_RUTHLESS, SummonList::DespawnEntry(), UnitAI::DoCastSelf(), InstanceScript::DoStartTimedAchievement(), EVENT_GRAUF_START, EVENT_SKADI_CRUSH, EVENT_SKADI_RESET_CHECK, EVENT_SKADI_SPEAR, EVENT_SKADI_WHIRLWIND, IN_PROGRESS, ScriptedAI::IsHeroic(), ScriptedAI::me, NPC_COMBAT_TRIGGER, NPC_WORLD_TRIGGER, PHASE_FLYING, PHASE_GROUND, REACT_AGGRESSIVE, Unit::RemoveUnitFlag(), SAY_AGGRO, SAY_DRAKE_BREATH, SAY_DRAKE_DEATH, EventMap::ScheduleEvent(), WorldObject::setActive(), ZoneScript::SetData(), Unit::SetImmuneToPC(), Creature::SetReactState(), Unit::SetUnitFlag(), SpawnFirstWave(), SpawnLoc, SPELL_SKADI_TELEPORT, SPELL_SUMMON_GAUNTLET_MOBS_PERIODIC, WorldObject::SummonCreature(), and UNIT_FLAG_NOT_SELECTABLE.

Referenced by JustEngagedWith().

◆ EnterEvadeMode()

void boss_skadi::boss_skadiAI::EnterEvadeMode ( EvadeReason  = EVADE_REASON_OTHER)
inlineoverridevirtual

Reimplemented from CreatureAI.

360 {
363 }
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:235
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:72

References _summons, SummonList::DespawnAll(), and CreatureAI::EnterEvadeMode().

Referenced by UpdateAI().

◆ JustDied()

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

Reimplemented from CreatureAI.

342 {
345
346 if (_instance)
347 {
350 }
351 }
@ DONE
Definition InstanceScript.h:61
@ SAY_DEATH
Definition boss_skadi.cpp:62
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Open or close a GameObject by GUID.
Definition InstanceScript.cpp:126
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:111
@ SKADI_DOOR
Definition utgarde_pinnacle.h:45

References _instance, _summons, DATA_SKADI_THE_RUTHLESS, SummonList::DespawnAll(), DONE, InstanceScript::GetGuidData(), InstanceScript::HandleGameObject(), SAY_DEATH, ZoneScript::SetData(), and SKADI_DOOR.

◆ JustEngagedWith()

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

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

Reimplemented from CreatureAI.

228 {
230 }
void DoAction(int32 param) override
Definition boss_skadi.cpp:232

References ACTION_START_ENCOUNTER, and DoAction().

◆ JustSummoned()

void boss_skadi::boss_skadiAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from CreatureAI.

193 {
194 switch (summon->GetEntry())
195 {
200 {
203 }
204 break;
205 default:
206 break;
207 }
208 _summons.Summon(summon);
209 }
@ PATH_GAUNTLET_ADDS
Definition boss_skadi.cpp:129
void LoadPath(uint32 pathid)
Definition Creature.h:358
void MoveWaypoint(uint32 path_id, bool repeatable, PathSource pathSource=PathSource::WAYPOINT_MGR)
Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:913
uint32 GetEntry() const
Definition Object.h:117
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
MotionMaster * GetMotionMaster()
Definition Unit.h:1759
bool _firstWaveSummoned
Definition boss_skadi.cpp:370
@ NPC_YMIRJAR_WITCH_DOCTOR
Definition utgarde_pinnacle.h:76
@ NPC_YMIRJAR_WARRIOR
Definition utgarde_pinnacle.h:75
@ NPC_YMIRJAR_HARPOONER
Definition utgarde_pinnacle.h:77

References _firstWaveSummoned, _summons, Object::GetEntry(), Unit::GetMotionMaster(), Creature::LoadPath(), MotionMaster::MoveWaypoint(), NPC_YMIRJAR_HARPOONER, NPC_YMIRJAR_WARRIOR, NPC_YMIRJAR_WITCH_DOCTOR, PATH_GAUNTLET_ADDS, and SummonList::Summon().

◆ KilledUnit()

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

Reimplemented from CreatureAI.

354 {
355 if (who->IsPlayer())
356 Talk(SAY_KILL);
357 }
@ SAY_KILL
Definition boss_skadi.cpp:61
bool IsPlayer() const
Definition Object.h:201

References Object::IsPlayer(), and SAY_KILL.

◆ Reset()

void boss_skadi::boss_skadiAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

169 {
170 _events.Reset();
173 _firstWaveSummoned = false;
174 _encounterStarted = false;
175
178 me->SetImmuneToPC(false);
179
180 if (_instance)
181 {
185 }
186
189 _summons.Summon(grauf);
190 }
@ NOT_STARTED
Definition InstanceScript.h:58
@ REACT_PASSIVE
Definition Unit.h:566
@ NPC_GRAUF
Definition boss_skadi.cpp:84
Position const GraufLoc
Definition boss_skadi.cpp:95
void Reset()
Definition EventMap.cpp:21
Creature * GetCreature(uint32 type)
Definition InstanceScript.cpp:116
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition InstanceScript.cpp:685
@ DATA_SKADI_ACHIEVEMENT
Definition utgarde_pinnacle.h:50
@ DATA_GRAUF
Definition utgarde_pinnacle.h:33

References _encounterStarted, _events, _firstWaveSummoned, _instance, _phase, _summons, ACHIEV_TIMED_LODI_DODI, ACHIEVEMENT_TIMED_TYPE_EVENT, DATA_GRAUF, DATA_SKADI_ACHIEVEMENT, DATA_SKADI_THE_RUTHLESS, SummonList::DespawnAll(), InstanceScript::DoStopTimedAchievement(), InstanceScript::GetCreature(), GraufLoc, ScriptedAI::me, NOT_STARTED, NPC_GRAUF, PHASE_GROUND, REACT_PASSIVE, Unit::RemoveUnitFlag(), EventMap::Reset(), ZoneScript::SetData(), Unit::SetImmuneToPC(), Creature::SetReactState(), SummonList::Summon(), WorldObject::SummonCreature(), and UNIT_FLAG_NOT_SELECTABLE.

◆ SpawnFirstWave()

void boss_skadi::boss_skadiAI::SpawnFirstWave ( )
inline
212 {
213 for (uint8 i = 0; i < FIRST_WAVE_MAX_WARRIORS; ++i)
215 summon->GetMotionMaster()->MovePoint(0, FirstWaveLocations[i]);
216
218 crea->GetMotionMaster()->MovePoint(0, FirstWaveLocations[10]);
220 crea->GetMotionMaster()->MovePoint(0, FirstWaveLocations[11]);
222 crea->GetMotionMaster()->MovePoint(0, FirstWaveLocations[12]);
223
224 _firstWaveSummoned = true;
225 }
std::uint8_t uint8
Definition Define.h:109
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition Object.h:54
@ FIRST_WAVE_MAX_WARRIORS
Definition boss_skadi.cpp:91
Position const FirstWaveLocations[FIRST_WAVE_SIZE]
Definition boss_skadi.cpp:98

References _firstWaveSummoned, FIRST_WAVE_MAX_WARRIORS, FirstWaveLocations, ScriptedAI::me, NPC_YMIRJAR_HARPOONER, NPC_YMIRJAR_WARRIOR, NPC_YMIRJAR_WITCH_DOCTOR, SpawnLoc, WorldObject::SummonCreature(), and TEMPSUMMON_CORPSE_TIMED_DESPAWN.

Referenced by DoAction().

◆ UpdateAI()

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

Use to start attacking a target. Called just before JustEngagedWith()

Implements UnitAI.

285 {
286 _events.Update(diff);
287
288 if (_phase == PHASE_FLYING)
289 {
290 switch (_events.ExecuteEvent())
291 {
293 {
295 {
296 me->EnterVehicleUnattackable(grauf, 0);
297 grauf->AI()->DoAction(ACTION_START_ENCOUNTER);
298 }
299 else
301 break;
302 }
304 {
305 if (Creature* resetTrigger = me->FindNearestCreature(NPC_TRIGGER_RESET, 200.0f))
306 resetTrigger->CastSpell(resetTrigger, SPELL_GAUNTLET_RESET_CHECK, true);
307 _events.Repeat(6s);
308 break;
309 }
310 }
311 return;
312 }
313
314 if (!UpdateVictim())
315 return;
316
318 return;
319
320 switch (_events.ExecuteEvent())
321 {
324 _events.Repeat(8s);
325 break;
329 _events.Repeat(10s);
330 break;
333 _events.Repeat(15s, 20s);
334 _events.DelayEvents(10s);
335 break;
336 }
337
339 }
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ NPC_TRIGGER_RESET
Definition boss_skadi.cpp:85
@ SPELL_POISONED_SPEAR
Definition boss_skadi.cpp:33
@ SPELL_GAUNTLET_RESET_CHECK
Definition boss_skadi.cpp:54
@ SPELL_WHIRLWIND
Definition boss_skadi.cpp:35
@ SPELL_CRUSH
Definition boss_skadi.cpp:32
bool UpdateVictim()
Definition CreatureAI.cpp:350
void Update(uint32 time)
Definition EventMap.h:67
void Repeat(Milliseconds time)
Definition EventMap.cpp:76
void DelayEvents(Milliseconds delay)
Definition EventMap.cpp:108
EventId ExecuteEvent()
Definition EventMap.cpp:86
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:40
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:277
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:111
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:178
Definition Unit.h:664
void EnterVehicleUnattackable(Unit *base, int8 seatId=-1)
Definition Unit.cpp:15617
bool HasUnitState(const uint32 f) const
Definition Unit.h:736
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2498
void EnterEvadeMode(EvadeReason=EVADE_REASON_OTHER) override
Definition boss_skadi.cpp:359

References _events, _instance, _phase, ACTION_START_ENCOUNTER, DATA_GRAUF, EventMap::DelayEvents(), UnitAI::DoCast(), UnitAI::DoCastVictim(), UnitAI::DoMeleeAttackIfReady(), EnterEvadeMode(), Unit::EnterVehicleUnattackable(), EVENT_GRAUF_START, EVENT_SKADI_CRUSH, EVENT_SKADI_RESET_CHECK, EVENT_SKADI_SPEAR, EVENT_SKADI_WHIRLWIND, EventMap::ExecuteEvent(), WorldObject::FindNearestCreature(), InstanceScript::GetCreature(), Unit::HasUnitState(), ScriptedAI::me, NPC_TRIGGER_RESET, PHASE_FLYING, Random, EventMap::Repeat(), UnitAI::SelectTarget(), SPELL_CRUSH, SPELL_GAUNTLET_RESET_CHECK, SPELL_POISONED_SPEAR, SPELL_WHIRLWIND, UNIT_STATE_CASTING, EventMap::Update(), and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _encounterStarted

bool boss_skadi::boss_skadiAI::_encounterStarted
private

Referenced by DoAction(), and Reset().

◆ _events

EventMap boss_skadi::boss_skadiAI::_events
private

Referenced by DoAction(), Reset(), and UpdateAI().

◆ _firstWaveSummoned

bool boss_skadi::boss_skadiAI::_firstWaveSummoned
private

Referenced by JustSummoned(), Reset(), and SpawnFirstWave().

◆ _instance

InstanceScript* boss_skadi::boss_skadiAI::_instance
private

◆ _phase

CombatPhase boss_skadi::boss_skadiAI::_phase
private

Referenced by DoAction(), Reset(), and UpdateAI().

◆ _summons

SummonList boss_skadi::boss_skadiAI::_summons
private

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