TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
npc_living_constellation::npc_living_constellationAI Struct Reference

Public Member Functions

 npc_living_constellationAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
uint32 GetData (uint32) const override
 
void DoAction (int32 action) override
 
void SpellHit (Unit *caster, SpellInfo const *spell) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
 CreatureAI (Creature *creature)
 
virtual ~CreatureAI ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void EnterCombat (Unit *)
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted () const
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary constGetBoundary () const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void InitializeAI ()
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectAggroTarget targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectAggroTarget targetType)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
void DoCast (uint32 spellId)
 
void DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
void DoCastVictim (uint32 spellId, bool triggered=false)
 
void DoCastAOE (uint32 spellId, bool triggered=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
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 sQuestReward (Player *, Quest const *, uint32)
 
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
 
virtual void sOnGameEvent (bool, uint16)
 

Private Attributes

EventMap _events
 
bool _isActive
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason { EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_SEQUENCE_BREAK, EVADE_REASON_OTHER }
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
bool CheckBoundary (Position const *who=nullptr) const
 
void SetBoundary (CreatureBoundary const *boundary)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

npc_living_constellation::npc_living_constellationAI::npc_living_constellationAI ( Creature creature)
inline
722  : CreatureAI(creature)
723  {
724  Initialize();
725  }
void Initialize()
Definition: boss_algalon_the_observer.cpp:727
CreatureAI(Creature *creature)
Definition: CreatureAI.h:95

+ Here is the call graph for this function:

Member Function Documentation

void npc_living_constellation::npc_living_constellationAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

745  {
746  switch (action)
747  {
749  if (Creature* algalon = me->FindNearestCreature(NPC_ALGALON, 200.0f))
750  {
751  if (Unit* target = algalon->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(algalon)))
752  {
755  AttackStart(target);
756  DoZoneInCombat();
757  _isActive = true;
758  }
759  }
760  break;
761  case ACTION_BIG_BANG:
763  _events.DelayEvents(9500);
765  break;
766  }
767  }
EventMap _events
Definition: boss_algalon_the_observer.cpp:804
Definition: UnitAI.h:107
Definition: Unit.h:1131
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
Definition: ulduar.h:81
Definition: boss_algalon_the_observer.cpp:159
Definition: Creature.h:467
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2443
Definition: boss_algalon_the_observer.cpp:126
bool _isActive
Definition: boss_algalon_the_observer.cpp:805
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_algalon_the_observer.cpp:179
Definition: UnitAI.h:35
Definition: boss_algalon_the_observer.cpp:158
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: UpdateFields.h:109
Definition: Unit.h:1305
void SetReactState(ReactStates st)
Definition: Creature.h:502
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29
Definition: Unit.h:698
void DelayEvents(Milliseconds const &delay)
Definition: EventMap.h:219

+ Here is the call graph for this function:

uint32 npc_living_constellation::npc_living_constellationAI::GetData ( uint32  ) const
inlineoverridevirtual

Reimplemented from UnitAI.

740  {
741  return _isActive ? 1 : 0;
742  }
bool _isActive
Definition: boss_algalon_the_observer.cpp:805
void npc_living_constellation::npc_living_constellationAI::Initialize ( void  )
inline
728  {
729  _isActive = false;
730  }
bool _isActive
Definition: boss_algalon_the_observer.cpp:805

+ Here is the caller graph for this function:

void npc_living_constellation::npc_living_constellationAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

733  {
734  _events.Reset();
736  Initialize();
737  }
EventMap _events
Definition: boss_algalon_the_observer.cpp:804
void Reset()
Definition: EventMap.cpp:20
void Initialize()
Definition: boss_algalon_the_observer.cpp:727
Definition: boss_algalon_the_observer.cpp:151
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123

+ Here is the call graph for this function:

void npc_living_constellation::npc_living_constellationAI::SpellHit ( Unit caster,
SpellInfo const spell 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

770  {
771  if (spell->Id != SPELL_CONSTELLATION_PHASE_EFFECT || caster->GetTypeId() != TYPEID_UNIT)
772  return;
773 
774  me->DespawnOrUnsummon(1);
775  if (InstanceScript* instance = me->GetInstanceScript())
776  instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_ID_SUPERMASSIVE_START);
778  caster->ToCreature()->DespawnOrUnsummon(1);
779  }
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
Definition: Creature.cpp:1774
Definition: boss_algalon_the_observer.cpp:184
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
Definition: DBCEnums.h:183
Definition: ObjectGuid.h:32
arena_t NULL
Definition: jemalloc_internal.h:624
Will ignore most target checks (mostly DBC target checks)
Definition: Unit.h:479
Definition: boss_algalon_the_observer.cpp:95
Definition: boss_algalon_the_observer.cpp:91
Creature *const me
Definition: CreatureAI.h:71
TypeID GetTypeId() const
Definition: Object.h:113
Creature * ToCreature()
Definition: Object.h:194
Definition: InstanceScript.h:141
Definition: Unit.h:1305
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869

+ Here is the call graph for this function:

void npc_living_constellation::npc_living_constellationAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Implements UnitAI.

782  {
784  return;
785 
786  _events.Update(diff);
787 
788  while (uint32 eventId = _events.ExecuteEvent())
789  {
790  switch (eventId)
791  {
795  break;
797  _events.SetPhase(0);
798  break;
799  }
800  }
801  }
EventMap _events
Definition: boss_algalon_the_observer.cpp:804
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: boss_algalon_the_observer.cpp:81
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
Definition: boss_algalon_the_observer.cpp:178
Definition: boss_algalon_the_observer.cpp:126
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
Definition: boss_algalon_the_observer.cpp:179
uint32_t uint32
Definition: Define.h:150
Definition: boss_algalon_the_observer.cpp:151
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
void Update(uint32 time)
Definition: EventMap.h:54
uint32 ExecuteEvent()
Definition: EventMap.cpp:46

+ Here is the call graph for this function:

Member Data Documentation

EventMap npc_living_constellation::npc_living_constellationAI::_events
private
bool npc_living_constellation::npc_living_constellationAI::_isActive
private

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