TrinityCore
VehicleJoinEvent Class Reference

#include <Vehicle.h>

+ Inheritance diagram for VehicleJoinEvent:

Protected Member Functions

 VehicleJoinEvent (Vehicle *v, Unit *u)
 
bool Execute (uint64, uint32) override
 Actually adds the passenger @Passenger to vehicle @Target. More...
 
void Abort (uint64) override
 Aborts the event. Implies that unit @Passenger will not be boarding vehicle @Target after all. More...
 

Protected Attributes

VehicleTarget
 
UnitPassenger
 
SeatMap::iterator Seat
 

Friends

class Vehicle
 

Additional Inherited Members

- Public Member Functions inherited from BasicEvent
 BasicEvent ()
 
virtual ~BasicEvent ()
 
virtual bool Execute (uint64, uint32)
 
virtual bool IsDeletable () const
 
virtual void Abort (uint64)
 
void ScheduleAbort ()
 

Detailed Description

Definition at line 134 of file Vehicle.h.

Constructor & Destructor Documentation

◆ VehicleJoinEvent()

VehicleJoinEvent::VehicleJoinEvent ( Vehicle v,
Unit u 
)
inlineprotected

Definition at line 138 of file Vehicle.h.

Member Function Documentation

◆ Abort()

void VehicleJoinEvent::Abort ( uint64  )
overrideprotectedvirtual

Aborts the event. Implies that unit @Passenger will not be boarding vehicle @Target after all.

Author
Machiavelli
Date
17-2-2013
Parameters
parameter1Unused

Check if the Vehicle was already uninstalled, in which case all auras were removed already

Remove the pending event when Abort was called on the event directly

@SPELL_AURA_CONTROL_VEHICLE auras can be applied even when the passenger is not (yet) on the vehicle. When this code is triggered it means that something went wrong in @Vehicle::AddVehiclePassenger, and we should remove the aura manually.

Reimplemented from BasicEvent.

Definition at line 928 of file Vehicle.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Execute()

bool VehicleJoinEvent::Execute ( uint64  ,
uint32   
)
overrideprotectedvirtual

Actually adds the passenger @Passenger to vehicle @Target.

Author
Machiavelli
Date
17-2-2013
Parameters
parameter1Unused
parameter2Unused.
Returns
true, cannot fail.

Reimplemented from BasicEvent.

Definition at line 791 of file Vehicle.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ Vehicle

friend class Vehicle
friend

Definition at line 136 of file Vehicle.h.

Member Data Documentation

◆ Passenger

Unit* VehicleJoinEvent::Passenger
protected

Definition at line 143 of file Vehicle.h.

◆ Seat

SeatMap::iterator VehicleJoinEvent::Seat
protected

Definition at line 144 of file Vehicle.h.

◆ Target

Vehicle* VehicleJoinEvent::Target
protected

Definition at line 142 of file Vehicle.h.


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