From 8ad62ae8978cf2d85d79bd5bfc4ef8865776d0b5 Mon Sep 17 00:00:00 2001 From: wangyuan Date: Tue, 16 Jul 2019 18:29:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A1=80=E6=88=98=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/CommonProto.proto | 39 +++++++++++++++++++++++++++++++++++++++ protos/RoomProto.proto | 9 +-------- protos/SceneFight.proto | 36 ------------------------------------ 3 files changed, 40 insertions(+), 44 deletions(-) diff --git a/protos/CommonProto.proto b/protos/CommonProto.proto index 4ca0f6d..321a727 100644 --- a/protos/CommonProto.proto +++ b/protos/CommonProto.proto @@ -414,4 +414,43 @@ option optimize_for = SPEED; optional string userName = 4; optional TowerRankInfo towerRankInfo = 5; } + + + message SceneInfo{ + optional int32 roomId = 1;// 唯一标识 + optional int32 mapId = 2; //场景所属地图id + repeated SceneActor SceneActor =3;//场景中的演员信息 + repeated ActorEffectBufferInfo actorEffectBufferInfo =4;//场景中所有buffer信息 + } + + message SceneActor{ + optional int32 id=1; //id 唯一标识 + optional int32 curPos = 2;//当前位置 + optional int32 state = 3; //当前状态 1 : 不可移动 0 : 可移动 + optional int32 type =4 ;// 演员类型 1 玩家 2 怪物 3 矿点 4 npc + optional Creature Creature = 6 ;//动作演员信息 + } + + message Creature{ + repeated int32 path = 1; //行走路径 + optional int32 speed =2;// 速度 + optional int32 maxHp =3; //最大血量 + optional int32 curHp =4;// 当前血量 + optional int32 mineral = 5; // 矿石 + optional int32 camp = 6; //阵营 + } + + message ActorEffectBufferInfo{ + optional int32 id = 1;//buffer id + optional int32 type = 2; //bufffer类型 + optional int32 startTime =3; // buffer 开始时间 + optional int32 endTime =4;//buffer 失效时间 + optional int32 target = 5 ;// buffer 作用对象id + optional int32 caster = 6;// 释放者 + repeated int32 value = 7; // buffer 作用效果值 + } + + message SceneGetFullMsgResponse{ + optional SceneInfo sceneInfo =1 ;// 场景信息 + } diff --git a/protos/RoomProto.proto b/protos/RoomProto.proto index e20408c..653d4da 100644 --- a/protos/RoomProto.proto +++ b/protos/RoomProto.proto @@ -41,14 +41,7 @@ import "CommonProto.proto"; message RoomMatchSuccessIndication{ optional int32 roomId = 1; - optional int32 type = 2; //type 匹配游戏类型 1血战 - optional int32 mapId =3; - // 地图信息 - repeated Cell mapList = 4; - // 其他人 - repeated AgentInfo agentInfos = 5; //playerUid和自己一致的就是自己的信息 - // 临时背包 - optional Drop temporaryItems = 6; + optional SceneInfo sceneInfo =2; // 场景信息 } //必须有准备过程防止因为机器性能原因导致,性能好的先进入游戏 diff --git a/protos/SceneFight.proto b/protos/SceneFight.proto index fa53703..3e29f78 100644 --- a/protos/SceneFight.proto +++ b/protos/SceneFight.proto @@ -5,43 +5,7 @@ option optimize_for = SPEED; import "CommonProto.proto"; -message SceneInfo{ - optional int32 mapId = 1; //场景所属地图id - repeated SceneActor SceneActor =2;//场景中的演员信息 - repeated ActorEffectBufferInfo actorEffectBufferInfo =3;//场景中所有buffer信息 -} -message SceneActor{ - optional int32 id=1; //id 唯一标识 - optional int32 curPos = 2;//当前位置 - optional int32 state = 3; //当前状态 1 : 不可移动 0 : 可移动 - optional int32 type =4 ;// 演员类型 1 玩家 2 怪物 3 矿点 4 npc - optional Creature Creature = 6 ;//动作演员信息 -} - -message Creature{ - repeated int32 path = 1; //行走路径 - optional int32 speed =2;// 速度 - optional int32 maxHp =3; //最大血量 - optional int32 curHp =4;// 当前血量 - optional int32 mineral = 5; // 矿石 - optional int32 camp = 6; //阵营 -} - -message ActorEffectBufferInfo{ - optional int32 id = 1;//buffer id - optional int32 type = 2; //bufffer类型 - optional int32 startTime =3; // buffer 开始时间 - optional int32 endTime =4;//buffer 失效时间 - optional int32 target = 5 ;// buffer 作用对象id - optional int32 caster = 6;// 释放者 - repeated int32 value = 7; // buffer 作用效果值 - -} - -message SceneGetFullMsgResponse{ - optional SceneInfo sceneInfo =1 ;// 场景信息 -} //命令请求 message SceneCommandRequest{