From a479c1ea55b48d97b9f2a9f5182e6ef7d52fcedb Mon Sep 17 00:00:00 2001 From: zqj <582132116@qq.com> Date: Tue, 21 Mar 2023 18:00:57 +0800 Subject: [PATCH] feat: 派遣系统 数据结构和表结构以及相关协议 --- dispatch.proto | 29 +++++++++++++++++++++++++++++ hero.proto | 15 --------------- models.proto | 10 ++++++++++ protocode.proto | 3 +++ role.proto | 1 + 5 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 dispatch.proto diff --git a/dispatch.proto b/dispatch.proto new file mode 100644 index 0000000..b42d633 --- /dev/null +++ b/dispatch.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; +option go_package = "../pb;pb"; + +package game; +//import "google/protobuf/empty.proto"; +import "models.proto"; + +// rpc = req + rsp 请求/返回 +// rpc = rar + rar 自回包 + +message DispatchReq { + int32 dispatch_group = 1; + int32 dispatch_id = 2; + repeated string heros = 3; +} + +message DispatchRsp { + models.Dispatch dispatch = 1; +} + +message DispatchRewardReq { + string id = 1; + int32 dispatch_id = 2; +} + +message DispatchRewardRsp { + string success_reward = 1; + string dispatch_reward = 2; +} diff --git a/hero.proto b/hero.proto index c888c67..1113a60 100644 --- a/hero.proto +++ b/hero.proto @@ -97,18 +97,3 @@ message HeroUpGradeReq { string hero_id = 1; } -message HeroUpGradeRsp { - string hero_id = 1; - int32 grade = 2; -} - -message HeroUpMemorySlotReq { - string hero_id = 1; - int32 slot_idx = 2; - string costs = 3; -} - -message HeroUpMemorySlotRsp { - string hero_id = 1; - map slot_memory = 2; -} diff --git a/models.proto b/models.proto index 521fef2..1322414 100644 --- a/models.proto +++ b/models.proto @@ -153,4 +153,14 @@ message Task { map month_task = 5; map specify_task = 6; +} + +message Dispatch { + string id = 1; // @inject_tag: index:"unique" pri:"1" + string role_id = 2; + int32 group_id = 3; + map process = 4; // id=0, id=1 不存在是未解锁 0是正在派遣 1是已完成 + repeated string heros = 5; + int64 end_time = 6; + bool status = 7; // true=正在派遣 } \ No newline at end of file diff --git a/protocode.proto b/protocode.proto index 803a561..1fe0029 100644 --- a/protocode.proto +++ b/protocode.proto @@ -60,6 +60,9 @@ enum ProtoCode ActivitySignRpc = 701; + DispatchRpc = 801; + DispatchRewardRpc = 802; + DisConnectNty = 1001; RoleUpdatePropertyNty = 1002; diff --git a/role.proto b/role.proto index a048acb..8e3b1e3 100644 --- a/role.proto +++ b/role.proto @@ -33,6 +33,7 @@ message LoginRsp { int64 time_now = 9; models.Task task = 10; map task_open = 11; + repeated models.Dispatch dispatch = 12; } message CreateRar { -- libgit2 0.21.2