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

Public Member Functions

 npc_mechanoliftAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void JustDied (Unit *) override
 
void MovementInform (uint32 type, uint32 id) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from PassiveAI
 PassiveAI (Creature *c)
 
void MoveInLineOfSight (Unit *) override
 
void AttackStart (Unit *) 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 ()
 
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 InitializeAI ()
 
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 (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)
 

Public Attributes

uint32 MoveTimer
 

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 PassiveAI
static int Permissible (const Creature *)
 
- 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)
 
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_mechanolift::npc_mechanoliftAI::npc_mechanoliftAI ( Creature creature)
inline
799  : PassiveAI(creature)
800  {
801  Initialize();
802  ASSERT(me->GetVehicleKit());
803  }
PassiveAI(Creature *c)
Definition: PassiveAI.cpp:22
Creature *const me
Definition: CreatureAI.h:71
#define ASSERT
Definition: Errors.h:55
Vehicle * GetVehicleKit() const
Definition: Unit.h:2165
void Initialize()
Definition: boss_flame_leviathan.cpp:805

+ Here is the call graph for this function:

Member Function Documentation

void npc_mechanolift::npc_mechanoliftAI::Initialize ( void  )
inline
806  {
807  MoveTimer = 0;
808  }
uint32 MoveTimer
Definition: boss_flame_leviathan.cpp:810

+ Here is the caller graph for this function:

void npc_mechanolift::npc_mechanoliftAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

819  {
822  Creature* liquid = DoSummon(NPC_LIQUID, me, 0);
823  if (liquid)
824  {
825  liquid->CastSpell(liquid, SPELL_LIQUID_PYRITE, true);
826  liquid->CastSpell(liquid, SPELL_DUST_CLOUD_IMPACT, true);
827  }
828  }
Definition: boss_flame_leviathan.cpp:90
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: boss_flame_leviathan.cpp:81
void MoveTargetedHome()
Definition: MotionMaster.cpp:201
Definition: Creature.h:467
Creature *const me
Definition: CreatureAI.h:71
Creature * DoSummon(uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
Definition: CreatureAI.cpp:377
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: boss_flame_leviathan.cpp:79
Definition: boss_flame_leviathan.cpp:80
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_mechanolift::npc_mechanoliftAI::MovementInform ( uint32  type,
uint32  id 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

831  {
832  if (type == POINT_MOTION_TYPE && id == 1)
833  if (Creature* container = me->FindNearestCreature(NPC_CONTAINER, 5, true))
834  container->EnterVehicle(me);
835  }
Definition: boss_flame_leviathan.cpp:91
Definition: Creature.h:467
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2443
Creature *const me
Definition: CreatureAI.h:71
Definition: MotionMaster.h:46

+ Here is the call graph for this function:

void npc_mechanolift::npc_mechanoliftAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

813  {
814  Initialize();
815  me->GetMotionMaster()->MoveRandom(50);
816  }
void MoveRandom(float spawndist=0.0f)
Definition: MotionMaster.cpp:192
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Creature *const me
Definition: CreatureAI.h:71
void Initialize()
Definition: boss_flame_leviathan.cpp:805

+ Here is the call graph for this function:

void npc_mechanolift::npc_mechanoliftAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from PassiveAI.

838  {
839  if (MoveTimer <= diff)
840  {
841  if (me->GetVehicleKit()->HasEmptySeat(-1))
842  {
843  Creature* container = me->FindNearestCreature(NPC_CONTAINER, 50, true);
844  if (container && !container->GetVehicle())
845  me->GetMotionMaster()->MovePoint(1, container->GetPositionX(), container->GetPositionY(), container->GetPositionZ());
846  }
847 
848  MoveTimer = 30000; //check next 30 seconds
849  }
850  else
851  MoveTimer -= diff;
852  }
Definition: boss_flame_leviathan.cpp:91
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: Creature.h:467
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2443
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
uint32 MoveTimer
Definition: boss_flame_leviathan.cpp:810
float GetPositionY() const
Definition: Position.h:105
float GetPositionZ() const
Definition: Position.h:106
Vehicle * GetVehicle() const
Definition: Unit.h:2166
bool HasEmptySeat(int8 seatId) const
Checks if vehicle's seat specified by 'seatId' is empty.
Definition: Vehicle.cpp:266
float GetPositionX() const
Definition: Position.h:104
Vehicle * GetVehicleKit() const
Definition: Unit.h:2165

+ Here is the call graph for this function:

Member Data Documentation

uint32 npc_mechanolift::npc_mechanoliftAI::MoveTimer

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