feat: Updated classes, added CPedInventory, ...

This commit is contained in:
Yimura 2022-08-26 00:37:00 +02:00
parent 00d8cc9fa5
commit 099204f8a6
9 changed files with 172 additions and 53 deletions

View File

@ -64,7 +64,7 @@ namespace rage
uint8_t m_tire_design; //0x03E2
char gap3E3[16]; //0x03E3
uint8_t m_truck_bed; //0x03F3
char gap3F4[2];
uint16_t m_modkit; //0x03F4
uint8_t byte3F6;
uint8_t byte3F7;
uint8_t byte3F8;

View File

@ -3,28 +3,33 @@
#include "../player/CPlayerInfo.hpp"
#include "../player/CNonPhysicalPlayerData.hpp"
#include "ClandData.hpp"
#include "netPlayer.hpp"
#include <cstdint>
#pragma pack(push, 1)
#pragma pack(push, 8)
class CNetGamePlayer : public rage::netPlayer
{
public:
char pad_0008[8]; //0x0008
class CNonPhysicalPlayerData *m_non_physical_player; //0x0010
uint32_t m_msg_id; //0x0018
char pad_001C[4]; //0x001C
uint8_t m_active_id; //0x0020
uint8_t m_player_id; //0x0021
char pad_0022[3]; //0x0022
uint16_t m_complaints; //0x0025
char pad_0027[17]; //0x0027
class CNetGamePlayer *m_unk_net_player_list[10]; //0x0038
char pad_0088[24]; //0x0088
class CPlayerInfo *m_player_info; //0x00A0
}; //Size: 0x00A8
static_assert(sizeof(CNetGamePlayer) == 0xA8);
char pad_00A0[8]; //0x00A0
uint32_t m_matchmaking_group; //0x00A8
CPlayerInfo* m_player_info; //0x00B0
char pad_00B0[16]; //0x00B0
class ClanData m_clan_data; //0x00C8
char m_crew_rank_title[25]; //0x0180
bool m_is_rockstar_dev; //0x0199
bool m_is_rockstar_qa; //0x019A
bool m_is_cheater; //0x019B
char pad_019C[14]; //0x019C
bool m_has_started_transition; //0x01AA
char pad_01AB[5]; //0x01AB
char m_transition_info_buffer[125]; //0x01B0
char pad_022D[19]; //0x022D
uint32_t m_mute_count; //0x0240
uint32_t m_mute_talkers_count; //0x0244
char pad_0248[112]; //0x0248
uint32_t unk_02B8; //0x02B8
}; //Size: 0x02C0
static_assert(sizeof(CNetGamePlayer) == 0x2C0);
#pragma pack(pop)

View File

@ -1,38 +1,34 @@
#pragma once
#include "netPlayerMgrBase.hpp"
#include "CNetGamePlayer.hpp"
#include "../player/CNonPhysicalPlayerData.hpp"
#include <cstdint>
namespace rage
{
class netPlayerMgrBase
{
public:
virtual ~netPlayerMgrBase() = default;
virtual void Initialize() = 0;
virtual void Shutdown() = 0;
virtual void unk_0x18() = 0;
virtual CNetGamePlayer* AddPlayer_raw(void* a1, void* a2, void* a3, rage::netPlayerData* net_player_data, CNonPhysicalPlayerData* non_physical_player_data) = 0;
virtual void RemovePlayer(CNetGamePlayer* net_game_player) = 0;
virtual void UpdatePlayerListsForPlayer(CNetGamePlayer* net_game_player) = 0;
virtual CNetGamePlayer* AddPlayer(void* a1, void* a2, void* a3, rage::netPlayerData* net_player_data, CNonPhysicalPlayerData* non_physical_player_data) = 0;
}; //Size: 0x0008
static_assert(sizeof(netPlayerMgrBase) == 0x8);
}
#pragma pack(push, 2)
class CNetworkPlayerMgr : public rage::netPlayerMgrBase
{
public:
char pad_0008[224]; //0x0008
class CNetGamePlayer* m_local_net_player; //0x00E8
char pad_00F0[144]; //0x00F0
class CNetGamePlayer* m_player_list[32]; //0x0180
uint16_t m_player_limit; //0x0280
char pad_0282[10]; //0x0282
uint16_t m_player_count; //0x028C
}; //Size: 0x028E
static_assert(sizeof(CNetworkPlayerMgr) == 0x28E);
CNetGamePlayer m_net_players[32]; //0x08E0
uint64_t unk_60E0; //0x60E0
uint64_t unk_60E8; //0x60E8
uint64_t unk_60F0; //0x60F0
uint64_t unk_60F8; //0x60F8
CNetGamePlayer m_net_players_2[32]; //0x6100
uint64_t unk_B900; //0xB900
uint64_t unk_B908; //0xB908
uint64_t unk_B910; //0xB910
uint64_t unk_B918; //0xB918
uint64_t unk_B920; //0xB920
uint64_t unk_B928; //0xB928
uint64_t unk_B930; //0xB930
uint32_t unk_B938; //0xB938
char pad_B93C[3]; //0xB93C
bool unk_B93F; //0xB93F
uint32_t unk_B940; //0xB940
uint32_t unk_B944; //0xB944
uint16_t unk_B948; //0xB948
}; //Size: 0xB94A
static_assert(sizeof(CNetworkPlayerMgr) == 0xB94A);
#pragma pack(pop)

