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

Public Member Functions

 boss_jedoga_shadowseeker (Creature *pCreature)
 
void MoveInLineOfSight (Unit *) override
 
void Reset () override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDies (Creature *summon, Unit *killer) override
 
void DamageTaken (Unit *, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 
void DoAction (int32 action) override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void KilledUnit (Unit *who) override
 
void JustDied (Unit *) override
 
void MovementInform (uint32 type, uint32 pointId) override
 
void UpdateAI (uint32 diff) override
 
uint32 GetData (uint32 type) const override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 
void UpdateAI (uint32 diff) override
 
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.
 
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 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 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=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, 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)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () const
 
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
 
- 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.
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
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.
 
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 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
 
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 ==================
 
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 ()
 
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 *)
 
- 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
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
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)
 
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 (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 
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)
 
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)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always 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)
 
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 Member Functions

void ReschedulleCombatEvents ()
 
void DespawnOOCSummons ()
 

Private Attributes

GuidList oocSummons
 
GuidList oocTriggers
 
ObjectGuid sacraficeTarget_GUID
 
uint32 sayPreachTimer
 
bool combatSummonsSummoned
 
bool ritualTriggered
 
bool volunteerWork
 

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 BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
bool _ProccessHealthCheckEvent (uint8 healthPct, uint32 damage, std::function< void()> exec) const
 
void TeleportCheaters ()
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
SummonList summons
 
- 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_jedoga_shadowseeker()

boss_jedoga_shadowseeker::boss_jedoga_shadowseeker ( Creature pCreature)
inline
158 : BossAI(pCreature, DATA_JEDOGA_SHADOWSEEKER),
159 sayPreachTimer(120000),
161 ritualTriggered(false),
162 volunteerWork(true)
163 { }
@ DATA_JEDOGA_SHADOWSEEKER
Definition: ahnkahet.h:29
Definition: ScriptedCreature.h:469
bool ritualTriggered
Definition: boss_jedoga_shadowseeker.cpp:543
bool volunteerWork
Definition: boss_jedoga_shadowseeker.cpp:544
uint32 sayPreachTimer
Definition: boss_jedoga_shadowseeker.cpp:541
bool combatSummonsSummoned
Definition: boss_jedoga_shadowseeker.cpp:542

Member Function Documentation

◆ DamageTaken()

