From 5d7bfba2e20aa3121b6780b7f55c16fef464e132 Mon Sep 17 00:00:00 2001 From: wangyuan Date: Tue, 16 Jul 2019 14:54:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=80=E6=88=98=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/MessageTypeProto.proto | 9 ++++++ protos/SceneFight.proto | 60 +++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 protos/SceneFight.proto diff --git a/protos/MessageTypeProto.proto b/protos/MessageTypeProto.proto index 4805cc5..18b2b58 100644 --- a/protos/MessageTypeProto.proto +++ b/protos/MessageTypeProto.proto @@ -352,6 +352,15 @@ enum MessageType{ SEND_CHAT_INFO_INDICATION = 11818; //好友聊天推送 SEND_FRIEND_STATE_INDICATION = 11819; // 推送好友信息 + + SCENE_MSG_UPDATE_INDICATION = 11820; // 场景信息变更 + + SCENE_GET_FULL_MSG_REQUEST = 11821; //获取场景所有信息 + SCENE_GET_FULL_MSG_RESPONSE = 11822; + + SCENE_COMMAND_REQUEST = 11823; //在场景中发送的指令请求 + SCENE_COMMAND_RESPONSE = 11824; + // T 11900 TRIGGER_EVENT_REQUEST = 11900; // diff --git a/protos/SceneFight.proto b/protos/SceneFight.proto new file mode 100644 index 0000000..fa53703 --- /dev/null +++ b/protos/SceneFight.proto @@ -0,0 +1,60 @@ +package com.ljsd.jieling.protocols; + +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{ + optional int32 type =1; //指令类型 1:表示行走 + repeated int32 parm =2; //指令参数 若type为1 则参数为行走路径 +} + + + +//广播场景里演员变换信息 +message BroadMsgIndication{ + repeated SceneActor SceneActor =1 ; // 演员信息变更 + repeated ActorEffectBufferInfo ActorEffectBufferInfo =2; + repeated int32 removeBufferId =3; // 被删除的buffer + repeated int32 removeActorId = 4 ;//演员被移除 +} \ No newline at end of file