19 #ifndef __TRINITY_VEHICLE_H
20 #define __TRINITY_VEHICLE_H
44 void Reset(
bool evading =
false);
45 void InstallAllAccessories(
bool evading);
46 void ApplyAllImmunities();
53 bool HasEmptySeat(
int8 seatId)
const;
54 Unit* GetPassenger(
int8 seatId)
const;
55 SeatMap::const_iterator GetNextEmptySeat(
int8 seatId,
bool next)
const;
56 uint8 GetAvailableSeatCount()
const;
58 bool AddPassenger(
Unit* passenger,
int8 seatId = -1);
59 void EjectPassenger(
Unit* passenger,
Unit* controller);
61 void RelocatePassengers();
62 void RemoveAllPassengers();
63 bool IsVehicleInUse()
const;
72 void RemovePendingEventsForPassenger(
Unit* passenger);
86 SeatMap::iterator GetSeatIteratorForPassenger(
Unit* passenger);
87 void InitMovementInfoForBase();
93 GetBase()->GetPositionX(), GetBase()->GetPositionY(),
94 GetBase()->GetPositionZ(), GetBase()->GetOrientation());
101 GetBase()->GetPositionX(), GetBase()->GetPositionY(),
102 GetBase()->GetPositionZ(), GetBase()->GetOrientation());
106 void RemovePendingEventsForSeat(
int8 seatId);
Definition: DBCStructure.h:1305
Position _lastShootPos
Definition: Vehicle.h:115
int8_t int8
Definition: Define.h:148
VehicleEntry const * GetVehicleInfo() const
Definition: Vehicle.h:50
void RemoveVehicleKit(bool onRemoveFromWorld=false)
Definition: Unit.cpp:14318
uint32 UsableSeatNum
Number of seats that match VehicleSeatEntry::UsableByPlayer, used for proper display flags...
Definition: Vehicle.h:76
int next(int i, int n)
Definition: RecastContour.cpp:469
Unit * Passenger
Definition: Vehicle.h:131
virtual void CalculatePassengerOffset(float &x, float &y, float &z, float *o=NULL) const =0
This method transforms supplied global coordinates into local offsets.
virtual void Abort(uint64)
Definition: EventProcessor.h:46
GuidSet vehiclePlayers
Definition: Vehicle.h:111
Definition: VehicleDefines.h:119
Position const & GetLastShootPos() const
Definition: Vehicle.h:66
virtual void CalculatePassengerPosition(float &x, float &y, float &z, float *o=NULL) const =0
This method transforms supplied transport offsets into global coordinates.
Definition: DBCStructure.h:1271
std::map< int8, VehicleSeat > SeatMap
Definition: VehicleDefines.h:117
bool CreateVehicleKit(uint32 id, uint32 creatureEntry, bool loading=false)
Definition: Unit.cpp:14302
void CalculatePassengerOffset(float &x, float &y, float &z, float *o) const override
This method transforms supplied global coordinates into local offsets.
Definition: Vehicle.h:98
void CalculatePassengerPosition(float &x, float &y, float &z, float *o) const override
This method transforms supplied transport offsets into global coordinates.
Definition: Vehicle.h:90
Unit * _me
The underlying unit with the vehicle kit. Can be player or creature.
Definition: Vehicle.h:109
G3D::int16 z
Definition: Vector3int16.h:46
Seats
Definition: boss_grand_champions.cpp:78
VehicleJoinEvent(Vehicle *v, Unit *u)
Definition: Vehicle.h:125
uint32_t uint32
Definition: Define.h:150
uint64_t uint64
Definition: Define.h:149
G3D::int16 y
Definition: Vector2int16.h:38
Status _status
Internal variable for sanity checks.
Definition: Vehicle.h:114
virtual bool Execute(uint64, uint32)
Definition: EventProcessor.h:42
Definition: EventProcessor.h:28
SeatMap::iterator Seat
Definition: Vehicle.h:132
std::set< ObjectGuid > GuidSet
Definition: ObjectGuid.h:332
#define TC_GAME_API
Definition: Define.h:134
Definition: Vehicle.h:121
VehicleEntry const * _vehicleInfo
DBC data for vehicle.
Definition: Vehicle.h:110
uint8_t uint8
Definition: Define.h:152
Definition: Position.h:27
Vehicle * Target
Definition: Vehicle.h:130
PendingJoinEventContainer _pendingJoinEvents
Collection of delayed join events for prospective passengers.
Definition: Vehicle.h:118
uint32 _creatureEntry
Can be different than the entry of _me in case of players.
Definition: Vehicle.h:113
G3D::int16 x
Definition: Vector2int16.h:37
void SetLastShootPos(Position const &pos)
Definition: Vehicle.h:65
std::list< VehicleJoinEvent * > PendingJoinEventContainer
Definition: Vehicle.h:117
SeatMap Seats
The collection of all seats on the vehicle. Including vacant ones.
Definition: Vehicle.h:68
uint32 GetCreatureEntry() const
Definition: Vehicle.h:51
Status
Definition: Vehicle.h:79
Unit * GetBase() const
May be called from scripts.
Definition: Vehicle.h:49