void boss_jedoga_shadowseeker::DamageTaken ( Unit ,
uint32 damage,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Reimplemented from BossAI.

295 {
296 if (!ritualTriggered && me->HealthBelowPctDamaged(55, damage) && events.IsInPhase(PHASE_NORMAL))
297 {
298 SetCombatMovement(false);
300 me->AttackStop();
303
304 events.SetPhase(PHASE_RITUAL);
305 events.ScheduleEvent(EVENT_JEDOGA_PREPARE_RITUAL, 1s, 0, PHASE_RITUAL);
306 ritualTriggered = true;
307 return;
308 }
309
310 if (events.IsInPhase(PHASE_RITUAL))
311 {
312 damage = 0;
313 }
314 }
@ REACT_PASSIVE
Definition: Unit.h:1035
@ UNIT_FLAG_NON_ATTACKABLE
Definition: Unit.h:449
@ UNIT_FLAG_NOT_SELECTABLE
Definition: Unit.h:473
events
Definition: boss_sartura.cpp:43
@ PHASE_NORMAL
Definition: boss_jedoga_shadowseeker.cpp:108
@ PHASE_RITUAL
Definition: boss_jedoga_shadowseeker.cpp:109
@ EVENT_JEDOGA_PREPARE_RITUAL
Definition: boss_jedoga_shadowseeker.cpp:71
void SetCombatMovement(bool allowMovement)
Definition: ScriptedCreature.cpp:540
Creature * me
Definition: ScriptedCreature.h:282
void SetReactState(ReactStates st)
Definition: Creature.h:90
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4081
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
Definition: Unit.h:1459
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:1495
bool AttackStop()
Definition: Unit.cpp:10407

References Unit::AttackStop(), EVENT_JEDOGA_PREPARE_RITUAL, Unit::HealthBelowPctDamaged(), Unit::InterruptNonMeleeSpells(), ScriptedAI::me, PHASE_NORMAL, PHASE_RITUAL, REACT_PASSIVE, ritualTriggered, ScriptedAI::SetCombatMovement(), Creature::SetReactState(), Unit::SetUnitFlag(), UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_NOT_SELECTABLE.

◆ DespawnOOCSummons()

void boss_jedoga_shadowseeker::DespawnOOCSummons ( )
inlineprivate
555 {
556 if (!oocTriggers.empty())
557 {
558 for (ObjectGuid const& guid : oocTriggers)
559 {
560 if (Creature* summon = ObjectAccessor::GetCreature(*me, guid))
561 {
562 summon->DespawnOrUnsummon();
563 }
564 }
565 oocTriggers.clear();
566 }
567
568 if (!oocSummons.empty())
569 {
570 for (ObjectGuid const& guid : oocSummons)
571 {
572 if (Creature* summon = ObjectAccessor::GetCreature(*me, guid))
573 {
574 summon->DespawnOrUnsummon();
575 }
576 }
577 oocSummons.clear();
578 }
579 }
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
Definition: Creature.h:46
Definition: ObjectGuid.h:120
GuidList oocSummons
Definition: boss_jedoga_shadowseeker.cpp:538
GuidList oocTriggers
Definition: boss_jedoga_shadowseeker.cpp:539

References ObjectAccessor::GetCreature(), ScriptedAI::me, oocSummons, and oocTriggers.

Referenced by JustDied(), Reset(), and SummonedCreatureDies().

◆ DoAction()

void boss_jedoga_shadowseeker::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

317 {
318 if (action == ACTION_SACRAFICE)
319 {
321 {
322 Unit::Kill(me, target);
323 }
324 }
325 }
@ ACTION_SACRAFICE
Definition: boss_jedoga_shadowseeker.cpp:115
static void Kill(Unit *killer, Unit *victim, bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition: Unit.cpp:17956
ObjectGuid sacraficeTarget_GUID
Definition: boss_jedoga_shadowseeker.cpp:540

References ACTION_SACRAFICE, ObjectAccessor::GetCreature(), Unit::Kill(), ScriptedAI::me, and sacraficeTarget_GUID.

◆ GetData()

uint32 boss_jedoga_shadowseeker::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

528 {
529 if (type == DATA_VOLUNTEER_WORK)
530 {
531 return volunteerWork ? 1 : 0;
532 }
533
534 return 0;
535 }
@ DATA_VOLUNTEER_WORK
Definition: boss_jedoga_shadowseeker.cpp:89

References DATA_VOLUNTEER_WORK, and volunteerWork.

◆ JustDied()

void boss_jedoga_shadowseeker::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

345 {
346 _JustDied();
349 }
@ SAY_DEATH
Definition: boss_jedoga_shadowseeker.cpp:35
Talk
Definition: boss_fathomlord_karathress.cpp:25
void _JustDied()
Definition: ScriptedCreature.cpp:620
void DespawnOOCSummons()
Definition: boss_jedoga_shadowseeker.cpp:554

References BossAI::_JustDied(), DespawnOOCSummons(), and SAY_DEATH.

◆ JustEngagedWith()

void boss_jedoga_shadowseeker::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

328 {
332 }
@ SAY_AGGRO
Definition: boss_jedoga_shadowseeker.cpp:31
void _JustEngagedWith()
Definition: ScriptedCreature.cpp:633
void ReschedulleCombatEvents()
Definition: boss_jedoga_shadowseeker.cpp:546

References BossAI::_JustEngagedWith(), ReschedulleCombatEvents(), and SAY_AGGRO.

◆ JustSummoned()

void boss_jedoga_shadowseeker::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

222 {
223 if (summon->GetEntry() == NPC_JEDOGA_CONTROLLER)
224 {
225 summons.Summon(summon);
226 }
227 }
@ NPC_JEDOGA_CONTROLLER
Definition: ahnkahet.h:46
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90
SummonList summons
Definition: ScriptedCreature.h:510
uint32 GetEntry() const
Definition: Object.h:109

References Object::GetEntry(), NPC_JEDOGA_CONTROLLER, SummonList::Summon(), and BossAI::summons.

◆ KilledUnit()

void boss_jedoga_shadowseeker::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from ScriptedAI.

335 {
336 if (who->GetTypeId() != TYPEID_PLAYER)
337 {
338 return;
339 }
340
341 Talk(SAY_SLAY);
342 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
@ SAY_SLAY
Definition: boss_jedoga_shadowseeker.cpp:34
TypeID GetTypeId() const
Definition: Object.h:121

References Object::GetTypeId(), SAY_SLAY, and TYPEID_PLAYER.

◆ MoveInLineOfSight()

void boss_jedoga_shadowseeker::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

166{}

◆ MovementInform()

void boss_jedoga_shadowseeker::MovementInform ( uint32  type,
uint32  pointId 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

352 {
353 if (!(type == POINT_MOTION_TYPE || type == EFFECT_MOTION_TYPE))
354 {
355 return;
356 }
357
358 switch (pointId)
359 {
360 case POINT_DOWN:
361 {
365 me->SetImmuneToAll(false);
367
371 SetCombatMovement(true);
372
373 me->SetDisableGravity(false);
374 me->SetHover(false);
375
377 if (Unit* victim = me->GetVictim())
378 {
379 me->StopMoving();
380 AttackStart(victim);
381 }
382 break;
383 }
384 case POINT_UP:
385 {
386 me->SetFacingTo(5.66f);
387 if (!summons.empty())
388 {
391 {
392 events.ScheduleEvent(EVENT_JEDGA_START_RITUAL, 3s, 0, PHASE_RITUAL);
393 }
394 // Something failed, let players continue but do not grant achievement
395 else
396 {
397 volunteerWork = false;
401 }
402 }
403 break;
404 }
405 case POINT_RITUAL:
406 {
407 me->SetFacingTo(5.66f);
409 events.ScheduleEvent(EVENT_JEDOGA_MOVE_UP, 1s, 0, PHASE_RITUAL);
410 break;
411 }
412 case POINT_INITIAL:
413 {
414 me->SetFacingTo(5.66f);
417 if (!oocTriggers.empty())
418 {
419 for (ObjectGuid const& guid : oocTriggers)
420 {
421 if (Creature* trigger = ObjectAccessor::GetCreature(*me, guid))
422 {
423 trigger->CastSpell(nullptr, SPELL_BEAM_VISUAL_JEDOGA);
424 }
425 }
426 }
427 break;
428 }
429 }
430 }
@ REACT_AGGRESSIVE
Definition: Unit.h:1037
@ UNIT_STATE_NO_ENVIRONMENT_UPD
Definition: Unit.h:353
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:46
@ EFFECT_MOTION_TYPE
Definition: MotionMaster.h:54
const Position JedogaPosition[3]
Definition: boss_jedoga_shadowseeker.cpp:118
@ POINT_UP
Definition: boss_jedoga_shadowseeker.cpp:101
@ POINT_RITUAL
Definition: boss_jedoga_shadowseeker.cpp:102
@ POINT_INITIAL
Definition: boss_jedoga_shadowseeker.cpp:103
@ POINT_DOWN
Definition: boss_jedoga_shadowseeker.cpp:100
@ SPELL_LIGHTNING_BOLTS
Definition: boss_jedoga_shadowseeker.cpp:48
@ SPELL_SPHERE_VISUAL
Definition: boss_jedoga_shadowseeker.cpp:46
@ SPELL_BEAM_VISUAL_JEDOGA
Definition: boss_jedoga_shadowseeker.cpp:53
@ SPELL_HOVER_FALL
Definition: boss_jedoga_shadowseeker.cpp:52
@ EVENT_JEDGA_START_RITUAL
Definition: boss_jedoga_shadowseeker.cpp:74
@ EVENT_JEDOGA_MOVE_UP
Definition: boss_jedoga_shadowseeker.cpp:72
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition: Containers.h:135
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition: UnitAI.h:379
bool empty() const
Definition: ScriptedCreature.h:75
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:210
void SetInCombatWithZone()
Definition: Creature.cpp:2732
bool SetDisableGravity(bool disable, bool packetOnly=false, bool updateAnimationTier=true) override
Definition: Creature.cpp:3109
bool SetHover(bool enable, bool packetOnly=false, bool updateAnimationTier=true) override
Definition: Creature.cpp:3274
Definition: Unit.h:1302
void ClearUnitState(uint32 f)
Definition: Unit.h:1411
void SetFacingTo(float ori)
Definition: Unit.cpp:20884
MotionMaster * GetMotionMaster()
Definition: Unit.h:2276
void StopMoving()
Definition: Unit.cpp:16918
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4855
Unit * GetVictim() const
Definition: Unit.h:1398
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition: Unit.h:1692
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:1496
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:211
void Clear(bool reset=true)
Definition: MotionMaster.h:165

References ScriptedAI::AttackStart(), MotionMaster::Clear(), Unit::ClearUnitState(), UnitAI::DoCastSelf(), EFFECT_MOTION_TYPE, SummonList::empty(), EVENT_JEDGA_START_RITUAL, EVENT_JEDOGA_MOVE_UP, ObjectAccessor::GetCreature(), Unit::GetMotionMaster(), Unit::GetVictim(), JedogaPosition, ScriptedAI::me, MotionMaster::MovePoint(), oocTriggers, PHASE_RITUAL, POINT_DOWN, POINT_INITIAL, POINT_MOTION_TYPE, POINT_RITUAL, POINT_UP, REACT_AGGRESSIVE, Unit::RemoveAurasDueToSpell(), Unit::RemoveUnitFlag(), ReschedulleCombatEvents(), sacraficeTarget_GUID, Acore::Containers::SelectRandomContainerElement(), ScriptedAI::SetCombatMovement(), Creature::SetDisableGravity(), Unit::SetFacingTo(), Creature::SetHover(), Unit::SetImmuneToAll(), Creature::SetInCombatWithZone(), Creature::SetReactState(), SPELL_BEAM_VISUAL_JEDOGA, SPELL_HOVER_FALL, SPELL_LIGHTNING_BOLTS, SPELL_SPHERE_VISUAL, Unit::StopMoving(), BossAI::summons, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_NOT_SELECTABLE, UNIT_STATE_NO_ENVIRONMENT_UPD, and volunteerWork.

◆ ReschedulleCombatEvents()

void boss_jedoga_shadowseeker::ReschedulleCombatEvents ( )
inlineprivate
547 {
548 events.SetPhase(PHASE_NORMAL);
549 events.RescheduleEvent(EVENT_JEDOGA_CYCLONE, 3s, 0, PHASE_NORMAL);
550 events.RescheduleEvent(EVENT_JEDOGA_LIGHTNING_BOLT, 7s, 0, PHASE_NORMAL);
551 events.RescheduleEvent(EVENT_JEDOGA_THUNDERSHOCK, 12s, 0, PHASE_NORMAL);
552 }
@ EVENT_JEDOGA_LIGHTNING_BOLT
Definition: boss_jedoga_shadowseeker.cpp:69
@ EVENT_JEDOGA_THUNDERSHOCK
Definition: boss_jedoga_shadowseeker.cpp:70
@ EVENT_JEDOGA_CYCLONE
Definition: boss_jedoga_shadowseeker.cpp:68

References EVENT_JEDOGA_CYCLONE, EVENT_JEDOGA_LIGHTNING_BOLT, EVENT_JEDOGA_THUNDERSHOCK, and PHASE_NORMAL.

Referenced by JustEngagedWith(), and MovementInform().

◆ Reset()

void boss_jedoga_shadowseeker::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

169 {
172 me->SetImmuneToAll(true);
174 me->SetDisableGravity(true);
175 me->SetHover(true);
177
178 _Reset();
179 events.SetPhase(PHASE_NORMAL);
180
182 std::list<TempSummon*> tempOOCSummons;
183 me->SummonCreatureGroup(SUMMON_GROUP_OOC, &tempOOCSummons);
184 if (!tempOOCSummons.empty())
185 {
186 for (TempSummon* summon : tempOOCSummons)
187 {
188 if (summon)
189 {
190 summon->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, false);
191 summon->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, false);
192 summon->RemoveAurasDueToSpell(SPELL_WHITE_SPHERE);
193 summon->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
194 summon->SetStandState(UNIT_STAND_STATE_KNEEL);
195 oocSummons.push_back(summon->GetGUID());
196 }
197 }
198 }
199
200 tempOOCSummons.clear();
201
203 if (!tempOOCSummons.empty())
204 {
205 for (TempSummon* trigger : tempOOCSummons)
206 {
207 if (trigger)
208 {
209 oocTriggers.push_back(trigger->GetGUID());
210 }
211 }
212 }
213
215 sayPreachTimer = 120000;
216 ritualTriggered = false;
217 volunteerWork = true;
218 combatSummonsSummoned = false;
219 }
@ UNIT_STAND_STATE_KNEEL
Definition: Unit.h:61
@ SUMMON_GROUP_OOC_TRIGGERS
Definition: boss_jedoga_shadowseeker.cpp:95
@ SUMMON_GROUP_OOC
Definition: boss_jedoga_shadowseeker.cpp:94
@ SPELL_WHITE_SPHERE
Definition: boss_jedoga_shadowseeker.cpp:47
@ IMMUNITY_DAMAGE
Definition: SharedDefines.h:1397
@ SPELL_SCHOOL_MASK_NORMAL
Definition: SharedDefines.h:297
@ SPELL_SCHOOL_MASK_MAGIC
Definition: SharedDefines.h:312
void _Reset()
Definition: ScriptedCreature.cpp:604
Definition: TemporarySummon.h:40
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition: Object.cpp:2420
void Clear()
Definition: ObjectGuid.h:140
void AddUnitState(uint32 f)
Definition: Unit.h:1409

References BossAI::_Reset(), Unit::AddUnitState(), ObjectGuid::Clear(), combatSummonsSummoned, DespawnOOCSummons(), Unit::GetMotionMaster(), IMMUNITY_DAMAGE, JedogaPosition, ScriptedAI::me, MotionMaster::MovePoint(), oocSummons, oocTriggers, PHASE_NORMAL, POINT_INITIAL, REACT_PASSIVE, ritualTriggered, sacraficeTarget_GUID, sayPreachTimer, Creature::SetDisableGravity(), Creature::SetHover(), Unit::SetImmuneToAll(), Creature::SetReactState(), Unit::SetUnitFlag(), SPELL_SCHOOL_MASK_MAGIC, SPELL_SCHOOL_MASK_NORMAL, SPELL_WHITE_SPHERE, SUMMON_GROUP_OOC, SUMMON_GROUP_OOC_TRIGGERS, WorldObject::SummonCreatureGroup(), UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_NOT_SELECTABLE, UNIT_STAND_STATE_KNEEL, UNIT_STATE_NO_ENVIRONMENT_UPD, and volunteerWork.

◆ SummonedCreatureDies()

void boss_jedoga_shadowseeker::SummonedCreatureDies ( Creature summon,
Unit killer 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

230 {
231 switch (summon->GetEntry())
232 {
234 {
235 GuidList::iterator itr = std::find(oocSummons.begin(), oocSummons.end(), summon->GetGUID());
236 if (itr == oocSummons.end())
237 {
238 break;
239 }
240
241 oocSummons.erase(itr);
242 if (!oocSummons.empty())
243 {
244 break;
245 }
246
251
253 {
255 for (uint8 i = 0; i < MAX_COMBAT_INITIATES; ++i)
256 {
258 {
262 summon->SetImmuneToAll(true);
263 summons.Summon(summon);
264 }
265 }
267 }
268
269 break;
270 }
272 {
274 {
275 break;
276 }
277
278 if (killer != me && killer->GetGUID() != sacraficeTarget_GUID)
279 {
280 volunteerWork = false;
281 }
282 else
283 {
285 }
286 events.ScheduleEvent(EVENT_JEDOGA_MOVE_DOWN, 1s, 0, PHASE_RITUAL);
287 break;
288 }
289 }
290
291 summons.Despawn(summon);
292 }
std::uint8_t uint8
Definition: Define.h:110
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: Object.h:47
@ NPC_TWILIGHT_VOLUNTEER
Definition: boss_jedoga_shadowseeker.cpp:83
@ NPC_TWILIGHT_INITIATE
Definition: boss_jedoga_shadowseeker.cpp:82
@ MAX_COMBAT_INITIATES
Definition: boss_jedoga_shadowseeker.cpp:88
@ SPELL_GIFT_OF_THE_HERALD
Definition: boss_jedoga_shadowseeker.cpp:56
const Position VolunteerSpotPositions[MAX_COMBAT_INITIATES][2]
Definition: boss_jedoga_shadowseeker.cpp:126
@ EVENT_JEDOGA_MOVE_DOWN
Definition: boss_jedoga_shadowseeker.cpp:73
void Despawn(Creature const *summon)
Definition: ScriptedCreature.h:91
void DespawnEntry(uint32 entry)
Definition: ScriptedCreature.cpp:54
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
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:2343
void MoveIdle()
Definition: MotionMaster.cpp:232

References combatSummonsSummoned, SummonList::Despawn(), SummonList::DespawnEntry(), DespawnOOCSummons(), UnitAI::DoCastSelf(), EVENT_JEDOGA_MOVE_DOWN, Object::GetEntry(), Object::GetGUID(), Unit::GetMotionMaster(), JedogaPosition, MAX_COMBAT_INITIATES, ScriptedAI::me, MotionMaster::MoveIdle(), MotionMaster::MovePoint(), NPC_TWILIGHT_INITIATE, NPC_TWILIGHT_VOLUNTEER, oocSummons, PHASE_RITUAL, POINT_DOWN, POINT_INITIAL, REACT_PASSIVE, sacraficeTarget_GUID, Unit::SetImmuneToAll(), Creature::SetReactState(), Unit::SetUnitFlag(), SPELL_GIFT_OF_THE_HERALD, SPELL_HOVER_FALL, SummonList::Summon(), WorldObject::SummonCreature(), BossAI::summons, TEMPSUMMON_CORPSE_TIMED_DESPAWN, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_NOT_SELECTABLE, VolunteerSpotPositions, and volunteerWork.

◆ UpdateAI()

void boss_jedoga_shadowseeker::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

433 {
434 if (!UpdateVictim())
435 {
437 {
438 if (sayPreachTimer <= diff)
439 {
441 sayPreachTimer = 120000; // 2 min
442 }
443 else
444 {
445 sayPreachTimer -= diff;
446 }
447 }
448 return;
449 }
450
451 events.Update(diff);
453 {
454 return;
455 }
456
457 while (uint32 const eventId = events.ExecuteEvent())
458 {
459 switch (eventId)
460 {
461 // Normal phase
463 {
465 events.Repeat(10s, 14s);
466 break;
467 }
469 {
470 if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
471 {
473 }
474 events.Repeat(11s, 15s);
475 break;
476 }
478 {
479 if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
480 {
482 }
483
484 events.Repeat(16s, 22s);
485 break;
486 }
487 // Ritual phase
489 {
490 me->GetMotionMaster()->Clear(true);
492 break;
493 }
495 {
496 me->GetMotionMaster()->Clear(true);
497 me->SetDisableGravity(true);
498 me->SetHover(true);
500 break;
501 }
503 {
508 break;
509 }
511 {
514 {
516 sacraficeTarget_GUID = volunteer->GetGUID();
517 volunteer->AI()->DoAction(ACTION_RITUAL_BEGIN);
518 }
519 break;
520 }
521 }
522 }
523
525 }
std::uint32_t uint32
Definition: Define.h:108
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ DONE
Definition: InstanceScript.h:60
@ DATA_PRINCE_TALDARAM
Definition: ahnkahet.h:28
@ ACTION_RITUAL_BEGIN
Definition: boss_jedoga_shadowseeker.cpp:114
@ SAY_PREACHING
Definition: boss_jedoga_shadowseeker.cpp:36
@ SAY_SACRIFICE_1
Definition: boss_jedoga_shadowseeker.cpp:32
@ SPELL_THUNDERSHOCK_H
Definition: boss_jedoga_shadowseeker.cpp:62
@ SPELL_LIGHTNING_BOLT
Definition: boss_jedoga_shadowseeker.cpp:59
@ SPELL_CYCLONE_STRIKE_H
Definition: boss_jedoga_shadowseeker.cpp:58
@ SPELL_CYCLONE_STRIKE
Definition: boss_jedoga_shadowseeker.cpp:57
@ SPELL_LIGHTNING_BOLT_H
Definition: boss_jedoga_shadowseeker.cpp:60
@ SPELL_THUNDERSHOCK
Definition: boss_jedoga_shadowseeker.cpp:61
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:110
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:177
bool UpdateVictim()
Definition: CreatureAI.cpp:268
const T & DUNGEON_MODE(const T &normal5, const T &heroic10) const
Definition: ScriptedCreature.h:400
InstanceScript *const instance
Definition: ScriptedCreature.h:474
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1410
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:231
void MoveTakeoff(uint32 id, Position const &pos, float speed=0.0f)
Definition: MotionMaster.cpp:497

References ACTION_RITUAL_BEGIN, MotionMaster::Clear(), DATA_PRINCE_TALDARAM, SummonList::DespawnEntry(), UnitAI::DoCast(), UnitAI::DoCastSelf(), UnitAI::DoMeleeAttackIfReady(), DONE, ScriptedAI::DUNGEON_MODE(), EVENT_JEDGA_START_RITUAL, EVENT_JEDOGA_CYCLONE, EVENT_JEDOGA_LIGHTNING_BOLT, EVENT_JEDOGA_MOVE_DOWN, EVENT_JEDOGA_MOVE_UP, EVENT_JEDOGA_PREPARE_RITUAL, EVENT_JEDOGA_THUNDERSHOCK, InstanceScript::GetBossState(), ObjectAccessor::GetCreature(), Unit::GetMotionMaster(), Unit::HasUnitState(), BossAI::instance, JedogaPosition, ScriptedAI::me, MotionMaster::MovePoint(), MotionMaster::MoveTakeoff(), NPC_JEDOGA_CONTROLLER, POINT_DOWN, POINT_RITUAL, POINT_UP, sacraficeTarget_GUID, SAY_PREACHING, SAY_SACRIFICE_1, sayPreachTimer, Acore::Containers::SelectRandomContainerElement(), UnitAI::SelectTarget(), Creature::SetDisableGravity(), Creature::SetHover(), SPELL_CYCLONE_STRIKE, SPELL_CYCLONE_STRIKE_H, SPELL_HOVER_FALL, SPELL_LIGHTNING_BOLT, SPELL_LIGHTNING_BOLT_H, SPELL_THUNDERSHOCK, SPELL_THUNDERSHOCK_H, BossAI::summons, UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ combatSummonsSummoned

bool boss_jedoga_shadowseeker::combatSummonsSummoned
private

Referenced by Reset(), and SummonedCreatureDies().

◆ oocSummons

GuidList boss_jedoga_shadowseeker::oocSummons
private

◆ oocTriggers

GuidList boss_jedoga_shadowseeker::oocTriggers
private

◆ ritualTriggered

bool boss_jedoga_shadowseeker::ritualTriggered
private

Referenced by DamageTaken(), and Reset().

◆ sacraficeTarget_GUID

ObjectGuid boss_jedoga_shadowseeker::sacraficeTarget_GUID
private

◆ sayPreachTimer

uint32 boss_jedoga_shadowseeker::sayPreachTimer
private

Referenced by Reset(), and UpdateAI().

◆ volunteerWork

bool boss_jedoga_shadowseeker::volunteerWork
private