refactor(PlayerService): Split classes into multiple files (#310)
This commit is contained in:
45
BigBaseV2/src/services/players/player.hpp
Normal file
45
BigBaseV2/src/services/players/player.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
#include "player_service.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class player final
|
||||
{
|
||||
friend class player_service;
|
||||
|
||||
CNetGamePlayer* m_net_game_player = nullptr;
|
||||
std::string m_identifier;
|
||||
bool m_is_friend;
|
||||
|
||||
public:
|
||||
explicit player(CNetGamePlayer* net_game_player);
|
||||
~player() = default;
|
||||
|
||||
player(const player&) = default;
|
||||
player(player&&) noexcept = default;
|
||||
player& operator=(const player&) = default;
|
||||
player& operator=(player&&) noexcept = default;
|
||||
|
||||
float screen_position_x = -1.f;
|
||||
float screen_position_y = -1.f;
|
||||
|
||||
[[nodiscard]] CAutomobile* get_current_vehicle() const;
|
||||
[[nodiscard]] const char* get_name() const;
|
||||
[[nodiscard]] rage::netPlayerData* get_net_data() const;
|
||||
[[nodiscard]] CNetGamePlayer* get_net_game_player() const;
|
||||
[[nodiscard]] CPed* get_ped() const;
|
||||
[[nodiscard]] CPlayerInfo* get_player_info() const;
|
||||
|
||||
[[nodiscard]] uint8_t id() const;
|
||||
|
||||
[[nodiscard]] bool is_friend() const;
|
||||
[[nodiscard]] bool is_host() const;
|
||||
[[nodiscard]] bool is_valid() const;
|
||||
|
||||
protected:
|
||||
bool equals(const CNetGamePlayer* net_game_player) const;
|
||||
|
||||
[[nodiscard]] std::string to_lowercase_identifier() const;
|
||||
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user