/*
 * Lords of the Realm 2 - DirectPlay join payloads
 *
 * Payloads for custom app opcodes 1 and 2 inside lotr2_net_msg.
 *
 * Provenance: docs/structs/lotr2_net_msg_join.md
 * Confidence: likely (pack/unpack handlers match byte-for-byte)
 */
#ifndef LOTR2_NET_MSG_JOIN_H
#define LOTR2_NET_MSG_JOIN_H

#include <stdint.h>

#pragma pack(push, 1)

typedef struct lotr2_net_join_request {
    uint32_t player_id;       /* +0x00 sender DirectPlay player id */
    char     player_name[32]; /* +0x04 short player name buffer */
    uint32_t join_flags;      /* +0x24 join capability / host flag field */
} lotr2_net_join_request;     /* size 0x28, opcode 1 */

typedef struct lotr2_net_join_reply {
    uint32_t host_player_id;  /* +0x00 host DirectPlay player id */
    char     host_name[32];   /* +0x04 host short name buffer */
    uint32_t local_slot;      /* +0x24 host local slot */
    uint32_t assigned_slot;   /* +0x28 slot assigned to joining peer */
    uint32_t session_state;   /* +0x2c session setup state field */
} lotr2_net_join_reply;       /* size 0x30, opcode 2 */

#pragma pack(pop)

#define LOTR2_NET_JOIN_NAME_LEN 32

#endif /* LOTR2_NET_MSG_JOIN_H */
