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

Public Member Functions

 DelayedMovementEvent (Creature *owner, Position const &dest)
 
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
 
Position const_dest
 

Additional Inherited Members

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

Constructor & Destructor Documentation

DelayedMovementEvent::DelayedMovementEvent ( Creature owner,
Position const dest 
)
inline
464 : _owner(owner), _dest(dest) { }
Creature * _owner
Definition: boss_icecrown_gunship_battle.cpp:482
Position const & _dest
Definition: boss_icecrown_gunship_battle.cpp:483

Member Function Documentation

bool DelayedMovementEvent::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

467  {
468  if (!_owner->IsAlive())
469  return true;
470 
472 
474  init.DisableTransportPathTransformations();
475  init.MoveTo(_dest.GetPositionX(), _dest.GetPositionY(), _dest.GetPositionZ(), false);
476  init.Launch();
477 
478  return true;
479  }
Creature * _owner
Definition: boss_icecrown_gunship_battle.cpp:482
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: SharedDefines.h:4419
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
Position const & _dest
Definition: boss_icecrown_gunship_battle.cpp:483
bool IsAlive() const
Definition: Unit.h:1692
float GetPositionY() const
Definition: Position.h:105
float GetPositionZ() const
Definition: Position.h:106
Definition: MoveSplineInit.h:52
float GetPositionX() const
Definition: Position.h:104

+ Here is the call graph for this function:

Member Data Documentation

Position const& DelayedMovementEvent::_dest
private
Creature* DelayedMovementEvent::_owner
private

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