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.
 
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 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 HealDone (Unit *, uint32 &)
 
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
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
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
155 : BossAI(pCreature, DATA_JEDOGA_SHADOWSEEKER),
156 sayPreachTimer(120000),
158 ritualTriggered(false),
159 volunteerWork(true)
160 { }
@ DATA_JEDOGA_SHADOWSEEKER
Definition: ahnkahet.h:29
Definition: ScriptedCreature.h:456
bool ritualTriggered
Definition: boss_jedoga_shadowseeker.cpp:531
bool volunteerWork
Definition: boss_jedoga_shadowseeker.cpp:532
uint32 sayPreachTimer
Definition: boss_jedoga_shadowseeker.cpp:529
bool combatSummonsSummoned
Definition: boss_jedoga_shadowseeker.cpp:530

Member Function Documentation

◆ DamageTaken()

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

Reimplemented from BossAI.

292 {
293 if (!ritualTriggered && me->HealthBelowPctDamaged(55, damage) && events.IsInPhase(PHASE_NORMAL))
294 {
295 SetCombatMovement(false);
297 me->AttackStop();
300
301 events.SetPhase(PHASE_RITUAL);
302 events.ScheduleEvent(EVENT_JEDOGA_PREPARE_RITUAL, 1s, 0, PHASE_RITUAL);
303 ritualTriggered = true;
304 return;
305 }
306
307 if (events.IsInPhase(PHASE_RITUAL))
308 {
309 damage = 0;
310 }
311 }
@ REACT_PASSIVE
Definition: Unit.h:1023
@ 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:105
@ PHASE_RITUAL
Definition: boss_jedoga_shadowseeker.cpp:106
@ EVENT_JEDOGA_PREPARE_RITUAL
Definition: boss_jedoga_shadowseeker.cpp:69
void SetCombatMovement(bool allowMovement)
Definition: ScriptedCreature.cpp:513
Creature * me
Definition: ScriptedCreature.h:282
void SetReactState(ReactStates st)
Definition: Creature.h:89
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4069
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
Definition: Unit.h:1445
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:1481
bool AttackStop()
Definition: Unit.cpp:10368

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
543 {
544 if (!oocTriggers.empty())
545 {
546 for (ObjectGuid const& guid : oocTriggers)
547 {
548 if (Creature* summon = ObjectAccessor::GetCreature(*me, guid))
549 {
550 summon->DespawnOrUnsummon();
551 }
552 }
553 oocTriggers.clear();
554 }
555
556 if (!oocSummons.empty())
557 {
558 for (ObjectGuid const& guid : oocSummons)
559 {
560 if (Creature* summon = ObjectAccessor::GetCreature(*me, guid))
561 {
562 summon->DespawnOrUnsummon();
563 }
564 }
565 oocSummons.clear();
566 }
567 }
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
Definition: Creature.h:46
Definition: ObjectGuid.h:120
GuidList oocSummons
Definition: boss_jedoga_shadowseeker.cpp:526
GuidList oocTriggers
Definition: boss_jedoga_shadowseeker.cpp:527

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.

314 {
315 if (action == ACTION_SACRAFICE)
316 {
318 {
319 Unit::Kill(me, target);
320 }
321 }
322 }
@ ACTION_SACRAFICE
Definition: boss_jedoga_shadowseeker.cpp:112
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:17862
ObjectGuid sacraficeTarget_GUID
Definition: boss_jedoga_shadowseeker.cpp:528

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.

516 {
517 if (type == DATA_VOLUNTEER_WORK)
518 {
519 return volunteerWork ? 1 : 0;
520 }
521
522 return 0;
523 }
@ DATA_VOLUNTEER_WORK
Definition: boss_jedoga_shadowseeker.cpp:86

References DATA_VOLUNTEER_WORK, and volunteerWork.

◆ JustDied()

void boss_jedoga_shadowseeker::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

342 {
343 _JustDied();
346 }
@ SAY_DEATH
Definition: boss_jedoga_shadowseeker.cpp:33
Talk
Definition: boss_fathomlord_karathress.cpp:23
void _JustDied()
Definition: ScriptedCreature.cpp:585
void DespawnOOCSummons()
Definition: boss_jedoga_shadowseeker.cpp:542

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

