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

Public Member Functions

 npc_egg_pileAI (Creature *creature)
 
void AttackStart (Unit *) override
 
void Reset () override
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
void DoAction (int32 action) 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 KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
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
 
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 InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
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
 
uint32 _callHatchlingSpell = 0
 

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_egg_pile::npc_egg_pileAI::npc_egg_pileAI ( Creature creature)
inline
400  : CreatureAI(creature)
401  {
402  }
CreatureAI(Creature *creature)
Definition: CreatureAI.h:95

Member Function Documentation

void npc_egg_pile::npc_egg_pileAI::AttackStart ( Unit )
inlineoverridevirtual

Reimplemented from UnitAI.

404 { }
void npc_egg_pile::npc_egg_pileAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

430  {
431  if (action != NPC_BLAZING_MONSTROSITY_LEFT &&
433  return;
434 
435  if (action == NPC_BLAZING_MONSTROSITY_LEFT)
437 
439  DoZoneInCombat();
440  _events.Reset();
442  }
Definition: firelands.h:43
EventMap _events
Definition: boss_alysrazor.cpp:486
void Reset()
Definition: EventMap.cpp:20
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
Definition: boss_alysrazor.cpp:33
Definition: boss_alysrazor.cpp:92
Definition: boss_alysrazor.cpp:72
Definition: firelands.h:42
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
uint32 _callHatchlingSpell
Definition: boss_alysrazor.cpp:487
Definition: boss_alysrazor.cpp:73

+ Here is the call graph for this function:

void npc_egg_pile::npc_egg_pileAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

414  {
415  _events.Reset();
416  std::list<Creature*> eggs;
418  for (std::list<Creature*>::const_iterator itr = eggs.begin(); itr != eggs.end(); ++itr)
420 
422  }
EventMap _events
Definition: boss_alysrazor.cpp:486
void Reset()
Definition: EventMap.cpp:20
Definition: boss_alysrazor.cpp:74
TC_GAME_API void GetCreatureListWithEntryInGrid(std::list< Creature * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
Definition: ScriptedCreature.cpp:621
Will ignore most target checks (mostly DBC target checks)
Definition: Unit.h:479
Creature *const me
Definition: CreatureAI.h:71
Definition: firelands.h:46
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101

+ Here is the call graph for this function:

void npc_egg_pile::npc_egg_pileAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

425  {
427  }
static void AlysrazorTrashEvaded(Creature *creature)
Definition: boss_alysrazor.cpp:162
Creature *const me
Definition: CreatureAI.h:71

+ Here is the call graph for this function:

void npc_egg_pile::npc_egg_pileAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

407  {
409  _events.Reset();
411  }
EventMap _events
Definition: boss_alysrazor.cpp:486
void Reset()
Definition: EventMap.cpp:20
Definition: Unit.h:1129
Creature *const me
Definition: CreatureAI.h:71
uint32 _callHatchlingSpell
Definition: boss_alysrazor.cpp:487
void SetReactState(ReactStates st)
Definition: Creature.h:502

+ Here is the call graph for this function:

void npc_egg_pile::npc_egg_pileAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Implements UnitAI.

445  {
446  if (!UpdateVictim())
447  return;
448 
449  _events.Update(diff);
450 
452  return;
453 
454  while (uint32 eventId = _events.ExecuteEvent())
455  {
456  switch (eventId)
457  {
459  {
460  std::list<Creature*> eggs;
463  me->VisitNearbyGridObject(20.0f, searcher);
464  if (!eggs.empty())
465  {
469  egg->m_Events.AddEvent(new RespawnEggEvent(egg), egg->m_Events.CalculateTime(5000));
470  }
471 
475  break;
476  }
477  default:
478  break;
479  }
480  }
481 
483  }
Definition: boss_alysrazor.cpp:102
EventProcessor m_Events
Definition: Unit.h:1948
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: boss_alysrazor.cpp:71
Definition: boss_alysrazor.cpp:97
Definition: Unit.h:565
C::value_type const & SelectRandomContainerElement(C const &container)
Definition: Containers.h:68
EventMap _events
Definition: boss_alysrazor.cpp:486
void AddEvent(BasicEvent *Event, uint64 e_time, bool set_addtime=true)
Definition: EventProcessor.cpp:88
Will ignore most target checks (mostly DBC target checks)
Definition: Unit.h:479
Definition: Creature.h:467
Definition: boss_alysrazor.cpp:117
void VisitNearbyGridObject(float const &radius, NOTIFIER &notifier) const
Definition: Object.h:588
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_alysrazor.cpp:92
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: GridNotifiers.h:459
uint32_t uint32
Definition: Define.h:150
uint64 CalculateTime(uint64 t_offset) const
Definition: EventProcessor.cpp:95
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
void SetDisplayId(uint32 modelId) override
Definition: Creature.cpp:2664
uint32 _callHatchlingSpell
Definition: boss_alysrazor.cpp:487
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
T check(T value)
Definition: format.h:305
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:

Member Data Documentation

uint32 npc_egg_pile::npc_egg_pileAI::_callHatchlingSpell = 0
private
EventMap npc_egg_pile::npc_egg_pileAI::_events
private

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