From 12cd1b5a1ab2e11e68505ffbbe4615182c865646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B0=B8=E8=8A=B3?= Date: Thu, 13 Jun 2019 17:28:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E8=A1=80=E6=88=98=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E5=8F=8A=E6=B6=88=E6=81=AFID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/MessageTypeProto.proto | 22 ++++++++++++++++++++++ protos/RoomFightProto.proto | 15 ++++++++++----- protos/RoomProto.proto | 6 +++--- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/protos/MessageTypeProto.proto b/protos/MessageTypeProto.proto index 7c72d99..b1c3b9a 100644 --- a/protos/MessageTypeProto.proto +++ b/protos/MessageTypeProto.proto @@ -244,6 +244,28 @@ enum MessageType{ REFRESH_FRIEND_STATE_REQEUST= 11710; //刷新好友在线状态 REFRESH_FRIEND_STATE_RESPONSE = 11711; + + ROOM_MATCH_REQUEST = 11712; //请求匹配 + ROOM_MATCH_RESPONSE = 11713; + + ROOM_CANCEL_MATCH_REQUEST = 11714; //取消匹配 + ROOM_CANCEL_MATCH_RESPONSE = 11715; + + ROOM_START_GAME_READY_REQUEST = 11716; //准备 + ROOM_START_GAME_READY_RESPONSE = 11717; + + ROOM_START_GAME_INDICATION = 11718; //开始游戏推送 + + ROOM_GAME_START_REQUEST = 11720; //开始游戏 + ROOM_GAME_START_RESPONSE = 11721; + + ROOM_SYNC_MYSELF_MOVE_REQUEST = 11722; //移动同步 + ROOM_SYNC_MYSELF_MOVE_RESPONSE = 11723; + + ROOM_SYNC_OTHER_MOVE_INDICTION = 11724; //移动其他用户的位置 + + ROOM_TRIGGER_FIGHT_INDICATION = 11726; //触发战斗 + // S 11800 SUCCESS_RESPONSE = 11800; // 通用成功回复 diff --git a/protos/RoomFightProto.proto b/protos/RoomFightProto.proto index af71c0e..24307d7 100644 --- a/protos/RoomFightProto.proto +++ b/protos/RoomFightProto.proto @@ -14,11 +14,11 @@ import "CommonProto.proto"; repeated int32 dieList = 8; // 死亡计数(按顺序记录杀死自己的玩家uid) repeated int32 killList = 9; // 杀人计数(按顺序记录自己杀死的玩家uid) } - message GameStartRequest{ + message RoomGameStartRequest{ //时间戳,用户客户端修正因网络延时引起的误差,是否使用由实现机制决定,暂时保留 optional int64 clientTimestamp = 1; } - message GameStartResponse{ + message RoomGameStartResponse{ optional int64 clientTimestamp = 1; //请求中的时间戳,原值返回 optional int64 serverTimestamp = 2; //服务器端时间戳 optional int32 mapId =3; @@ -34,16 +34,21 @@ import "CommonProto.proto"; optional Drop temporaryItems = 8; } - message SyncMyselfMoveRequest{ + message RoomSyncMyselfMoveRequest{ optional int64 clientTimestamp = 1; //请求中的时间戳,原值返回 optional int32 tartXY = 2; } - message SyncMyselfMoveResponse{ + message RoomSyncMyselfMoveResponse{ optional int64 clientTimestamp = 1; //请求中的时间戳,原值返回 optional int64 serverTimestamp = 2; //服务器端时间戳 } - message SyncOtherFightIndication{ + message RoomSyncOtherMoveIndiction{ + optional int32 uid = 1; + optional int32 tartXY = 2; + } + + message RoomTriggerFightIndication{ //参与战斗的用户ID optional AgentInfo player1 = 1; optional AgentInfo player2 = 2; diff --git a/protos/RoomProto.proto b/protos/RoomProto.proto index ad88723..d6d297a 100644 --- a/protos/RoomProto.proto +++ b/protos/RoomProto.proto @@ -27,15 +27,15 @@ import "CommonProto.proto"; } //必须有准备过程防止因为机器性能原因导致,性能好的先进入游戏 - message StartGameReadyRequest{ + message RoomStartGameReadyRequest{ optional int32 type = 1; //type 匹配游戏类型 1血战 } //匹配应答 - message StartGameReadyResponse{ + message RoomStartGameReadyResponse{ optional int32 type = 1; //type 匹配游戏类型 1血战 } - message StartGameIndication{ + message RoomStartGameIndication{ optional int32 roomId = 1; optional int32 type = 2; //type 匹配游戏类型 1血战 }