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
 
uint32 GetData (uint32 id) const 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 ()
 
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 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
 
uint8 _harpoonHit
 
uint8 _loveSkadi
 
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
157 : ScriptedAI(creature), _summons(me)
158 {
159 _instance = creature->GetInstanceScript();
160 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1238
Definition ScriptedCreature.h:191
Creature * me
Definition ScriptedCreature.h:281
InstanceScript * _instance
Definition boss_skadi.cpp:373
SummonList _summons
Definition boss_skadi.cpp:375

References _instance, and WorldObject::GetInstanceScript().

Member Function Documentation

◆ DoAction()

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

Reimplemented from UnitAI.

226 {
227 switch (param)
228 {
231 return;
232
233 _encounterStarted = true;
236
238 me->setActive(true);
239
241
242 if (_instance)
243 {
244 if (IsHeroic())
247 }
248
249 if (Creature* summonTrigger = me->SummonCreature(NPC_WORLD_TRIGGER, SpawnLoc))
250 summonTrigger->CastSpell(summonTrigger, SPELL_SUMMON_GAUNTLET_MOBS_PERIODIC, true);
251
252 if (Creature* combatTrigger = me->SummonCreature(NPC_COMBAT_TRIGGER, SpawnLoc))
253 combatTrigger->AI()->DoZoneInCombat();
254
257 break;
259 if (_loveSkadi == 1)
260 ++_loveSkadi;
262 break;
263 case ACTION_PHASE2:
268 me->SetImmuneToPC(false);
271
275 break;
277 ++_harpoonHit;
278 if (_harpoonHit == 1)
279 _loveSkadi = 1;
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:88
@ NPC_WORLD_TRIGGER
Definition boss_skadi.cpp:87
@ ACHIEV_TIMED_LODI_DODI
Definition boss_skadi.cpp:90
@ ACTION_PHASE2
Definition boss_skadi.cpp:73
@ ACTION_HARPOON_HIT
Definition boss_skadi.cpp:74
@ 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:97
@ PHASE_FLYING
Definition boss_skadi.cpp:79
@ PHASE_GROUND
Definition boss_skadi.cpp:80
@ EVENT_SKADI_WHIRLWIND
Definition boss_skadi.cpp:136
@ EVENT_SKADI_SPEAR
Definition boss_skadi.cpp:135
@ EVENT_SKADI_RESET_CHECK
Definition boss_skadi.cpp:137
@ EVENT_SKADI_CRUSH
Definition boss_skadi.cpp:134
@ EVENT_GRAUF_START
Definition boss_skadi.cpp:140
Definition Creature.h:47
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:99
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:670
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:10597
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:2394
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:380
CombatPhase _phase
Definition boss_skadi.cpp:376
uint8 _harpoonHit
Definition boss_skadi.cpp:377
uint8 _loveSkadi
Definition boss_skadi.cpp:378
void SpawnFirstWave()
Definition boss_skadi.cpp:204
EventMap _events
Definition boss_skadi.cpp:374
@ DATA_SKADI_THE_RUTHLESS
Definition utgarde_pinnacle.h:31

References _encounterStarted, _events, _harpoonHit, _instance, _loveSkadi, _phase, _summons, ACHIEV_TIMED_LODI_DODI, ACHIEVEMENT_TIMED_TYPE_EVENT, ACTION_DRAKE_BREATH, ACTION_HARPOON_HIT, 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.

367 {
370 }
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().

◆ GetData()

uint32 boss_skadi::boss_skadiAI::GetData ( uint32  id) const
inlineoverridevirtual

Reimplemented from UnitAI.

285 {
286 if (id == DATA_LOVE_TO_SKADI)
287 return _loveSkadi;
288 return 0;
289 }
@ DATA_LOVE_TO_SKADI
Definition utgarde_pinnacle.h:52

References _loveSkadi, and DATA_LOVE_TO_SKADI.

◆ JustDied()

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

Reimplemented from CreatureAI.

349 {
352
353 if (_instance)
354 {
357 }
358 }
@ 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:125
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:110
@ 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.

221 {
223 }
void DoAction(int32 param) override
Definition boss_skadi.cpp:225

References ACTION_START_ENCOUNTER, and DoAction().

◆ JustSummoned()

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

Reimplemented from CreatureAI.

189 {
190 switch (summon->GetEntry())
191 {
197 break;
198 default:
199 break;
200 }
201 _summons.Summon(summon);
202 }
Position const SecondaryWavesInitialPoint
Definition boss_skadi.cpp:116
void MovePoint(uint32 id, const Position &pos, ForcedMovement forcedMovement=FORCED_MOVEMENT_NONE, float speed=0.f, bool generatePath=true, bool forceDestination=true, std::optional< AnimTier > animTier=std::nullopt)
Definition MotionMaster.h:240
uint32 GetEntry() const
Definition Object.h:117
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
bool _firstWaveSummoned
Definition boss_skadi.cpp:379
@ 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(), MotionMaster::MovePoint(), NPC_YMIRJAR_HARPOONER, NPC_YMIRJAR_WARRIOR, NPC_YMIRJAR_WITCH_DOCTOR, SecondaryWavesInitialPoint, and SummonList::Summon().

◆ KilledUnit()

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

Reimplemented from CreatureAI.

361 {
362 if (who->IsPlayer())
363 Talk(SAY_KILL);
364 }
@ 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.

163 {
164 _events.Reset();
167 _harpoonHit = 0;
168 _loveSkadi = 0;
169 _firstWaveSummoned = false;
170 _encounterStarted = false;
171
174 me->SetImmuneToPC(false);
175
176 if (_instance)
177 {
181 }
182
185 _summons.Summon(grauf);
186 }
@ NOT_STARTED
Definition InstanceScript.h:58
@ REACT_PASSIVE
Definition Unit.h:566
@ NPC_GRAUF
Definition boss_skadi.cpp:85
Position const GraufLoc
Definition boss_skadi.cpp:96
void Reset()
Definition EventMap.cpp:21
Creature * GetCreature(uint32 type)
Definition InstanceScript.cpp:115
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition InstanceScript.cpp:679
@ DATA_SKADI_ACHIEVEMENT
Definition utgarde_pinnacle.h:50
@ DATA_GRAUF
Definition utgarde_pinnacle.h:33

References _encounterStarted, _events, _firstWaveSummoned, _harpoonHit, _instance, _loveSkadi, _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
205 {
206 for (uint8 i = 0; i < FIRST_WAVE_MAX_WARRIORS; ++i)
208 summon->GetMotionMaster()->MovePoint(0, FirstWaveLocations[i]);
209
211 crea->GetMotionMaster()->MovePoint(0, FirstWaveLocations[10]);
213 crea->GetMotionMaster()->MovePoint(0, FirstWaveLocations[11]);
215 crea->GetMotionMaster()->MovePoint(0, FirstWaveLocations[12]);
216
217 _firstWaveSummoned = true;
218 }
std::uint8_t uint8
Definition Define.h:109
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition Object.h:54
@ FIRST_WAVE_MAX_WARRIORS
Definition boss_skadi.cpp:92
Position const FirstWaveLocations[FIRST_WAVE_SIZE]
Definition boss_skadi.cpp:99

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.

292 {
293 _events.Update(diff);
294
295 if (_phase == PHASE_FLYING)
296 {
297 switch (_events.ExecuteEvent())
298 {
300 {
302 {
303 me->EnterVehicleUnattackable(grauf, 0);
304 grauf->AI()->DoAction(ACTION_START_ENCOUNTER);
305 }
306 else
308 break;
309 }
311 {
312 if (Creature* resetTrigger = me->FindNearestCreature(NPC_TRIGGER_RESET, 200.0f))
313 resetTrigger->CastSpell(resetTrigger, SPELL_GAUNTLET_RESET_CHECK, true);
314 _events.Repeat(6s);
315 break;
316 }
317 }
318 return;
319 }
320
321 if (!UpdateVictim())
322 return;
323
325 return;
326
327 switch (_events.ExecuteEvent())
328 {
331 _events.Repeat(8s);
332 break;
336 _events.Repeat(10s);
337 break;
340 _events.Repeat(15s, 20s);
341 _events.DelayEvents(10s);
342 break;
343 }
344
346 }
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ NPC_TRIGGER_RESET
Definition boss_skadi.cpp:86
@ 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:353
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:15588
bool HasUnitState(const uint32 f) const
Definition Unit.h:736
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2499
void EnterEvadeMode(EvadeReason=EVADE_REASON_OTHER) override
Definition boss_skadi.cpp:366

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().

◆ _harpoonHit

uint8 boss_skadi::boss_skadiAI::_harpoonHit
private

Referenced by DoAction(), and Reset().

◆ _instance

InstanceScript* boss_skadi::boss_skadiAI::_instance
private

◆ _loveSkadi

uint8 boss_skadi::boss_skadiAI::_loveSkadi
private

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

◆ _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: