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
 Called at any Damage from any attacker (before damage apply)
 
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
 Use to start attacking a target. Called just before JustEngagedWith()
 
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
 Called at any Damage from any attacker (before damage apply)
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
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)
 
void ScheduleEnrageTimer (uint32 spellId, Milliseconds timer, uint8 textId=0)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER) override
 
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
 Called at any Damage from any attacker (before damage apply)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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 DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=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)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=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)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
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 *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast.
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Private 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
float callForHelpRange
 
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
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)
 
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:467
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 ,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Called at any Damage from any attacker (before damage apply)

Note
It use for recalculation damage or special reaction at damage for attack reaction use AttackedBy called for non DOT damage in Unit::DealDamage also

Reimplemented from UnitAI.

295 {
296 if (!ritualTriggered && me->HealthBelowPctDamaged(55, damage) && events.IsInPhase(PHASE_NORMAL))
297 {
298 me->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 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:251
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:275
@ REACT_PASSIVE
Definition Unit.h:548
@ 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
events
Definition boss_sartura.cpp:43
void SetCombatMovement(bool allowMovement)
Definition Creature.cpp:3863
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:95
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition Unit.cpp:4161
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
Definition Unit.h:1047
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:719
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:10448
Creature * me
Definition ScriptedCreature.h:280

References Unit::AttackStop(), EVENT_JEDOGA_PREPARE_RITUAL, Unit::HealthBelowPctDamaged(), Unit::InterruptNonMeleeSpells(), ScriptedAI::me, PHASE_NORMAL, PHASE_RITUAL, REACT_PASSIVE, ritualTriggered, Creature::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 }
Definition Creature.h:43
Definition ObjectGuid.h:118
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition ObjectAccessor.cpp:210
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:17754
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 CreatureAI.

345 {
346 _JustDied();
349 }
@ SAY_DEATH
Definition boss_jedoga_shadowseeker.cpp:35
void _JustDied()
Definition ScriptedCreature.cpp:644
Talk
Definition hyjal.cpp:82
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 CreatureAI.

328 {
332 }
@ SAY_AGGRO
Definition boss_jedoga_shadowseeker.cpp:31
void _JustEngagedWith()
Definition ScriptedCreature.cpp:657
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 CreatureAI.

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

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

◆ KilledUnit()

void boss_jedoga_shadowseeker::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

335 {
336 if (!who->IsPlayer())
337 {
338 return;
339 }
340
341 Talk(SAY_SLAY);
342 }
@ SAY_SLAY
Definition boss_jedoga_shadowseeker.cpp:34
bool IsPlayer() const
Definition Object.h:200

References Object::IsPlayer(), and SAY_SLAY.

◆ 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 CreatureAI.

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 me->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 }
@ POINT_MOTION_TYPE
Definition MotionMaster.h:48
@ EFFECT_MOTION_TYPE
Definition MotionMaster.h:56
@ UNIT_STATE_NO_ENVIRONMENT_UPD
Definition UnitDefines.h:198
@ REACT_AGGRESSIVE
Definition Unit.h:550
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
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition Creature.cpp:2828
bool SetDisableGravity(bool disable, bool packetOnly=false, bool updateAnimationTier=true) override
Enable or disable the creature's fly mode by adding or removing: MOVEMENTFLAG_FLYING....
Definition Creature.cpp:3222
bool SetHover(bool enable, bool packetOnly=false, bool updateAnimationTier=true) override
Definition Creature.cpp:3387
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition MotionMaster.h:213
void Clear(bool reset=true)
Definition MotionMaster.h:167
bool empty() const
Definition ScriptedCreature.h:73
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:392
Definition Unit.h:636
void ClearUnitState(uint32 f)
Definition Unit.h:708
void SetFacingTo(float ori)
Definition Unit.cpp:20581
MotionMaster * GetMotionMaster()
Definition Unit.h:1673
void StopMoving()
Definition Unit.cpp:16702
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4941
Unit * GetVictim() const
Definition Unit.h:862
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition Unit.h:883
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:720
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition Containers.h:133
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:210

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(), Creature::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 UnitAI.

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 }
@ IMMUNITY_DAMAGE
Definition SharedDefines.h:1397
@ SPELL_SCHOOL_MASK_NORMAL
Definition SharedDefines.h:297
@ SPELL_SCHOOL_MASK_MAGIC
Definition SharedDefines.h:312
@ UNIT_STAND_STATE_KNEEL
Definition UnitDefines.h:40
@ 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
void _Reset()
Definition ScriptedCreature.cpp:624
void Clear()
Definition ObjectGuid.h:138
Definition TemporarySummon.h:40
void AddUnitState(uint32 f)
Definition Unit.h:706
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition Object.cpp:2445

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:109
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition Object.h:51
@ MAX_COMBAT_INITIATES
Definition boss_jedoga_shadowseeker.cpp:88
@ NPC_TWILIGHT_VOLUNTEER
Definition boss_jedoga_shadowseeker.cpp:83
@ NPC_TWILIGHT_INITIATE
Definition boss_jedoga_shadowseeker.cpp:82
@ 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 MoveIdle()
Definition MotionMaster.cpp:232
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:112
void Despawn(Creature const *summon)
Definition ScriptedCreature.h:89
void DespawnEntry(uint32 entry)
Definition ScriptedCreature.cpp:54
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:2368

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  )
inlineoverridevirtual

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

Implements UnitAI.

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:107
@ DONE
Definition InstanceScript.h:61
@ UNIT_STATE_CASTING
Definition UnitDefines.h:185
@ 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
InstanceScript *const instance
Definition ScriptedCreature.h:474
bool UpdateVictim()
Definition CreatureAI.cpp:280
EncounterState GetBossState(uint32 id) const
Definition InstanceScript.h:242
void MoveTakeoff(uint32 id, Position const &pos, float speed=0.0f, bool skipAnimation=false)
Use to move the unit from the ground to the air. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:523
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 HasUnitState(const uint32 f) const
Definition Unit.h:707
const T & DUNGEON_MODE(const T &normal5, const T &heroic10) const
Definition ScriptedCreature.h:388

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, Random, 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

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