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

Public Member Functions

 StartLaunchEvent (Position const &pos, ObjectGuid const &guid)
 
bool Execute (uint64, uint32) override
 
- Public Member Functions inherited from BasicEvent
 BasicEvent ()
 
virtual ~BasicEvent ()
 
virtual bool IsDeletable () const
 
virtual void Abort (uint64)
 

Private Attributes

Position _pos
 
ObjectGuid _guid
 

Additional Inherited Members

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

Constructor & Destructor Documentation

StartLaunchEvent::StartLaunchEvent ( Position const pos,
ObjectGuid const guid 
)
inline
209  : _pos(pos), _guid(guid)
210  {
211  }
ObjectGuid _guid
Definition: isle_of_conquest.cpp:230
Position _pos
Definition: isle_of_conquest.cpp:229

Member Function Documentation

bool StartLaunchEvent::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

214  {
216  if (!player || !player->GetVehicle())
217  return true;
218 
219  player->AddAura(SPELL_LAUNCH_NO_FALLING_DAMAGE, player); // prevents falling damage
220  float speedZ = 10.0f;
221  float dist = player->GetExactDist2d(&_pos);
222 
223  player->ExitVehicle();
224  player->GetMotionMaster()->MoveJump(_pos, dist, speedZ, EVENT_JUMP, true);
225  return true;
226  }
ObjectGuid _guid
Definition: isle_of_conquest.cpp:230
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:209
Definition: SharedDefines.h:4414
Definition: BattlegroundIC.h:722
Position _pos
Definition: isle_of_conquest.cpp:229

+ Here is the call graph for this function:

Member Data Documentation

ObjectGuid StartLaunchEvent::_guid
private
Position StartLaunchEvent::_pos
private

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