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 Execute (uint64, uint32)
 
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
495: _owner(owner), _dest(dest) { }
Creature * _owner
Definition: boss_icecrown_gunship_battle.cpp:510
Position const & _dest
Definition: boss_icecrown_gunship_battle.cpp:511

Member Function Documentation

◆ Execute()

bool DelayedMovementEvent::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

498 {
499 if (!_owner->IsAlive() || !_owner->GetTransport())
500 return true;
501
502 float x, y, z, o;
503 _dest.GetPosition(x, y, z, o);
506 return true;
507 }
#define EVENT_CHARGE_PREPATH
Definition: boss_icecrown_gunship_battle.cpp:107
Transport * GetTransport() const
Definition: Object.h:604
void GetPosition(float &x, float &y) const
Definition: Position.h:121
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:32
MotionMaster * GetMotionMaster()
Definition: Unit.h:1620
bool IsAlive() const
Definition: Unit.h:1654
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:213

References _dest, _owner, Transport::CalculatePassengerPosition(), EVENT_CHARGE_PREPATH, 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().