mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 18:13:48 +00:00
refactor(Core/Game): restyle game lib with astyle (#3466)
This commit is contained in:
@@ -17,74 +17,74 @@ class Unit;
|
||||
|
||||
class Vehicle : public TransportBase
|
||||
{
|
||||
public:
|
||||
void Install();
|
||||
void Uninstall();
|
||||
void Reset(bool evading = false);
|
||||
void InstallAllAccessories(bool evading);
|
||||
void ApplyAllImmunities();
|
||||
void InstallAccessory(uint32 entry, int8 seatId, bool minion, uint8 type, uint32 summonTime); //! May be called from scripts
|
||||
public:
|
||||
void Install();
|
||||
void Uninstall();
|
||||
void Reset(bool evading = false);
|
||||
void InstallAllAccessories(bool evading);
|
||||
void ApplyAllImmunities();
|
||||
void InstallAccessory(uint32 entry, int8 seatId, bool minion, uint8 type, uint32 summonTime); //! May be called from scripts
|
||||
|
||||
Unit* GetBase() const { return _me; }
|
||||
VehicleEntry const* GetVehicleInfo() const { return _vehicleInfo; }
|
||||
uint32 GetCreatureEntry() const { return _creatureEntry; }
|
||||
Unit* GetBase() const { return _me; }
|
||||
VehicleEntry const* GetVehicleInfo() const { return _vehicleInfo; }
|
||||
uint32 GetCreatureEntry() const { return _creatureEntry; }
|
||||
|
||||
bool HasEmptySeat(int8 seatId) const;
|
||||
Unit* GetPassenger(int8 seatId) const;
|
||||
int8 GetNextEmptySeat(int8 seatId, bool next) const;
|
||||
uint8 GetAvailableSeatCount() const;
|
||||
bool HasEmptySeat(int8 seatId) const;
|
||||
Unit* GetPassenger(int8 seatId) const;
|
||||
int8 GetNextEmptySeat(int8 seatId, bool next) const;
|
||||
uint8 GetAvailableSeatCount() const;
|
||||
|
||||
bool AddPassenger(Unit* passenger, int8 seatId = -1);
|
||||
void EjectPassenger(Unit* passenger, Unit* controller);
|
||||
void RemovePassenger(Unit* passenger);
|
||||
void RelocatePassengers();
|
||||
void RemoveAllPassengers();
|
||||
void Dismiss();
|
||||
bool IsVehicleInUse();
|
||||
void TeleportVehicle(float x, float y, float z, float ang);
|
||||
bool AddPassenger(Unit* passenger, int8 seatId = -1);
|
||||
void EjectPassenger(Unit* passenger, Unit* controller);
|
||||
void RemovePassenger(Unit* passenger);
|
||||
void RelocatePassengers();
|
||||
void RemoveAllPassengers();
|
||||
void Dismiss();
|
||||
bool IsVehicleInUse();
|
||||
void TeleportVehicle(float x, float y, float z, float ang);
|
||||
|
||||
SeatMap Seats;
|
||||
SeatMap Seats;
|
||||
|
||||
VehicleSeatEntry const* GetSeatForPassenger(Unit const* passenger);
|
||||
SeatMap::iterator GetSeatIteratorForPassenger(Unit* passenger);
|
||||
VehicleSeatEntry const* GetSeatForPassenger(Unit const* passenger);
|
||||
SeatMap::iterator GetSeatIteratorForPassenger(Unit* passenger);
|
||||
|
||||
protected:
|
||||
friend bool Unit::CreateVehicleKit(uint32 id, uint32 creatureEntry);
|
||||
Vehicle(Unit* unit, VehicleEntry const* vehInfo, uint32 creatureEntry);
|
||||
friend void Unit::RemoveVehicleKit();
|
||||
~Vehicle();
|
||||
protected:
|
||||
friend bool Unit::CreateVehicleKit(uint32 id, uint32 creatureEntry);
|
||||
Vehicle(Unit* unit, VehicleEntry const* vehInfo, uint32 creatureEntry);
|
||||
friend void Unit::RemoveVehicleKit();
|
||||
~Vehicle();
|
||||
|
||||
private:
|
||||
enum Status
|
||||
{
|
||||
STATUS_NONE,
|
||||
STATUS_INSTALLED,
|
||||
STATUS_UNINSTALLING,
|
||||
};
|
||||
private:
|
||||
enum Status
|
||||
{
|
||||
STATUS_NONE,
|
||||
STATUS_INSTALLED,
|
||||
STATUS_UNINSTALLING,
|
||||
};
|
||||
|
||||
void InitMovementInfoForBase();
|
||||
void InitMovementInfoForBase();
|
||||
|
||||
/// This method transforms supplied transport offsets into global coordinates
|
||||
void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const
|
||||
{
|
||||
TransportBase::CalculatePassengerPosition(x, y, z, o,
|
||||
/// This method transforms supplied transport offsets into global coordinates
|
||||
void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const
|
||||
{
|
||||
TransportBase::CalculatePassengerPosition(x, y, z, o,
|
||||
GetBase()->GetPositionX(), GetBase()->GetPositionY(),
|
||||
GetBase()->GetPositionZ(), GetBase()->GetOrientation());
|
||||
}
|
||||
}
|
||||
|
||||
/// This method transforms supplied global coordinates into local offsets
|
||||
void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const
|
||||
{
|
||||
TransportBase::CalculatePassengerOffset(x, y, z, o,
|
||||
GetBase()->GetPositionX(), GetBase()->GetPositionY(),
|
||||
GetBase()->GetPositionZ(), GetBase()->GetOrientation());
|
||||
}
|
||||
/// This method transforms supplied global coordinates into local offsets
|
||||
void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const
|
||||
{
|
||||
TransportBase::CalculatePassengerOffset(x, y, z, o,
|
||||
GetBase()->GetPositionX(), GetBase()->GetPositionY(),
|
||||
GetBase()->GetPositionZ(), GetBase()->GetOrientation());
|
||||
}
|
||||
|
||||
Unit* _me;
|
||||
VehicleEntry const* _vehicleInfo;
|
||||
uint32 _usableSeatNum; // Number of seats that match VehicleSeatEntry::UsableByPlayer, used for proper display flags
|
||||
uint32 _creatureEntry; // Can be different than me->GetBase()->GetEntry() in case of players
|
||||
Status _status;
|
||||
Unit* _me;
|
||||
VehicleEntry const* _vehicleInfo;
|
||||
uint32 _usableSeatNum; // Number of seats that match VehicleSeatEntry::UsableByPlayer, used for proper display flags
|
||||
uint32 _creatureEntry; // Can be different than me->GetBase()->GetEntry() in case of players
|
||||
Status _status;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user