TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
hor::StartMovementEvent Class Reference

Public Member Functions

 StartMovementEvent (Creature *owner)
 
bool Execute (uint64, uint32) override
 
- Public Member Functions inherited from BasicEvent
 BasicEvent ()
 
virtual ~BasicEvent ()
 
virtual bool IsDeletable () const
 
virtual void Abort (uint64)
 

Private Attributes

Creature_owner
 

Additional Inherited Members

- Public Attributes inherited from BasicEvent
bool to_Abort
 
uint64 m_addTime
 
uint64 m_execTime
 

Constructor & Destructor Documentation

hor::StartMovementEvent::StartMovementEvent ( Creature owner)
inline
2122 : _owner(owner) { }
Creature * _owner
Definition: halls_of_reflection.cpp:2133

Member Function Documentation

bool hor::StartMovementEvent::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

2125  {
2127  if (Unit* target = _owner->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
2128  _owner->AI()->AttackStart(target);
2129  return true;
2130  }
Definition: Unit.h:1131
Creature * _owner
Definition: halls_of_reflection.cpp:2133
Definition: UnitAI.h:35
CreatureAI * AI() const
Definition: Creature.h:525
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
Definition: Unit.h:1305
void SetReactState(ReactStates st)
Definition: Creature.h:502
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29

+ Here is the call graph for this function:

Member Data Documentation

Creature* hor::StartMovementEvent::_owner
private

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