fix 6x70 for all cross-version cases
This commit is contained in:
+134
-46
@@ -4673,19 +4673,37 @@ struct G_SetQuestFlags_6x6F {
|
||||
// 6x70: Sync player disp data and inventory (used while loading into game)
|
||||
// Annoyingly, they didn't use the same format as the 65/67/68 commands here,
|
||||
// and instead rearranged a bunch of things.
|
||||
// The format appears to be the same for all pre-BB PSO versions except DC NTE,
|
||||
// although Episode 3 does not send this command at all since the relevant data
|
||||
// is sent to the joining player in the 64 command instead.
|
||||
// Episode 3 does not send this command, since the relevant data is sent to the
|
||||
// joining player in the 64 command instead.
|
||||
|
||||
// TODO: Document DC NTE format, and check if DC 11/2000 format is the same.
|
||||
struct Telepipe {
|
||||
/* 00 */ le_uint16_t client_id;
|
||||
/* 02 */ le_uint16_t unknown_a1;
|
||||
/* 04 */ le_uint32_t unknown_a2;
|
||||
/* 08 */ le_float x;
|
||||
/* 0C */ le_float y;
|
||||
/* 10 */ le_float z;
|
||||
/* 14 */ le_uint32_t unknown_a3;
|
||||
/* 18 */ parray<uint8_t, 4> unknown_a4;
|
||||
/* 1C */
|
||||
} __packed__;
|
||||
|
||||
struct G_SyncPlayerDispAndInventory_DC_PC_GC_6x70 {
|
||||
struct G_Unknown_6x70_Sub {
|
||||
// This is used in all versions of this command except DCNTE and 11/2000.
|
||||
/* 00 */ le_uint16_t unknown_a1;
|
||||
/* 02 */ le_uint16_t unknown_a2;
|
||||
/* 04 */ le_uint32_t unknown_a3;
|
||||
/* 08 */ le_uint32_t unknown_a4;
|
||||
/* 0C */ le_uint32_t unknown_a5;
|
||||
/* 10 */ le_uint32_t unknown_a6;
|
||||
/* 14 */
|
||||
} __packed__;
|
||||
|
||||
struct G_SyncPlayerDispAndInventory_DCNTE_6x70 {
|
||||
// Offsets in this struct are relative to the overall command header
|
||||
/* 0004 */ G_ExtendedHeader<G_UnusedHeader> header;
|
||||
/* 0004 */ G_ExtendedHeader<G_UnusedHeader> header = {{0x70, 0x00, 0x0000}, sizeof(G_SyncPlayerDispAndInventory_DCNTE_6x70)};
|
||||
/* 000C */ le_uint16_t client_id = 0;
|
||||
/* 000E */ le_uint16_t unknown_a1 = 0;
|
||||
// [1] and [3] in this array (and maybe [2] also) appear to be le_floats;
|
||||
// they could be the player's current (x, y, z) coords
|
||||
/* 0010 */ le_uint32_t flags1;
|
||||
/* 0014 */ le_float x;
|
||||
/* 0018 */ le_float y;
|
||||
@@ -4695,56 +4713,126 @@ struct G_SyncPlayerDispAndInventory_DC_PC_GC_6x70 {
|
||||
/* 0028 */ le_uint32_t angle_z;
|
||||
/* 002C */ le_uint16_t unknown_a3a;
|
||||
/* 002E */ le_uint16_t current_hp;
|
||||
/* 0030 */ le_uint16_t bonus_hp_from_materials; // Missing on DC NTE
|
||||
/* 0032 */ le_uint16_t bonus_tp_from_materials; // Missing on DC NTE
|
||||
/* 0034 */ parray<parray<le_uint32_t, 3>, 5> unknown_a4;
|
||||
/* 0070 */ le_uint32_t language = 0;
|
||||
/* 0074 */ le_uint32_t player_tag = 0;
|
||||
/* 0078 */ le_uint32_t guild_card_number = 0;
|
||||
/* 007C */ le_uint32_t unknown_a6;
|
||||
/* 0080 */ le_uint32_t battle_team_number;
|
||||
/* 0084 */ struct {
|
||||
/* 0084 */ le_uint16_t client_id;
|
||||
/* 0086 */ le_uint16_t unknown_a1;
|
||||
/* 0088 */ le_uint32_t unknown_a2;
|
||||
/* 008C */ le_float x;
|
||||
/* 0090 */ le_float y;
|
||||
/* 0094 */ le_float z;
|
||||
/* 0098 */ le_uint32_t unknown_a3;
|
||||
/* 009C */ parray<uint8_t, 4> unknown_a4;
|
||||
} __packed__ telepipe;
|
||||
/* 00A0 */ le_uint32_t unknown_a8 = 0;
|
||||
/* 00A4 */ struct {
|
||||
/* 00A4 */ le_uint16_t unknown_a1;
|
||||
/* 00A6 */ le_uint16_t unknown_a2;
|
||||
/* 00A8 */ le_uint32_t unknown_a3;
|
||||
/* 00AC */ le_uint32_t unknown_a4;
|
||||
/* 00B0 */ le_uint32_t unknown_a5;
|
||||
/* 00B4 */ le_uint32_t unknown_a6;
|
||||
} __packed__ unknown_a9;
|
||||
/* 00B8 */ le_uint32_t area = 0;
|
||||
/* 00BC */ le_uint32_t flags2 = 0;
|
||||
/* 00C0 */ parray<uint8_t, 0x14> technique_levels_v1; // Last byte is uninitialized
|
||||
/* 00D4 */ PlayerVisualConfig visual;
|
||||
/* 0030 */ le_uint32_t unknown_a5;
|
||||
/* 0034 */ le_uint32_t unknown_a6;
|
||||
/* 0038 */ Telepipe telepipe;
|
||||
/* 0054 */ parray<uint8_t, 0x18> unknown_a7;
|
||||
/* 006C */ le_uint32_t flags2 = 0;
|
||||
/* 0070 */ PlayerVisualConfig visual;
|
||||
/* 00C0 */ PlayerStats stats;
|
||||
/* 00E4 */ le_uint32_t num_items = 0;
|
||||
/* 00E8 */ parray<PlayerInventoryItem, 0x1E> items;
|
||||
/* 0430 */
|
||||
} __packed__;
|
||||
|
||||
struct G_SyncPlayerDispAndInventory_DC112000_6x70 {
|
||||
// Offsets in this struct are relative to the overall command header
|
||||
/* 0004 */ G_ExtendedHeader<G_UnusedHeader> header = {{0x70, 0x00, 0x0000}, sizeof(G_SyncPlayerDispAndInventory_DC112000_6x70)};
|
||||
/* 000C */ le_uint16_t client_id = 0;
|
||||
/* 000E */ le_uint16_t unknown_a1 = 0;
|
||||
/* 0010 */ le_uint32_t flags1;
|
||||
/* 0014 */ le_float x;
|
||||
/* 0018 */ le_float y;
|
||||
/* 001C */ le_float z;
|
||||
/* 0020 */ le_uint32_t angle_x;
|
||||
/* 0024 */ le_uint32_t angle_y;
|
||||
/* 0028 */ le_uint32_t angle_z;
|
||||
/* 002C */ le_uint16_t unknown_a3a;
|
||||
/* 002E */ le_uint16_t current_hp;
|
||||
/* 0030 */ le_uint16_t bonus_hp_from_materials;
|
||||
/* 0032 */ le_uint16_t bonus_tp_from_materials;
|
||||
/* 0034 */ parray<uint8_t, 0x10> unknown_a5;
|
||||
/* 0044 */ Telepipe telepipe;
|
||||
/* 0060 */ parray<uint8_t, 0x18> unknown_a6;
|
||||
/* 0078 */ le_uint32_t flags2 = 0;
|
||||
/* 007C */ PlayerVisualConfig visual;
|
||||
/* 00CC */ PlayerStats stats;
|
||||
/* 00F0 */ le_uint32_t num_items = 0;
|
||||
/* 00F4 */ parray<PlayerInventoryItem, 0x1E> items;
|
||||
/* 043C */
|
||||
} __packed__;
|
||||
|
||||
struct G_SyncPlayerDispAndInventory_Base {
|
||||
/* 0000 */ le_uint16_t client_id = 0;
|
||||
/* 0002 */ le_uint16_t unknown_a1 = 0;
|
||||
/* 0004 */ le_uint32_t flags1;
|
||||
/* 0008 */ le_float x;
|
||||
/* 000C */ le_float y;
|
||||
/* 0010 */ le_float z;
|
||||
/* 0014 */ le_uint32_t angle_x;
|
||||
/* 0018 */ le_uint32_t angle_y;
|
||||
/* 001C */ le_uint32_t angle_z;
|
||||
/* 0020 */ le_uint16_t unknown_a3a;
|
||||
/* 0022 */ le_uint16_t current_hp;
|
||||
/* 0024 */ le_uint16_t bonus_hp_from_materials;
|
||||
/* 0026 */ le_uint16_t bonus_tp_from_materials;
|
||||
/* 0028 */ parray<parray<le_uint32_t, 3>, 5> unknown_a4;
|
||||
/* 0064 */ le_uint32_t language = 0;
|
||||
/* 0068 */ le_uint32_t player_tag = 0;
|
||||
/* 006C */ le_uint32_t guild_card_number = 0;
|
||||
/* 0070 */ le_uint32_t unknown_a6;
|
||||
/* 0074 */ le_uint32_t battle_team_number;
|
||||
/* 0078 */ Telepipe telepipe;
|
||||
/* 0094 */ le_uint32_t unknown_a8 = 0;
|
||||
/* 0098 */ G_Unknown_6x70_Sub unknown_a9;
|
||||
/* 00AC */ le_uint32_t area = 0;
|
||||
/* 00B0 */ le_uint32_t flags2 = 0;
|
||||
/* 00B4 */ parray<uint8_t, 0x14> technique_levels_v1; // Last byte is uninitialized
|
||||
/* 00C8 */ PlayerVisualConfig visual;
|
||||
/* 0118 */
|
||||
} __packed__;
|
||||
|
||||
struct G_SyncPlayerDispAndInventory_DC_PC_6x70 {
|
||||
// Offsets in this struct are relative to the overall command header
|
||||
/* 0004 */ G_ExtendedHeader<G_UnusedHeader> header = {{0x70, 0x00, 0x0000}, sizeof(G_SyncPlayerDispAndInventory_DC_PC_6x70)};
|
||||
/* 000C */ G_SyncPlayerDispAndInventory_Base base;
|
||||
/* 0124 */ PlayerStats stats;
|
||||
/* 0148 */ struct {
|
||||
le_uint32_t num_items = 0;
|
||||
// Entries >= num_items in this array contain uninitialized data (usually
|
||||
// the contents of a previous sync command)
|
||||
parray<PlayerInventoryItem, 0x1E> items;
|
||||
} __packed__ inventory;
|
||||
/* 0148 */ le_uint32_t num_items = 0;
|
||||
/* 014C */ parray<PlayerInventoryItem, 0x1E> items;
|
||||
/* 0494 */
|
||||
} __packed__;
|
||||
|
||||
// GC NTE also uses this format.
|
||||
struct G_SyncPlayerDispAndInventory_GC_6x70 {
|
||||
// Offsets in this struct are relative to the overall command header
|
||||
/* 0004 */ G_ExtendedHeader<G_UnusedHeader> header = {{0x70, 0x00, 0x0000}, sizeof(G_SyncPlayerDispAndInventory_GC_6x70)};
|
||||
/* 000C */ G_SyncPlayerDispAndInventory_Base base;
|
||||
/* 0124 */ PlayerStats stats;
|
||||
/* 0148 */ le_uint32_t num_items = 0;
|
||||
/* 014C */ parray<PlayerInventoryItem, 0x1E> items;
|
||||
/* 0494 */ le_uint32_t floor = 0;
|
||||
/* 0498 */
|
||||
} __packed__;
|
||||
|
||||
struct G_SyncPlayerDispAndInventory_XB_6x70 : G_SyncPlayerDispAndInventory_DC_PC_GC_6x70 {
|
||||
struct G_SyncPlayerDispAndInventory_XB_6x70 {
|
||||
// Offsets in this struct are relative to the overall command header
|
||||
/* 0004 */ G_ExtendedHeader<G_UnusedHeader> header = {{0x70, 0x00, 0x0000}, sizeof(G_SyncPlayerDispAndInventory_XB_6x70)};
|
||||
/* 000C */ G_SyncPlayerDispAndInventory_Base base;
|
||||
/* 0124 */ PlayerStats stats;
|
||||
/* 0148 */ le_uint32_t num_items = 0;
|
||||
/* 014C */ parray<PlayerInventoryItem, 0x1E> items;
|
||||
/* 0494 */ le_uint32_t floor = 0;
|
||||
/* 0498 */ le_uint32_t xb_user_id_high = 0;
|
||||
/* 049C */ le_uint32_t xb_user_id_low = 0;
|
||||
/* 04A0 */ le_uint32_t unknown_a16 = 0;
|
||||
/* 04A4 */
|
||||
} __packed__;
|
||||
|
||||
struct G_SyncPlayerDispAndInventory_BB_6x70 {
|
||||
// Offsets in this struct are relative to the overall command header
|
||||
/* 0008 */ G_ExtendedHeader<G_UnusedHeader> header = {{0x70, 0x00, 0x0000}, sizeof(G_SyncPlayerDispAndInventory_BB_6x70)};
|
||||
/* 0010 */ G_SyncPlayerDispAndInventory_Base base;
|
||||
/* 0128 */ pstring<TextEncoding::UTF16, 0x10> name;
|
||||
/* 0148 */ PlayerStats stats;
|
||||
/* 016C */ le_uint32_t num_items = 0;
|
||||
/* 0170 */ parray<PlayerInventoryItem, 0x1E> items;
|
||||
/* 04B8 */ le_uint32_t floor = 0;
|
||||
/* 04BC */ le_uint32_t xb_user_id_high = 0;
|
||||
/* 04C0 */ le_uint32_t xb_user_id_low = 0;
|
||||
/* 04C4 */ le_uint32_t unknown_a16 = 0;
|
||||
/* 04C8 */
|
||||
} __packed__;
|
||||
|
||||
// 6x71: Unknown (used while loading into game)
|
||||
|
||||
struct G_Unknown_6x71 {
|
||||
|
||||
+329
-149
File diff suppressed because it is too large
Load Diff
@@ -7,10 +7,5 @@
|
||||
#include "PSOProtocol.hh"
|
||||
#include "ServerState.hh"
|
||||
|
||||
void on_subcommand_multi(
|
||||
std::shared_ptr<Client> c,
|
||||
uint8_t command,
|
||||
uint8_t flag,
|
||||
const std::string& data);
|
||||
|
||||
void on_subcommand_multi(std::shared_ptr<Client> c, uint8_t command, uint8_t flag, std::string& data);
|
||||
bool subcommand_is_implemented(uint8_t which);
|
||||
|
||||
Reference in New Issue
Block a user