pb/msgId.proto
2025-06-19 21:57:32 +08:00

57 lines
1.9 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
/*
命名规则:
1. 所有消息id都在msgId.proto的MsgId中定义前缀需有Req,Rsp,Ntf三种之一后缀统一为Id
2. 所有错误码都在code.proto的ErrCode中定义
3. 所有消息名为对应消息id去掉后缀Id组成
*/
enum MsgId
{
MI_Unknown = 0;
NtfMaintainId = 1000; // 通知维护
NtfKickOutUserId = 1001; // 踢出玩家
ReqEnterRoomId = 1002; // 进入房间
RspEnterRoomId = 1003;
ReqLeaveRoomId = 1004; // 离开房间
RspLeaveRoomId = 1005;
NtfPayoutFailId = 1010; // 加减钱失败
// 聊天服 2000-2099
ReqChatId = 2000; // 玩家聊天消息
RspChatId = 2001; // 复用C2SChatMsg
// 登陆服 2100-2199
ReqUserLoginId = 2100; // 玩家登陆
RspUserLoginId = 2101;
NtfUserOnlineId = 2102;
NtfUserInServiceId = 2103; // 将玩家之前呆的服务同步给玩家,方便玩家重连进来
ReqUserLogoutId = 2104;
RspUserLogoutId = 2105;
NtfUserOfflineId = 2106;
// 匹配服 2200-2299
ReqMatchRoomId = 2200; // 匹配服
RspMatchRoomId = 2201;
NtfUserEnterRoomId = 2202; // 玩家进入房间 所有玩法共用此消息
// color game 2300-2399
NtfColorRoomInfoId = 2300; // 进房间推送房间所有信息
NtfColorGameStartId = 2305; // 游戏开始
NtfColorBettingId = 2310; // 通知可以下注
ReqColorBettingId = 2315; // 下注
RspColorBettingId = 2320;
NtfColorBetAreaInfoId = 2325; // 每秒更新投注区域信息
NtfColorEndBettingId = 2330; // 通知下注结束
NtfColorOpenThreeDiceId = 2335; // 开三个骰子
NtfColorSettleId = 2340; // 结算
NtfColorBigUserId = 2345; // 大客数据
NtfColorTrendId = 2350; // 路途数据
}