AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
DelayedMovementEvent Class Reference
Inheritance diagram for DelayedMovementEvent:
BasicEvent

Public Member Functions

 DelayedMovementEvent (Creature *owner, Position const &dest)
 
bool Execute (uint64, uint32) override
 
- Public Member Functions inherited from BasicEvent
 BasicEvent ()=default
 
virtual ~BasicEvent ()=default
 
virtual bool IsDeletable () const
 
virtual void Abort (uint64)
 
void ScheduleAbort ()
 

Private Attributes

Creature_owner
 
Position const & _dest
 

Detailed Description

Constructor & Destructor Documentation

◆ DelayedMovementEvent()

DelayedMovementEvent::DelayedMovementEvent ( Creature owner,
Position const &  dest 
)
inline
497: _owner(owner), _dest(dest) { }
Creature * _owner
Definition boss_icecrown_gunship_battle.cpp:512
Position const & _dest
Definition boss_icecrown_gunship_battle.cpp:513

Member Function Documentation

◆ Execute()

bool DelayedMovementEvent::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

500 {
501 if (!_owner->IsAlive() || !_owner->GetTransport())
502 return true;
503
504 float x, y, z, o;
505 _dest.GetPosition(x, y, z, o);
508 return true;
509 }
@ FORCED_MOVEMENT_NONE
Definition MotionMaster.h:85
#define EVENT_CHARGE_PREPATH
Definition boss_icecrown_gunship_battle.cpp:108
void MovePoint(uint32 id, const Position &pos, ForcedMovement forcedMovement=FORCED_MOVEMENT_NONE, float speed=0.f, bool generatePath=true, bool forceDestination=true)
Definition MotionMaster.h:228
void CalculatePassengerPosition(float &x, float &y, float &z, float *o=nullptr) const override
This method transforms supplied transport offsets into global coordinates.
Definition Transport.h:33
MotionMaster * GetMotionMaster()
Definition Unit.h:1713
bool IsAlive() const
Definition Unit.h:1748
Transport * GetTransport() const
Definition Object.h:683
void GetPosition(float &x, float &y) const
Definition Position.h:126

References _dest, _owner, Transport::CalculatePassengerPosition(), EVENT_CHARGE_PREPATH, FORCED_MOVEMENT_NONE, Unit::GetMotionMaster(), Position::GetPosition(), WorldObject::GetTransport(), Unit::IsAlive(), and MotionMaster::MovePoint().

Member Data Documentation

◆ _dest

Position const& DelayedMovementEvent::_dest
private

Referenced by Execute().

◆ _owner

Creature* DelayedMovementEvent::_owner
private

Referenced by Execute().


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