27
network/ClandData.hpp Normal file
View File

@ -0,0 +1,27 @@
#pragma once
#include <cstdint>
#pragma pack(push, 1)
class ClanData
{
public:
int64_t m_clan_member_id; //0x0000
int64_t m_clan_id; //0x0008
int32_t m_clan_color; //0x0010
int32_t m_clan_member_count; //0x0014
int32_t m_clan_created_time; //0x0018
bool m_is_system_clan; //0x001C
bool m_is_clan_open; //0x001D
char m_clan_name[25]; //0x001E
char m_clan_tag[5]; //0x0037
char m_clan_motto[65]; //0x003C
char pad_007D[3]; //0x007D
int64_t m_clan_id_2; //0x0080
char m_clan_rank_name[25]; //0x0088
char pad_00A1[3]; //0x00A1
int32_t m_clan_rank_order; //0x00A4
int64_t m_clan_rank_flags; //0x00A8
char unk_00B0[8]; //0x00B0
};
#pragma pack(pop)

View File

@ -1,9 +1,11 @@
#pragma once
#include "netPlayerData.hpp"
#include "../player/CNonPhysicalPlayerData.hpp"
namespace rage
{
#pragma pack(push, 8)
class netPlayer
{
public:
@ -15,6 +17,20 @@ namespace rage
virtual bool is_host();
virtual netPlayerData* get_net_data();
virtual void _0x38();
}; //Size: 0x0008
static_assert(sizeof(netPlayer) == 0x8);
char pad_0008[8]; //0x0008
CNonPhysicalPlayerData *m_non_physical_player; //0x0010
uint32_t m_msg_id; //0x0018
char pad_001C[4]; //0x001C
uint8_t m_active_id; //0x0020
uint8_t m_player_id; //0x0021
char pad_0022[3]; //0x0022
uint16_t m_complaints; //0x0026
char pad_0027[17]; //0x0028
class CNetGamePlayer *m_unk_net_player_list[10]; //0x0040
char pad_0090[4]; //0x0090
uint64_t pad_0098; //0x0098
}; //Size: 0x00A0
static_assert(sizeof(netPlayer) == 0xA0);
#pragma pack(pop)
}

View File

