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

Public Member Functions

 StartMovementEvent (Creature *summoner, 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

ObjectGuid _summonerGuid
 
Creature_owner
 

Additional Inherited Members

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

Constructor & Destructor Documentation

StartMovementEvent::StartMovementEvent ( Creature summoner,
Creature owner 
)
inline
414  : _summonerGuid(summoner->GetGUID()), _owner(owner)
415  {
416  }
ObjectGuid const & GetGUID() const
Definition: Object.h:105
ObjectGuid _summonerGuid
Definition: boss_the_lich_king.cpp:428
Creature * _owner
Definition: boss_the_lich_king.cpp:429

Member Function Documentation

bool StartMovementEvent::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

419  {
422  if (Unit* target = _summoner->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(_summoner)))
423  _owner->AI()->AttackStart(target);
424  return true;
425  }
Definition: UnitAI.h:107
Definition: Unit.h:1131
Definition: Creature.h:467
Definition: UnitAI.h:35
CreatureAI * AI() const
Definition: Creature.h:525
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
ObjectGuid _summonerGuid
Definition: boss_the_lich_king.cpp:428
Creature * _owner
Definition: boss_the_lich_king.cpp:429
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* StartMovementEvent::_owner
private
ObjectGuid StartMovementEvent::_summonerGuid
private

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