From 75aeee4a0f064f7f8d9027bd1fd4566f8ea5f320 Mon Sep 17 00:00:00 2001 From: jiahuiwen <1024696487@qq.com> Date: Mon, 21 Jan 2019 17:51:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/CommonProto.proto | 2 +- protos/MapInfoProto.proto | 45 ++++++++++++++++++++++++++++++++--- protos/MessageTypeProto.proto | 4 ++-- 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/protos/CommonProto.proto b/protos/CommonProto.proto index 6486663..890fc0c 100644 --- a/protos/CommonProto.proto +++ b/protos/CommonProto.proto @@ -69,7 +69,7 @@ option optimize_for = SPEED; message CellEvent{ // s_c_map_event id optional int32 eventId = 1; - // 状态,0:未完成 1:已完成 + // 事件进度,从0开始 -1表示该事件已完成 optional int32 state = 2; } diff --git a/protos/MapInfoProto.proto b/protos/MapInfoProto.proto index 30c7529..6b2c03a 100644 --- a/protos/MapInfoProto.proto +++ b/protos/MapInfoProto.proto @@ -3,18 +3,57 @@ package com.ljsd.jieling.protocols; option optimize_for = SPEED; import "CommonProto.proto"; - -message MapInfo{ // 进入地图 message MapEnterRequest{ // 需要进入的地图id optional int32 mapId = 1; + // 所用英雄 + repeated HeroInfo heroInfos = 2; } message MapEnterResponse{ // 地图信息 repeated Cell mapList = 1; // 当前所在坐标 optional int32 curXY = 2; + // 所用英雄 + repeated HeroInfo heroInfos = 3; } -} \ No newline at end of file + message HeroInfo { + optional string heroId = 1; + optional int32 heroHp = 2; + } + + // 更新事件 + message MapUpdateEventRequest{ + // 走过的格子 + repeated int32 cells = 1; + // 当前所在坐标 + optional int32 curXY = 2; + // 所选大事件id + optional int32 bigEventId = 3; + // 可选事件,玩家做出的选项 从1开始 + optional int32 choice = 4; + } + message MapUpdateEventResponse{ + // 当前所在坐标 + optional int32 curXY = 1; + // 事件进度,从0开始 -1表示该事件已完成 + optional int32 eventSchedule = 2; + // 获得的道具 + repeated Item Items = 3; + } + + // 战斗事件结算 + message FightEndRequest { + // 所用英雄(保存血量) + repeated HeroInfo heroInfos = 1; + } + message FightEndResponse { + // 获得的道具 + repeated Item Items = 1; + // 大事件id + optional int32 bigEventId = 2; + // 事件进度,从0开始 -1表示该事件已完成 + optional int32 eventSchedule = 3; + } diff --git a/protos/MessageTypeProto.proto b/protos/MessageTypeProto.proto index 6be43f7..eb57b35 100644 --- a/protos/MessageTypeProto.proto +++ b/protos/MessageTypeProto.proto @@ -55,8 +55,8 @@ enum MessageType{ MAP_OUT_REQUEST = 11202; // MAP_OUT_RESPONSE = 11203; - MAP_GET_INFO_REQUEST = 11204; // - MAP_GET_INFO_RESPONSE = 11205; + MAP_UDPATE_EVENT_REQUEST = 11204; // 更新事件 + MAP_UDPATE_EVENT_RESPONSE = 11205; // N 11300 // O 11400 // P 11500