18#ifndef __TRINITY_VEHICLE_H
19#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;
57 uint8 GetAvailableSeatCount()
const;
59 bool AddVehiclePassenger(
Unit* unit,
int8 seatId = -1);
61 void RelocatePassengers();
62 void RemoveAllPassengers();
63 bool IsVehicleInUse()
const;
64 bool IsControllableVehicle()
const;
66 SeatMap::iterator GetSeatIteratorForPassenger(
Unit* passenger);
71 void RemovePendingEventsForPassenger(
Unit* passenger);
92 void InitMovementInfoForBase();
109 void RemovePendingEventsForSeat(
int8 seatId);
111 bool HasPendingEventForSeat(
int8 seatId)
const;
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
std::string GetDebugInfo()
std::set< ObjectGuid > GuidSet
std::optional< T > Optional
Optional helper class to wrap optional values within.
std::map< int8, VehicleSeat > SeatMap
virtual TransportBase * RemovePassenger(WorldObject *passenger)=0
Trinity::unique_trackable_ptr companion class, replicating what std::weak_ptr is to std::shared_ptr.
Vehicle(Vehicle &&right)=delete
float GetTransportOrientation() const override
Position GetPositionWithOffset(Position const &offset) const override
This method transforms supplied transport offsets into global coordinates.
VehicleEntry const * GetVehicleInfo() const
Position GetPositionOffsetTo(Position const &endPos) const override
This method transforms supplied global coordinates into local offsets.
uint32 GetCreatureEntry() const
uint32 UsableSeatNum
Number of seats that match VehicleSeatEntry::UsableByPlayer, used for proper display flags.
std::list< VehicleJoinEvent * > PendingJoinEventContainer
Vehicle & operator=(Vehicle const &right)=delete
uint32 _creatureEntry
Can be different than the entry of _me in case of players.
Status _status
Internal variable for sanity checks.
Vehicle(Vehicle const &right)=delete
Unit * _me
The underlying unit with the vehicle kit. Can be player or creature.
PendingJoinEventContainer _pendingJoinEvents
Collection of delayed join events for prospective passengers.
SeatMap Seats
The collection of all seats on the vehicle. Including vacant ones.
Vehicle & operator=(Vehicle &&right)=delete
ObjectGuid GetTransportGUID() const override
int32 GetMapIdForSpawning() const override
VehicleEntry const * _vehicleInfo
DBC data for vehicle.
void AddPassenger(WorldObject *, Position const &) override
Attempts to add a passenger to the vehicle on 'seatId'.
Position GetPositionWithOffset(Position const &offset) const
Position GetPositionOffsetTo(Position const &endPos) const