/*
 * Lords of the Realm 2 - DirectPlay roster sync payload
 *
 * Payload for custom app opcode 3 inside lotr2_net_msg.
 *
 * Provenance: docs/structs/lotr2_net_msg_roster.md
 * Confidence: likely (pack/unpack handlers use identical byte order)
 */
#ifndef LOTR2_NET_MSG_ROSTER_H
#define LOTR2_NET_MSG_ROSTER_H

#include <stdint.h>

#pragma pack(push, 1)

typedef struct lotr2_net_msg_roster {
    uint32_t player_count;          /* +0x00 active player count */
    uint8_t  slot_flags_a[5];       /* +0x04 per-slot status bytes */
    uint8_t  slot_flags_b[5];       /* +0x09 per-slot status bytes */
    uint8_t  slot_ids[5];           /* +0x0e per-slot ids */
    uint32_t player_ids[5];         /* +0x13 DirectPlay ids / slot data */
    uint8_t  player_names[5][0x14]; /* +0x27 fixed 20-byte name blocks */
    uint8_t  slot_to_player[6];     /* +0x8b slot lookup bytes */
} lotr2_net_msg_roster;             /* size 0x91, opcode 3 */

#pragma pack(pop)

#define LOTR2_NET_ROSTER_PLAYER_SLOTS 5
#define LOTR2_NET_ROSTER_LOOKUP_BYTES 6
#define LOTR2_NET_ROSTER_NAME_LEN     0x14

#endif /* LOTR2_NET_MSG_ROSTER_H */
