TrinityCore
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)
 
void ScheduleAbort ()
 

Private Attributes

Creature_owner
 

Constructor & Destructor Documentation

◆ StartMovementEvent()

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

Member Function Documentation

◆ Execute()

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

Reimplemented from BasicEvent.

2135  {
2137  if (Unit* target = _owner->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
2138  _owner->AI()->AttackStart(target);
2139  return true;
2140  }
Creature * _owner
Definition: halls_of_reflection.cpp:2143
Definition: UnitDefines.h:372
CreatureAI * AI() const
Definition: Creature.h:156
Definition: UnitAI.h:52
Unit * SelectTarget(SelectAggroTarget targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:107
Definition: Unit.h:736
void SetReactState(ReactStates st)
Definition: Creature.h:110
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:31

Member Data Documentation

◆ _owner

Creature* hor::StartMovementEvent::_owner
private

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