2024-06-28 17:43:55 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
package AxibugProtobuf;
|
|
|
|
option optimize_for = SPEED;
|
|
|
|
|
|
|
|
enum CommandID
|
|
|
|
{
|
|
|
|
CMD_DEFAUL = 0;//缺省不使用
|
|
|
|
|
|
|
|
CMD_LOGIN = 2001; //自动登录上行 | 下行 对应 Protobuf_Login | Protobuf_Login_RESP
|
|
|
|
|
2024-07-04 17:39:47 +08:00
|
|
|
CMD_CHATMSG = 4001; //广播聊天信息上行 | 下行 对应 Protobuf_ChatMsg | Protobuf_ChatMsg_RESP
|
2024-06-28 17:43:55 +08:00
|
|
|
|
2024-07-04 17:39:47 +08:00
|
|
|
//房间相关
|
|
|
|
CMD_Room_List = 5001; //房间列表 上行 | 下行 对应 Protobuf_Room_List | Protobuf_Room_List_RESP
|
|
|
|
|
|
|
|
CMD_Room_List_Update = 5002; //房间列表更新 对应 Protobuf_Room_Update_RESP
|
|
|
|
|
|
|
|
CMD_Room_Create = 5003; //房间列表创建 对应 Protobuf_Room_Create
|
|
|
|
|
|
|
|
CMD_Room_Leave = 5004; //房间列表离开 对应 Protobuf_Room_Leave
|
|
|
|
|
|
|
|
CMD_Room_Join = 5005; //房间列表加入 对应 Protobuf_Room_Join
|
|
|
|
|
|
|
|
//画面同步相关
|
|
|
|
CMD_Screen = 6001; //画面同步 | 同步广播 对应 Protobuf_Screnn_Frame
|
2024-06-28 17:43:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
enum ErrorCode
|
|
|
|
{
|
|
|
|
ERROR_DEFAUL = 0;//缺省不使用
|
|
|
|
ERROR_OK = 1; //成功
|
|
|
|
}
|
|
|
|
|
|
|
|
enum LoginType
|
|
|
|
{
|
|
|
|
BaseDefault = 0;//缺省不使用
|
|
|
|
}
|
|
|
|
|
|
|
|
enum DeviceType
|
|
|
|
{
|
|
|
|
DeviceType_Default = 0;//缺省不使用
|
|
|
|
PC = 1;
|
|
|
|
Android = 2;
|
|
|
|
IOS = 3;
|
|
|
|
PSV = 4;
|
|
|
|
}
|
|
|
|
|
2024-07-04 17:39:47 +08:00
|
|
|
enum RoomPlayerState
|
|
|
|
{
|
|
|
|
None = 0;//缺省
|
|
|
|
OnlyP1 = 1; //仅P1
|
|
|
|
OnlyP2 = 2; //仅P2
|
|
|
|
BothOnline = 3; //玩家都在
|
|
|
|
}
|
|
|
|
|
|
|
|
enum RoomGameState
|
|
|
|
{
|
|
|
|
None = 0;//缺省
|
|
|
|
InGame = 1;//游戏中
|
|
|
|
Pause = 2;//暂停
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-06-28 17:43:55 +08:00
|
|
|
enum LoginResultStatus
|
|
|
|
{
|
|
|
|
LoginResultStatus_BaseDefault = 0;//缺省不使用
|
|
|
|
OK = 1;
|
|
|
|
AccountErr = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
//聊天 上行
|
|
|
|
message Protobuf_ChatMsg
|
|
|
|
{
|
|
|
|
string ChatMsg = 1;//消息
|
|
|
|
}
|
|
|
|
|
|
|
|
//聊天 下行
|
|
|
|
message Protobuf_ChatMsg_RESP
|
|
|
|
{
|
|
|
|
string NickName = 1;//昵称
|
|
|
|
string ChatMsg = 2;//消息
|
|
|
|
int64 Date = 3;//时间
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//登录数据上行
|
|
|
|
message Protobuf_Login
|
|
|
|
{
|
|
|
|
LoginType loginType = 1;//登录操作类型 [0]皓月通行证 [3] 皓月BF3 [4] 皓月BF4
|
|
|
|
DeviceType deviceType = 2;//设备类型 [0]PC [1]AndroidPad预留 [3]IPad预留
|
|
|
|
string Account = 3;//用户名
|
|
|
|
string Password = 4;//密码
|
|
|
|
}
|
|
|
|
|
|
|
|
//登录数据下行
|
|
|
|
message Protobuf_Login_RESP
|
|
|
|
{
|
|
|
|
string Token = 1;//登录凭据 (本次登录之后,所有业务请求凭据,需要存储在内存中)
|
|
|
|
string LastLoginDate = 2;//上次登录时间(只用于呈现的字符串,若界面需求需要)
|
|
|
|
string RegDate = 3;//注册时间(只用于呈现的字符串,若界面需求需要)
|
|
|
|
LoginResultStatus Status = 4;//账号状态 (预留) [1]正常[0]被禁封
|
|
|
|
int64 UID = 5;
|
|
|
|
}
|
|
|
|
|
2024-07-04 17:39:47 +08:00
|
|
|
|
|
|
|
message Protobuf_Room_List
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
message Protobuf_Room_List_RESP
|
|
|
|
{
|
|
|
|
repeated Protobuf_Room_MiniInfo RoomMiniInfoList = 1;//房间列表
|
|
|
|
}
|
|
|
|
|
|
|
|
message Protobuf_Room_MiniInfo
|
|
|
|
{
|
|
|
|
int32 RoomID = 1;//房间ID
|
|
|
|
int32 GameID = 2;//游戏ID
|
|
|
|
RoomPlayerState PlayerState = 3;//玩家加入状态
|
|
|
|
RoomGameState GameState = 4;//游戏状态
|
|
|
|
int32 ObsUserCount = 5;//观战用户数量
|
|
|
|
int64 Player1_UID = 6;//玩家1 UID
|
|
|
|
string Player1_NickName = 7;//玩家1 昵称
|
|
|
|
int64 Player2_UID = 8;//玩家2 UID
|
|
|
|
string Player2_NickName = 9;//玩家2 昵称
|
|
|
|
}
|
|
|
|
|
|
|
|
message Protobuf_Room_Update_RESP
|
|
|
|
{
|
|
|
|
Protobuf_Room_MiniInfo RoomMiniInfo = 1;//房间信息
|
|
|
|
}
|
|
|
|
|
2024-06-28 17:43:55 +08:00
|
|
|
message Protobuf_Screnn_Frame
|
|
|
|
{
|
2024-07-04 17:39:47 +08:00
|
|
|
int32 RoomID = 1;//房间ID
|
|
|
|
int32 FrameID = 2;//帧编号
|
|
|
|
bytes RawBitmap = 3;//渲染层画面
|
2024-06-28 17:43:55 +08:00
|
|
|
}
|