From d691a0e09e1c178e14c85d55123a26e87d868041 Mon Sep 17 00:00:00 2001 From: zqj <582132116@qq.com> Date: Mon, 25 Jul 2022 14:26:13 +0800 Subject: [PATCH] feat: add store --- game.proto | 15 +++++++++++++++ models.proto | 40 ++++++++++++++++++++++------------------ protocode.proto | 2 ++ 3 files changed, 39 insertions(+), 18 deletions(-) diff --git a/game.proto b/game.proto index 9bd1a03..2fdea72 100644 --- a/game.proto +++ b/game.proto @@ -140,3 +140,18 @@ message EmailDelRsp { message EmailNewNty { models.Email email = 1; } + +message StoreBuyReq { + int32 typ = 1; + int32 id = 2; + int32 count = 3; +} + +message StoreBuyRsp { + string reward = 1; +} + +message StoreUpdatePropertyNty { + repeated string keys = 1; // 键 名字 + models.Store store = 2; +} \ No newline at end of file diff --git a/models.proto b/models.proto index 87fcfdb..e48cbaa 100644 --- a/models.proto +++ b/models.proto @@ -85,6 +85,12 @@ message Increment { int64 val = 2; } +message Store { + string id = 1; // @inject_tag: index:"unique" pri:"1" + map buy_r =2; // buy item by gold + map pay_r =3; // buy item by money +} + message Role { string id = 1; // @inject_tag: index:"unique" pri:"1" string uid = 2; // @inject_tag: index:"unique" @@ -95,22 +101,20 @@ message Role { int64 hp = 7; int64 hp_max = 8; - string buy_r = 9; - string pay_r = 10; - bool del = 11; - map incres = 12; - - string items = 13;//物品 "id=count id2=count2" - uint32 clotheslimit = 14; - uint32 weaponslimit = 15; - uint32 otherlimit = 16; - uint32 jewelrylimit = 17; - uint32 materiallimit = 18; - - map passchapters = 19; // 通关记录 - map time_reset = 20; // 重置记录 {1=1,2=1,3=1} 1=CrossDay,2=CrossWeek,3=CrossMonth - - map daily_task = 21; - map week_task = 22; - map month_task = 23; + bool del = 9; + map incres = 10; + + string items = 11;//物品 "id=count id2=count2" + uint32 clotheslimit = 12; + uint32 weaponslimit = 13; + uint32 otherlimit = 14; + uint32 jewelrylimit = 15; + uint32 materiallimit = 16; + + map passchapters = 17; // 通关记录 + map time_reset = 18; // 重置记录 {1=1,2=1,3=1} 1=CrossDay,2=CrossWeek,3=CrossMonth + + map daily_task = 19; + map week_task = 20; + map month_task = 21; } \ No newline at end of file diff --git a/protocode.proto b/protocode.proto index 0cda714..1e40d4e 100644 --- a/protocode.proto +++ b/protocode.proto @@ -21,12 +21,14 @@ enum ProtoCode EmailDrawRpc = 513; EmailCheckRpc = 514; EmailDelRpc = 515; + StoreBuyRpc = 516; DisConnectNty = 1001; RoleUpdatePropertyNty = 1002; RoleUpdateItemsNty = 1003; EquipmentAddNty = 1004; EmailNewNty = 1005; + StoreUpdatePropertyNty = 1006; -- libgit2 0.21.2