Files
rebar_server/game_server/apps/game_proto/proto/login.proto
T
2026-05-19 11:30:21 +08:00

90 lines
3.6 KiB
Protocol Buffer

// 该文件由工具自动生成,不要手动修改该文件
package project;
// 登陆的机器信息
message p_machine_info {
required string device = 1; // 登录设备端 android ios web pc
optional string device_name = 2; // 设备名称 三星GT-S5830
optional string did = 3; // 设备id android-IMEI码 IOS-IDFA PC-MAC地址
optional string game_version = 4; // 游戏版本号 1.0.21.10
optional string os = 5; // 手机操作系统 android ios
optional string os_version = 6; // 手机操作系统版本号 2.3.4
optional string screen = 7; // 手机分辨率 480*800
optional string nm = 8; // 联网方式 3G WIFI
optional string mno = 9; // 移动网络运营商 中国移动 中国联通
optional string country = 10; // 国家
required int64 share_server_id = 11; // 分享者的服务器id
required int64 share_id = 12; // 分享者的玩家id
}
// 登陆校验:协议号:1_1(c2s)
message login_auth_c2s {
required string fn_game_id = 1; // 蜂鸟游戏id,前端传送
required string fn_platform = 2; // 蜂鸟平台id,登陆服http请求返回
required string fn_uid = 3; // 蜂鸟账号id,登陆服http请求返回
required string fn_name = 4; // 蜂鸟账号名,登陆服http请求返回
required string fn_ext = 5; // 蜂鸟账号名,登陆服http请求返回
required string token = 6; // 游戏内部token, 登陆服http请求返回
required int32 account_type = 7; // 游戏内部账号类型,登陆服http请求返回
required int32 server_time = 8; // 游戏内部时间戳,登陆服http请求返回
required int32 server_id = 9; // 选择登陆的服务器id
required string client_ip = 10; // 客户端ip
required p_machine_info machine_info = 11; // 设备信息,T后台要求的设备信息
optional string global_data = 12; // 全服通用数据
}
// 登陆校验:协议号:1_1(s2c)
message login_auth_s2c {
optional int64 role_id = 1; // 最近登录的角色,压测机器人用到的
optional string ban_reason = 2; // 封禁原因
optional int64 ban_endtime = 3; // 封禁结束时间
optional int32 is_choose_prof = 4; // 是否玩家自行选择职业 0-否 1-是
optional int32 prof = 5; // 玩家创角面板的随机职业
}
// 创建角色:协议号:1_2(c2s)
message login_create_role_c2s {
optional string name = 1; // 名字
required int32 sex = 2; // 性别 (1-男 2-女)
optional int32 model = 3; // 模型id
optional bool first_role = 4; // 是否账号在游戏的首个角色
optional int32 prof = 5; // 职业id
}
// 创建角色:协议号:1_2(s2c)
message login_create_role_s2c {
optional int64 role_id = 1; // 创角成功的角色id
optional string name = 2; // 名字
optional int32 sex = 3; // 性别 (1-男 2-女)
optional int32 prof = 4; // 职业id
}
// 登陆角色:协议号:1_3(c2s)
message login_login_role_c2s {
required int64 role_id = 1; //
}
// 登陆角色:协议号:1_3(s2c)
message login_login_role_s2c {
optional int64 role_id = 1; // 登陆成功的角色id
optional int64 server_time = 2; // 服务器时间
optional string ban_reason = 3; // 封禁原因
optional int64 ban_endtime = 4; // 封禁结束时间
}
// 掉线重连(需要服务端补发掉线期间协议):协议号:1_4(c2s)
message login_reconnect_c2s {
required int64 role_id = 1; // 角色id
required int32 client_mid = 2; // 客户端序列号
required int32 server_mid = 3; // 服务端序列号
required string token = 4; // 登陆校验时用的token
}
// 掉线重连(需要服务端补发掉线期间协议):协议号:1_4(s2c)
message login_reconnect_s2c {
optional int64 role_id = 1; // 重连成功的角色id
}