From 3f51fef1a3388f8019e2ccec67ab8db26b2a1da7 Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:01:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0playroom=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- makedown/optimization.md | 31 ++++++++++++++++++++++++++++--- proto/Gameapi.proto | 24 ++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/makedown/optimization.md b/makedown/optimization.md index c24d7d94..39fe3753 100644 --- a/makedown/optimization.md +++ b/makedown/optimization.md @@ -1354,7 +1354,6 @@ message ItemNotify{ ## playroom ```protobuf - message ReqPlayroom{} // 请求我的空间信息 message ResPlayroom{ @@ -1365,6 +1364,7 @@ message ResPlayroom{ map Playroom = 5; // 空间装饰 位置 =》 装饰id repeated int32 collect = 6; // 已解锁的装饰 map Mood = 7; // 心情 <位置, 心情> + repeated ItemInfo LoseItem = 8; // 损失的道具 } message FriendRoom{ @@ -1396,13 +1396,20 @@ message ResPlayroomInfo{ map Playroom = 5; // 空间装饰 位置 =》 装饰id int32 GameId = 6; // 游戏id map Items = 7; // 游戏奖励 - int32 Status = 8; // 状态 + int32 Status = 8; // 状态 0 未开始 1 选择奖励 2 已结束 } +// playroom 游戏结果 message ReqPlayroomGame{ int32 Type = 1; // 1:绿色 2:黄色 3:红色 } +message ResPlayroomGame{ + RES_CODE Code = 1; + string Msg = 2; +} + +// playroom 交互 message ReqPlayroomInteract{ int32 Id = 1; // 互动类型 int32 Type = 2; // 1 消耗道具1 2 消耗道具2 @@ -1413,16 +1420,34 @@ message ResPlayroomInteract{ string Msg = 2; } +// playroom装饰 message ReqPlayroomSetRoom{ int32 Id = 1; // 装饰id int32 Pos = 2; // 位置 } -message ReqPlayroomSetRoom{ +message ResPlayroomSetRoom{ RES_CODE Code = 1; string Msg = 2; } +// 选择游戏奖励 +message ReqPlayroomSelectReward{ + int32 Id = 1; // 奖励id +} + +message ResPlayroomSelectReward{ + RES_CODE Code = 1; + string Msg = 2; +} + +// 处理 被偷的棋子 +message ReqPlayroomLose{} + +message ResPlayroomLose{ + RES_CODE Code = 1; + string Msg = 2; +} ``` diff --git a/proto/Gameapi.proto b/proto/Gameapi.proto index 2189915f..56258d5b 100644 --- a/proto/Gameapi.proto +++ b/proto/Gameapi.proto @@ -3362,6 +3362,7 @@ message ResPlayroom{ map Playroom = 5; // 空间装饰 位置 =》 装饰id repeated int32 collect = 6; // 已解锁的装饰 map Mood = 7; // 心情 <位置, 心情> + repeated ItemInfo LoseItem = 8; // 损失的道具 } message FriendRoom{ @@ -3393,13 +3394,18 @@ message ResPlayroomInfo{ map Playroom = 5; // 空间装饰 位置 =》 装饰id int32 GameId = 6; // 游戏id map Items = 7; // 游戏奖励 - int32 Status = 8; // 状态 + int32 Status = 8; // 状态 0 未开始 1 选择奖励 2 已结束 } message ReqPlayroomGame{ int32 Type = 1; // 1:绿色 2:黄色 3:红色 } +message ResPlayroomGame{ + RES_CODE Code = 1; + string Msg = 2; +} + message ReqPlayroomInteract{ int32 Id = 1; // 互动类型 int32 Type = 2; // 1 消耗道具1 2 消耗道具2 @@ -3415,9 +3421,23 @@ message ReqPlayroomSetRoom{ int32 Pos = 2; // 位置 } -message ReqPlayroomSetRoom{ +message ResPlayroomSetRoom{ RES_CODE Code = 1; string Msg = 2; } +message ReqPlayroomSelectReward{ + int32 Id = 1; // 奖励id +} +message ResPlayroomSelectReward{ + RES_CODE Code = 1; + string Msg = 2; +} + +message ReqPlayroomLose{} + +message ResPlayroomLose{ + RES_CODE Code = 1; + string Msg = 2; +} \ No newline at end of file