AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_skadi_grauf::boss_skadi_graufAI Struct Reference
Inheritance diagram for boss_skadi_grauf::boss_skadi_graufAI:
VehicleAI CreatureAI UnitAI

Public Member Functions

 boss_skadi_graufAI (Creature *pCreature)
 
void Reset () override
 
void DoAction (int32 param) override
 
void SpellHitTarget (Unit *target, SpellInfo const *spellInfo) override
 
void SpawnFlameTriggers (uint8 point)
 
void MovementInform (uint32, uint32 Id) override
 
uint8 SelectNextPos (uint8 Position)
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
void RemoveSkadi (bool withEvade)
 
void CheckPlayers ()
 
void SpawnHelpers (uint8 Spot)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
- Public Member Functions inherited from VehicleAI
 VehicleAI (Creature *creature)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
void MoveInLineOfSight (Unit *) override
 
void AttackStart (Unit *) override
 
void OnCharmed (bool apply) override
 Called when unit is charmed. More...
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table. More...
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
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 JustEngagedWith (Unit *)
 Called for reaction when initially engaged. More...
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed. More...
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.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 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 ()
 
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)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
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 (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: More...
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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
 

Public Attributes

InstanceScriptm_pInstance
 
EventMap events
 
SummonList summons
 
uint8 currentPos
 
uint8 AchievementHitCount
 

Additional Inherited Members

- 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 VehicleAI
static int32 Permissible (Creature const *creature)
 
- 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 ()
 
- 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
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_skadi_graufAI()

boss_skadi_grauf::boss_skadi_graufAI::boss_skadi_graufAI ( Creature pCreature)
inline
283 : VehicleAI(pCreature), summons(me)
284 {
285 m_pInstance = pCreature->GetInstanceScript();
286 }
Definition: CombatAI.h:99
Creature *const me
Definition: CreatureAI.h:73
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
InstanceScript * m_pInstance
Definition: boss_skadi.cpp:288
SummonList summons
Definition: boss_skadi.cpp:290

References WorldObject::GetInstanceScript(), and m_pInstance.

Member Function Documentation

◆ CheckPlayers()

void boss_skadi_grauf::boss_skadi_graufAI::CheckPlayers ( )
inline
414 {
415 Map::PlayerList const& pList = me->GetMap()->GetPlayers();
416 for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
417 {
418 if (itr->GetSource()->GetPositionX() < 320.0f || itr->GetSource()->IsGameMaster() || !itr->GetSource()->IsAlive())
419 continue;
420
421 return;
422 }
423
424 RemoveSkadi(true);
425 }
Definition: LinkedList.h:139
Map * GetMap() const
Definition: Object.h:531
PlayerList const & GetPlayers() const
Definition: Map.h:486
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37
void RemoveSkadi(bool withEvade)
Definition: boss_skadi.cpp:395

References MapRefMgr::begin(), MapRefMgr::end(), WorldObject::GetMap(), Map::GetPlayers(), CreatureAI::me, and RemoveSkadi().

Referenced by UpdateAI().

◆ DoAction()

void boss_skadi_grauf::boss_skadi_graufAI::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

304 {
305 if (param == ACTION_START_EVENT)
306 {
307 events.RescheduleEvent(EVENT_GRAUF_CHECK, 5s);
308 events.RescheduleEvent(EVENT_GRAUF_START, 2s);
309 }
310 else if (param == ACTION_REMOVE_SKADI)
311 {
312 if (Unit* passenger = me->GetVehicleKit()->GetPassenger(0))
313 if (Creature* skadi = passenger->ToCreature())
314 skadi->AI()->Talk(SAY_DRAKE_DEATH);
315 me->GetMotionMaster()->MovePoint(10, 480.0f, -513.0f, 108.0f);
316 events.ScheduleEvent(EVENT_GRAUF_REMOVE_SKADI, 2s);
317 }
318 else if (param == ACTION_MYGIRL_ACHIEVEMENT)
319 {
323 }
324 }
@ DATA_SKADI_ACHIEVEMENT
Definition: utgarde_pinnacle.h:50
@ ACTION_REMOVE_SKADI
Definition: boss_skadi.cpp:64
@ SAY_DRAKE_DEATH
Definition: boss_skadi.cpp:33
@ ACTION_START_EVENT
Definition: boss_skadi.cpp:63
@ ACTION_MYGIRL_ACHIEVEMENT
Definition: boss_skadi.cpp:66
@ EVENT_GRAUF_REMOVE_SKADI
Definition: boss_skadi.cpp:85
@ EVENT_GRAUF_CHECK
Definition: boss_skadi.cpp:84
@ EVENT_GRAUF_START
Definition: boss_skadi.cpp:81
events
Definition: boss_sartura.cpp:43
Definition: Creature.h:46
Creature * ToCreature()
Definition: Object.h:202
Definition: Unit.h:630
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
Vehicle * GetVehicleKit() const
Definition: Unit.h:1672
Unit * GetPassenger(int8 seatId) const
Definition: Vehicle.cpp:224
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:211
uint8 AchievementHitCount
Definition: boss_skadi.cpp:292

References AchievementHitCount, ACTION_MYGIRL_ACHIEVEMENT, ACTION_REMOVE_SKADI, ACTION_START_EVENT, DATA_SKADI_ACHIEVEMENT, EVENT_GRAUF_CHECK, EVENT_GRAUF_REMOVE_SKADI, EVENT_GRAUF_START, Unit::GetMotionMaster(), Vehicle::GetPassenger(), Unit::GetVehicleKit(), m_pInstance, CreatureAI::me, MotionMaster::MovePoint(), SAY_DRAKE_DEATH, ZoneScript::SetData(), and Object::ToCreature().

◆ JustEngagedWith()

void boss_skadi_grauf::boss_skadi_graufAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from CreatureAI.

391 {
393 }
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition: Creature.cpp:2806

References CreatureAI::me, and Creature::SetInCombatWithZone().

◆ MovementInform()

void boss_skadi_grauf::boss_skadi_graufAI::MovementInform ( uint32  ,
uint32  Id 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

357 {
358 switch (Id)
359 {
360 case 0:
361 case 1:
363 me->SetFacingTo(M_PI * 2);
364 break;
365 case 2:
366 case 3:
367 if (m_pInstance)
370 me->SetFacingTo(M_PI);
371 break;
372 }
373 }
@ SKADI_IN_RANGE
Definition: utgarde_pinnacle.h:44
@ EMOTE_RANGE
Definition: boss_skadi.cpp:38
@ SPELL_FREEZING_CLOUD_VISUAL
Definition: boss_skadi.cpp:48
Talk
Definition: hyjal.cpp:82
void SetFacingTo(float ori)
Definition: Unit.cpp:20483
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4891

References EMOTE_RANGE, m_pInstance, CreatureAI::me, Unit::RemoveAurasDueToSpell(), ZoneScript::SetData(), Unit::SetFacingTo(), SKADI_IN_RANGE, and SPELL_FREEZING_CLOUD_VISUAL.

◆ RemoveSkadi()

void boss_skadi_grauf::boss_skadi_graufAI::RemoveSkadi ( bool  withEvade)
inline
396 {
397 if (Unit* skadi = me->GetVehicleKit()->GetPassenger(0))
398 {
400 skadi->ExitVehicle();
401 if (withEvade)
402 {
403 skadi->ToCreature()->AI()->EnterEvadeMode();
404 skadi->UpdatePosition(343.02f, -507.325f, 104.567f, M_PI, true);
405 }
406 else
407 skadi->ToCreature()->AI()->DoAction(ACTION_PHASE2);
408
409 skadi->StopMovingOnCurrentPos();
410 }
411 }
@ ACTION_PHASE2
Definition: boss_skadi.cpp:65
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71

References ACTION_PHASE2, SummonList::DespawnAll(), Vehicle::GetPassenger(), Unit::GetVehicleKit(), CreatureAI::me, and summons.

Referenced by CheckPlayers(), and UpdateAI().

◆ Reset()

void boss_skadi_grauf::boss_skadi_graufAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

295 {
296 events.Reset();
298 currentPos = 0;
301 }
void RemoveAllAuras()
Definition: Unit.cpp:5290
uint8 currentPos
Definition: boss_skadi.cpp:291

References AchievementHitCount, currentPos, SummonList::DespawnAll(), CreatureAI::me, Unit::RemoveAllAuras(), and summons.

◆ SelectNextPos()

uint8 boss_skadi_grauf::boss_skadi_graufAI::SelectNextPos ( uint8  Position)
inline
376 {
377 switch (Position)
378 {
379 case 0:
380 case 1:
381 return 2 + urand(0, 1);
382 default:
383 if (me->GetPositionY() < -515.0f)
384 return 1;
385 else
386 return 0;
387 }
388 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
Definition: Position.h:28
float GetPositionY() const
Definition: Position.h:118

References Position::GetPositionY(), CreatureAI::me, and urand().

Referenced by UpdateAI().

◆ SpawnFlameTriggers()

void boss_skadi_grauf::boss_skadi_graufAI::SpawnFlameTriggers ( uint8  point)
inline
333 {
334 for(uint8 j = 0; j < 50; ++j)
335 {
336 if (point == 1)
337 me->SummonCreature(NPC_BREATH_TRIGGER, 480.0f - (j * 3), -518.0f + (j / 16.0f), 105.0f, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
338 else
339 me->SummonCreature(NPC_BREATH_TRIGGER, 480.0f - (j * 3), -510.0f + (j / 16.0f), 105.0f, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
340 }
341 // and out of loop, cover the small room
342 if (point == 0)
343 {
344 Creature* cr;
345 if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 483, -484.9f, 105, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
347 if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 471.0f, -484.7f, 105, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
349
350 for (uint8 j = 0; j < 7; j++)
351 if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 477.0f, -507.0f + (j * 3), 105.0f, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
353 }
354 }
std::uint8_t uint8
Definition: Define.h:109
@ TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN
Definition: Object.h:46
@ NPC_BREATH_TRIGGER
Definition: boss_skadi.cpp:59
@ SPELL_FREEZING_CLOUD_H
Definition: boss_skadi.cpp:50
@ SPELL_FREEZING_CLOUD_N
Definition: boss_skadi.cpp:49
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:2355
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1168
bool IsHeroic() const
Definition: Map.h:452

References Unit::CastSpell(), WorldObject::GetMap(), Map::IsHeroic(), CreatureAI::me, NPC_BREATH_TRIGGER, SPELL_FREEZING_CLOUD_H, SPELL_FREEZING_CLOUD_N, WorldObject::SummonCreature(), and TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN.

Referenced by UpdateAI().

◆ SpawnHelpers()

void boss_skadi_grauf::boss_skadi_graufAI::SpawnHelpers ( uint8  Spot)
inline
428 {
429 if (Creature* Harpooner = me->SummonCreature(NPC_YMIRJAR_HARPOONER, TrashPosition[Spot].GetPositionX() + rand() % 5, TrashPosition[Spot].GetPositionY() + rand() % 5, TrashPosition[Spot].GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
430 {
431 Harpooner->SetInCombatWithZone();
432 summons.Summon(Harpooner);
433 }
434 if (Creature* Second = me->SummonCreature((urand(0, 1) ? NPC_YMIRJAR_WARRIOR : NPC_YMIRJAR_WITCH_DOCTOR), TrashPosition[Spot].GetPositionX() + rand() % 5, TrashPosition[Spot].GetPositionY() + rand() % 5, TrashPosition[Spot].GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
435 {
436 Second->SetInCombatWithZone();
437 summons.Summon(Second);
438 }
439 }
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: Object.h:48
static Position TrashPosition[]
Definition: boss_skadi.cpp:88
@ NPC_YMIRJAR_WITCH_DOCTOR
Definition: boss_skadi.cpp:56
@ NPC_YMIRJAR_WARRIOR
Definition: boss_skadi.cpp:55
@ NPC_YMIRJAR_HARPOONER
Definition: boss_skadi.cpp:57
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:88
float GetPositionX() const
Definition: Position.h:117

References Position::GetPositionX(), CreatureAI::me, NPC_YMIRJAR_HARPOONER, NPC_YMIRJAR_WARRIOR, NPC_YMIRJAR_WITCH_DOCTOR, SummonList::Summon(), WorldObject::SummonCreature(), summons, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, TrashPosition, and urand().

Referenced by UpdateAI().

◆ SpellHitTarget()

void boss_skadi_grauf::boss_skadi_graufAI::SpellHitTarget ( Unit target,
SpellInfo const *  spellInfo 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

327 {
328 if (spellInfo->Id == 47593) // SPELL_FREEZING_CLOUD_VISUAL trigger
330 }

References Unit::CastSpell(), WorldObject::GetMap(), SpellInfo::Id, Map::IsHeroic(), CreatureAI::me, SPELL_FREEZING_CLOUD_H, and SPELL_FREEZING_CLOUD_N.

◆ UpdateAI()

void boss_skadi_grauf::boss_skadi_graufAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Reimplemented from VehicleAI.

442 {
443 events.Update(diff);
444 switch (events.ExecuteEvent())
445 {
447 {
448 CheckPlayers();
449 events.Repeat(2s);
450 break;
451 }
453 {
454 me->GetMotionMaster()->Clear(true);
455 me->GetMotionMaster()->MoveTakeoff(10, SkadiPosition[0].GetPositionX(), SkadiPosition[0].GetPositionY(), SkadiPosition[0].GetPositionZ(), 3.0f);
456
457 SpawnHelpers(0);
458 SpawnHelpers(0);
459 events.ScheduleEvent(EVENT_GRAUF_MOVE, 15s);
460 events.ScheduleEvent(EVENT_GRAUF_SUMMON_HELPERS, 20s);
461 break;
462 }
463 case EVENT_GRAUF_MOVE:
464 {
466 uint8 targetPoint = SelectNextPos(currentPos);
467 me->GetMotionMaster()->MovePoint(targetPoint, SkadiPosition[targetPoint].GetPositionX(), SkadiPosition[targetPoint].GetPositionY(), SkadiPosition[targetPoint].GetPositionZ());
468 if (targetPoint <= 1)
469 {
471 SpawnFlameTriggers(targetPoint);
473 }
474
475 if (m_pInstance)
477
478 currentPos = targetPoint;
479 events.Repeat(25s);
480 break;
481 }
483 {
484 SpawnHelpers(1);
485 events.Repeat(15s);
486 break;
487 }
489 {
490 RemoveSkadi(false);
492 break;
493 }
494 }
495 }
@ EMOTE_DEEP_BREATH
Definition: boss_skadi.cpp:37
static Position SkadiPosition[]
Definition: boss_skadi.cpp:94
@ EVENT_GRAUF_SUMMON_HELPERS
Definition: boss_skadi.cpp:83
@ EVENT_GRAUF_MOVE
Definition: boss_skadi.cpp:82
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2173
void MoveTakeoff(uint32 id, Position const &pos, float speed=0.0f)
Use to move the unit from the ground to the air. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:523
void Clear(bool reset=true)
Definition: MotionMaster.h:165
void SpawnHelpers(uint8 Spot)
Definition: boss_skadi.cpp:427
uint8 SelectNextPos(uint8 Position)
Definition: boss_skadi.cpp:375
void CheckPlayers()
Definition: boss_skadi.cpp:413
void SpawnFlameTriggers(uint8 point)
Definition: boss_skadi.cpp:332

References AchievementHitCount, Unit::CastSpell(), CheckPlayers(), MotionMaster::Clear(), currentPos, Creature::DespawnOrUnsummon(), EMOTE_DEEP_BREATH, EVENT_GRAUF_CHECK, EVENT_GRAUF_MOVE, EVENT_GRAUF_REMOVE_SKADI, EVENT_GRAUF_START, EVENT_GRAUF_SUMMON_HELPERS, Unit::GetMotionMaster(), m_pInstance, CreatureAI::me, MotionMaster::MovePoint(), MotionMaster::MoveTakeoff(), RemoveSkadi(), SelectNextPos(), ZoneScript::SetData(), SKADI_IN_RANGE, SkadiPosition, SpawnFlameTriggers(), SpawnHelpers(), and SPELL_FREEZING_CLOUD_VISUAL.

Member Data Documentation

◆ AchievementHitCount

uint8 boss_skadi_grauf::boss_skadi_graufAI::AchievementHitCount

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

◆ currentPos

uint8 boss_skadi_grauf::boss_skadi_graufAI::currentPos

Referenced by Reset(), and UpdateAI().

◆ events

EventMap boss_skadi_grauf::boss_skadi_graufAI::events

◆ m_pInstance

InstanceScript* boss_skadi_grauf::boss_skadi_graufAI::m_pInstance

◆ summons

SummonList boss_skadi_grauf::boss_skadi_graufAI::summons

Referenced by RemoveSkadi(), Reset(), and SpawnHelpers().