◆ JustEngagedWith()

void boss_jedoga_shadowseeker::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

325 {
329 }
@ SAY_AGGRO
Definition: boss_jedoga_shadowseeker.cpp:29
void _JustEngagedWith()
Definition: ScriptedCreature.cpp:598
void ReschedulleCombatEvents()
Definition: boss_jedoga_shadowseeker.cpp:534

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

◆ JustSummoned()

void boss_jedoga_shadowseeker::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

219 {
220 if (summon->GetEntry() == NPC_JEDOGA_CONTROLLER)
221 {
222 summons.Summon(summon);
223 }
224 }
@ NPC_JEDOGA_CONTROLLER
Definition: ahnkahet.h:48
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90
SummonList summons
Definition: ScriptedCreature.h:497
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.

332 {
333 if (who->GetTypeId() != TYPEID_PLAYER)
334 {
335 return;
336 }
337
338 Talk(SAY_SLAY);
339 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
@ SAY_SLAY
Definition: boss_jedoga_shadowseeker.cpp:32
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.

163{}

◆ MovementInform()

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

Reimplemented from ScriptedAI.

349 {
350 if (!(type == POINT_MOTION_TYPE || type == EFFECT_MOTION_TYPE))
351 {
352 return;
353 }
354
355 switch (pointId)
356 {
357 case POINT_DOWN:
358 {
362 me->SetImmuneToAll(false);
364
368 SetCombatMovement(true);
369
370 me->SetDisableGravity(false);
371 me->SetHover(false);
372
374 if (Unit* victim = me->GetVictim())
375 {
376 me->StopMoving();
377 AttackStart(victim);
378 }
379 break;
380 }
381 case POINT_UP:
382 {
383 me->SetFacingTo(5.66f);
384 if (!summons.empty())
385 {
388 {
390 sacraficeTarget_GUID = volunteer->GetGUID();
391 volunteer->AI()->DoAction(ACTION_RITUAL_BEGIN);
392 }
393 // Something failed, let players continue but do not grant achievement
394 else
395 {
396 volunteerWork = false;
400 }
401 }
402 break;
403 }
404 case POINT_RITUAL:
405 {
406 me->SetFacingTo(5.66f);
408 events.ScheduleEvent(EVENT_JEDOGA_MOVE_UP, 1s, 0, PHASE_RITUAL);
409 break;
410 }
411 case POINT_INITIAL:
412 {
413 me->SetFacingTo(5.66f);
416 if (!oocTriggers.empty())
417 {
418 for (ObjectGuid const& guid : oocTriggers)
419 {
420 if (Creature* trigger = ObjectAccessor::GetCreature(*me, guid))
421 {
422 trigger->CastSpell(nullptr, SPELL_BEAM_VISUAL_JEDOGA);
423 }
424 }
425 }
426 break;
427 }
428 }
429 }
@ REACT_AGGRESSIVE
Definition: Unit.h:1025
@ UNIT_STATE_NO_ENVIRONMENT_UPD
Definition: Unit.h:353
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:46
@ EFFECT_MOTION_TYPE
Definition: MotionMaster.h:54
@ ACTION_RITUAL_BEGIN
Definition: boss_jedoga_shadowseeker.cpp:111
@ SAY_SACRIFICE_1
Definition: boss_jedoga_shadowseeker.cpp:30
const Position JedogaPosition[3]
Definition: boss_jedoga_shadowseeker.cpp:115
@ POINT_UP
Definition: boss_jedoga_shadowseeker.cpp:98
@ POINT_RITUAL
Definition: boss_jedoga_shadowseeker.cpp:99
@ POINT_INITIAL
Definition: boss_jedoga_shadowseeker.cpp:100
@ POINT_DOWN
Definition: boss_jedoga_shadowseeker.cpp:97
@ SPELL_LIGHTNING_BOLTS
Definition: boss_jedoga_shadowseeker.cpp:46
@ SPELL_SPHERE_VISUAL
Definition: boss_jedoga_shadowseeker.cpp:44
@ SPELL_BEAM_VISUAL_JEDOGA
Definition: boss_jedoga_shadowseeker.cpp:51
@ SPELL_HOVER_FALL
Definition: boss_jedoga_shadowseeker.cpp:50
@ EVENT_JEDOGA_MOVE_UP
Definition: boss_jedoga_shadowseeker.cpp:70
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:369
bool empty() const
Definition: ScriptedCreature.h:75
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:206
void SetInCombatWithZone()
Definition: Creature.cpp:2723
bool SetDisableGravity(bool disable, bool packetOnly=false, bool updateAnimationTier=true) override
Definition: Creature.cpp:3092
bool SetHover(bool enable, bool packetOnly=false, bool updateAnimationTier=true) override
Definition: Creature.cpp:3257
Definition: Unit.h:1290
void ClearUnitState(uint32 f)
Definition: Unit.h:1399
void SetFacingTo(float ori)
Definition: Unit.cpp:20782
MotionMaster * GetMotionMaster()
Definition: Unit.h:2262
void StopMoving()
Definition: Unit.cpp:16824
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4835
Unit * GetVictim() const
Definition: Unit.h:1386
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition: Unit.h:1678
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:1482
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:210
void Clear(bool reset=true)
Definition: MotionMaster.h:165

References ACTION_RITUAL_BEGIN, ScriptedAI::AttackStart(), MotionMaster::Clear(), Unit::ClearUnitState(), UnitAI::DoCastSelf(), EFFECT_MOTION_TYPE, SummonList::empty(), 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, SAY_SACRIFICE_1, 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
535 {
536 events.SetPhase(PHASE_NORMAL);
537 events.RescheduleEvent(EVENT_JEDOGA_CYCLONE, 3s, 0, PHASE_NORMAL);
538 events.RescheduleEvent(EVENT_JEDOGA_LIGHTNING_BOLT, 7s, 0, PHASE_NORMAL);
539 events.RescheduleEvent(EVENT_JEDOGA_THUNDERSHOCK, 12s, 0, PHASE_NORMAL);
540 }
@ EVENT_JEDOGA_LIGHTNING_BOLT
Definition: boss_jedoga_shadowseeker.cpp:67
@ EVENT_JEDOGA_THUNDERSHOCK
Definition: boss_jedoga_shadowseeker.cpp:68
@ EVENT_JEDOGA_CYCLONE
Definition: boss_jedoga_shadowseeker.cpp:66

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.

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

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.

227 {
228 switch (summon->GetEntry())
229 {
231 {
232 GuidList::iterator itr = std::find(oocSummons.begin(), oocSummons.end(), summon->GetGUID());
233 if (itr == oocSummons.end())
234 {
235 break;
236 }
237
238 oocSummons.erase(itr);
239 if (!oocSummons.empty())
240 {
241 break;
242 }
243
248
250 {
252 for (uint8 i = 0; i < MAX_COMBAT_INITIATES; ++i)
253 {
255 {
259 summon->SetImmuneToAll(true);
260 summons.Summon(summon);
261 }
262 }
264 }
265
266 break;
267 }
269 {
271 {
272 break;
273 }
274
275 if (killer != me && killer->GetGUID() != sacraficeTarget_GUID)
276 {
277 volunteerWork = false;
278 }
279 else
280 {
282 }
283 events.ScheduleEvent(EVENT_JEDOGA_MOVE_DOWN, 1s, 0, PHASE_RITUAL);
284 break;
285 }
286 }
287
288 summons.Despawn(summon);
289 }
std::uint8_t uint8
Definition: Define.h:110
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: Object.h:47
@ NPC_TWILIGHT_VOLUNTEER
Definition: boss_jedoga_shadowseeker.cpp:80
@ NPC_TWILIGHT_INITIATE
Definition: boss_jedoga_shadowseeker.cpp:79
@ MAX_COMBAT_INITIATES
Definition: boss_jedoga_shadowseeker.cpp:85
@ SPELL_GIFT_OF_THE_HERALD
Definition: boss_jedoga_shadowseeker.cpp:54
const Position VolunteerSpotPositions[MAX_COMBAT_INITIATES][2]
Definition: boss_jedoga_shadowseeker.cpp:123
@ EVENT_JEDOGA_MOVE_DOWN
Definition: boss_jedoga_shadowseeker.cpp:71
void Despawn(Creature const *summon)
Definition: ScriptedCreature.h:91
void DespawnEntry(uint32 entry)
Definition: ScriptedCreature.cpp:50
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:2318
void MoveIdle()
Definition: MotionMaster.cpp:231

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.

432 {
433 if (!UpdateVictim())
434 {
436 {
437 if (sayPreachTimer <= diff)
438 {
440 sayPreachTimer = 120000; // 2 min
441 }
442 else
443 {
444 sayPreachTimer -= diff;
445 }
446 }
447 return;
448 }
449
450 events.Update(diff);
452 {
453 return;
454 }
455
456 while (uint32 const eventId = events.ExecuteEvent())
457 {
458 switch (eventId)
459 {
460 // Normal phase
462 {
464 events.Repeat(10s, 14s);
465 break;
466 }
468 {
469 if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
470 {
472 }
473 events.Repeat(11s, 15s);
474 break;
475 }
477 {
478 if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
479 {
481 }
482
483 events.Repeat(16s, 22s);
484 break;
485 }
486 // Ritual phase
488 {
489 me->GetMotionMaster()->Clear(true);
491 break;
492 }
494 {
495 me->GetMotionMaster()->Clear(true);
496 me->SetDisableGravity(true);
497 me->SetHover(true);
499 break;
500 }
502 {
507 break;
508 }
509 }
510 }
511
513 }
std::uint32_t uint32
Definition: Define.h:108
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ DONE
Definition: InstanceScript.h:59
@ DATA_PRINCE_TALDARAM
Definition: ahnkahet.h:28
@ SAY_PREACHING
Definition: boss_jedoga_shadowseeker.cpp:34
@ SPELL_THUNDERSHOCK_H
Definition: boss_jedoga_shadowseeker.cpp:60
@ SPELL_LIGHTNING_BOLT
Definition: boss_jedoga_shadowseeker.cpp:57
@ SPELL_CYCLONE_STRIKE_H
Definition: boss_jedoga_shadowseeker.cpp:56
@ SPELL_CYCLONE_STRIKE
Definition: boss_jedoga_shadowseeker.cpp:55
@ SPELL_LIGHTNING_BOLT_H
Definition: boss_jedoga_shadowseeker.cpp:58
@ SPELL_THUNDERSHOCK
Definition: boss_jedoga_shadowseeker.cpp:59
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
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
bool UpdateVictim()
Definition: CreatureAI.cpp:269
const T & DUNGEON_MODE(const T &normal5, const T &heroic10) const
Definition: ScriptedCreature.h:388
InstanceScript *const instance
Definition: ScriptedCreature.h:461
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:230
void MoveTakeoff(uint32 id, Position const &pos, float speed=0.0f)
Definition: MotionMaster.cpp:455

References MotionMaster::Clear(), DATA_PRINCE_TALDARAM, SummonList::DespawnEntry(), UnitAI::DoCast(), UnitAI::DoCastSelf(), UnitAI::DoMeleeAttackIfReady(), DONE, ScriptedAI::DUNGEON_MODE(), EVENT_JEDOGA_CYCLONE, EVENT_JEDOGA_LIGHTNING_BOLT, EVENT_JEDOGA_MOVE_DOWN, EVENT_JEDOGA_MOVE_UP, EVENT_JEDOGA_PREPARE_RITUAL, EVENT_JEDOGA_THUNDERSHOCK, InstanceScript::GetBossState(), Unit::GetMotionMaster(), Unit::HasUnitState(), BossAI::instance, JedogaPosition, ScriptedAI::me, MotionMaster::MovePoint(), MotionMaster::MoveTakeoff(), NPC_JEDOGA_CONTROLLER, POINT_DOWN, POINT_RITUAL, POINT_UP, SAY_PREACHING, sayPreachTimer, 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