game_sync/protocol/islandsurvival/islandsurvival.proto

95 lines
3.5 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 islandsurvival;
option go_package = "mongo.games.com/game/protocol/islandsurvival";
//操作结果
enum OpResultCode {
OPRC_Sucess = 0; //成功
OPRC_Error = 1; //失败
}
//绝地求生 4800-4899
enum IslandSurvivalPacketID {
PACKET_IslandSurvival_ZERO = 0; // 弃用消息号
PACKET_SC_ISLANDSURVIVAL_ROOMINFO = 4800; //房间信息
PACKET_CS_ISLANDSURVIVAL_PLAYEROP = 4801; //玩家操作(客户-》服务)
PACKET_SC_ISLANDSURVIVAL_PLAYEROP = 4802; //玩家操作(服务-》客户)
PACKET_SC_ISLANDSURVIVAL_GAMEBILLED = 4803; //游戏结算
}
message IslandSurvivalPlayerData {
string Name = 1; //名字
int32 SnId = 2; //账号
int32 Head = 3; //头像
int32 Sex = 4; //性别
int64 Coin = 5; //金币
int32 Pos = 6; //座位位置
int32 Flag = 7; //二进制标记
repeated string Params = 8; //其他数据 如:ip 等
string City = 9; //城市
int32 HeadOutLine = 10; //头像框
int32 VIP = 11;
int32 LeftEnemy = 12;//剩余敌人
int32 Killed = 13;//击杀敌人
bool IsGaming = 14; //是否开始游戏
int32 Step = 15;//当前处于的阶段 0准备阶段 1开始阶段 2小游戏阶段
int32 Deadline = 16;//阶段截止时间戳 (只在小游戏阶段有用)
}
//房间信息
message SCIslandSurvivalRoomInfo {
int32 RoomId = 1; //房间id
int32 Creator = 2; //创建者SnId
int32 GameId = 3; //游戏id
int32 RoomMode = 4; //游戏模式
repeated int32 Params = 5; //规则参数
int32 NumOfGames = 6; //当前第几局
repeated int32 Cards = 7; //牌数据 (没开牌之前是两个-1)
int32 State = 8; //房间当前状态
int32 TimeOut = 9; //等待剩余时间 单位:毫秒
int32 DisbandGen = 10; //解散申请
int32 AgentId = 11; //代开房者
repeated int32 ParamsEx = 12; //其他参数
int32 SceneType = 13; //房间模式 1:初级模式 3:高级模式
repeated IslandSurvivalPlayerData Players = 14; //房间内的玩家信息
int32 ChipData = 15; //当前选择的筹码
int32 FreeTimes = 16; //免费转动次数
repeated int32 OtherParams = 17; //其它参数
int64 FreeWinCoin = 18; //免费转动获得金币
int32 GameFreeId = 19;
}
//玩家操作
//IslandSurvivalPlayerOpStart 0 游戏
//IslandSurvivalPlayerOpSmallGame 1 选择吃鸡
message CSIslandSurvivalOp {
int32 OpCode = 1; //操作码
repeated int64 Params = 2; //操作参数
}
//玩家操作返回
message SCIslandSurvivalOp {
int32 SnId = 1; //玩家ID
int32 OpCode = 2; //操作码
repeated int64 Params = 3; //操作参数
OpResultCode OpRetCode = 4; //操作结果
}
//每条线的结算数据
message IslandSurvivalLinesInfo {
repeated int32 Pos = 1; //中奖位置 索引从0开始
int32 WinScore = 2; //中奖分数
int32 WinItem = 3; //中奖的元素
}
//发送给客户端的数据
message SCIslandSurvivalGameBilled {
repeated int32 Cards = 1; //需要翻出的牌数组15个
int64 AllWinScore = 2; //中奖的总分数
repeated IslandSurvivalLinesInfo Lines = 3; //中奖的结果数组,存每条线的情况
int32 FreeTimes = 4; //剩余免费转动次数
int32 FreeType = 5; //免费转动类型
int32 LeftEnemy = 6; //剩余敌人
int32 Killed = 7; //击杀敌人
repeated int32 Identity = 8;//击杀者身份列表 0 npc 1 自己
int64 FreeWinCoin = 9; //免费转动获得金币
}