@ -0,0 +1,36 @@
#pragma once
#include "CNetGamePlayer.hpp"
#include "../player/CNonPhysicalPlayerData.hpp"
#include <cstdint>
namespace rage
{
#pragma pack(push, 8)
class netPlayerMgrBase
{
public:
virtual ~netPlayerMgrBase() = default;
virtual void Initialize() = 0;
virtual void Shutdown() = 0;
virtual void unk_0x18() = 0;
virtual CNetGamePlayer* AddPlayer_raw(void* a1, void* a2, void* a3, rage::netPlayerData* net_player_data, CNonPhysicalPlayerData* non_physical_player_data) = 0;
virtual void RemovePlayer(CNetGamePlayer* net_game_player) = 0;
virtual void UpdatePlayerListsForPlayer(CNetGamePlayer* net_game_player) = 0;
virtual CNetGamePlayer* AddPlayer(void* a1, void* a2, void* a3, rage::netPlayerData* net_player_data, CNonPhysicalPlayerData* non_physical_player_data) = 0;
char pad_0008[8]; //0x0008
uint64_t *m_network_bandwidth_manager; //0x0010
char pad_0018[208]; //0x0018
CNetGamePlayer *m_local_net_player; //0x00E8
char pad_00F0[144]; //0x00F0
CNetGamePlayer *m_player_list[32]; //0x0180
uint16_t m_player_limit; //0x0280
char pad_0282[10]; //0x0282
uint16_t m_player_count; //0x028C
char pad_0290[1618]; //0x0290
}; //Size: 0x08E0
static_assert(sizeof(netPlayerMgrBase) == 0x8E0);
#pragma pack(pop)
}

View File

@ -5,7 +5,7 @@
#include "../player/CPlayerInfo.hpp"
#include "CPedModelInfo.hpp"
#include "CPedWeaponManager.hpp"
#include "CPedInventory.hpp"
#include "../entities/fwEntity.hpp"
#include "../rage/vector.hpp"
@ -22,7 +22,7 @@ public:
class CVehicle *m_vehicle; //0x0D30
char pad_0D38[912]; //0x0D38
class CPlayerInfo *m_player_info; //0x10C8
char pad_10D0[8]; //0x10D0
class CPedInventory* m_inventory; //0x10D0
class CPedWeaponManager *m_weapon_manager; //0x10D8
char pad_10E0[907]; //0x10E0
uint8_t m_ped_task_flag; //0x146B

39
ped/CPedInventory.hpp Normal file
View File

@ -0,0 +1,39 @@
#pragma once
#include <cstdint>
class CPed;
#pragma pack(push, 8)
class CPedInventory
{
public:
virtual ~CPedInventory();
virtual void _0x0008();
virtual void _0x0010();
virtual void _0x0018();
uint64_t unk_0008;
CPed* m_ped;
uint64_t unk_0018;
uint32_t unk_0020;
uint64_t unk_0028;
uint64_t unk_0030;
uint32_t unk_0038;
char pad_003C[4];
char unk_0040;
char pad_0041[7];
uint64_t unk_0048;
uint32_t unk_0050;
uint64_t unk_0058;
uint64_t unk_0060;
uint32_t unk_0068;
char pad_006C[4];
char unk_0070;
char pad_0071[7];
char unk_0078;
char pad_0079[7];
uint64_t unk_0080;
};
static_assert(sizeof(CPedInventory) == 0x88);
#pragma pack(pop)

View File

@ -7,9 +7,9 @@
enum class eVehicleType : std::uint32_t
{
Unknown = 4294967295,
Car = 0,
Plane = 1,
Trailer = 2,
Car = 0,
Plane = 1,
Trailer = 2,
Quadbike = 3,
Draft = 4, //Unused
SubmarineCar = 5,
@ -29,7 +29,7 @@ enum class eVehicleType : std::uint32_t
class CVehicleModelInfo : public CBaseModelInfo
{
public:
char pad_00B0[72]; //0x00B0
char pad_00A4[72]; //0x00A4
uint8_t m_primary_color_combinations[25]; //0x00F8
uint8_t m_secondary_color_combinations[25]; //0x0111
uint8_t m_unk_color_combos1[25]; //0x012A
@ -39,7 +39,7 @@ public:
char pad_018E[266]; //0x018E
char m_name[12]; //0x0298
char m_manufacturer[12]; //0x02A4
char pad_02B0[8]; //0x02B0
uint16_t* m_modkits; //0x02B0
uint16_t m_modkits_count; //0x02B8
char pad_02BA[30]; //0x02BA
uint8_t m_passenger_capacity; //0x02D8