From 3f606407d91a0cf1fcadd65951d71e8dd1d60cdc Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 1 Jun 2023 14:30:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8A=80=E8=83=BD=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 29 ++- modules/hero/api_strengthenUpSkill.go | 25 +-- modules/hunting/api_challenge.go | 4 + pb/hero_msg.pb.go | 312 +++++++++++++------------- 4 files changed, 186 insertions(+), 184 deletions(-) diff --git a/comm/const.go b/comm/const.go index b540655b3..8ba576e47 100644 --- a/comm/const.go +++ b/comm/const.go @@ -34,21 +34,20 @@ const ( // 模块名定义处 const ( - ModuleSys core.M_Modules = "sys" //系统 - ModuleGate core.M_Modules = "gateway" //gate模块 网关服务模块 - ModuleWeb core.M_Modules = "web" //后台模块 - ModuleUser core.M_Modules = "user" //用户模块 - ModulePack core.M_Modules = "pack" //背包模块 - ModuleMail core.M_Modules = "mail" //邮件模块 - ModuleFriend core.M_Modules = "friend" //好友模块 - ModuleMgoLog core.M_Modules = "mgolog" //日志模块 - ModuleEquipment core.M_Modules = "equipment" //装备模块 - ModuleHero core.M_Modules = "hero" //英雄模块 - ModuleForum core.M_Modules = "forum" //论坛模块 - ModuleItems core.M_Modules = "items" //道具模块 - ModuleShop core.M_Modules = "shop" //商店模块 - ModuleTask core.M_Modules = "task" //任务模块 - + ModuleSys core.M_Modules = "sys" //系统 + ModuleGate core.M_Modules = "gateway" //gate模块 网关服务模块 + ModuleWeb core.M_Modules = "web" //后台模块 + ModuleUser core.M_Modules = "user" //用户模块 + ModulePack core.M_Modules = "pack" //背包模块 + ModuleMail core.M_Modules = "mail" //邮件模块 + ModuleFriend core.M_Modules = "friend" //好友模块 + ModuleMgoLog core.M_Modules = "mgolog" //日志模块 + ModuleEquipment core.M_Modules = "equipment" //装备模块 + ModuleHero core.M_Modules = "hero" //英雄模块 + ModuleForum core.M_Modules = "forum" //论坛模块 + ModuleItems core.M_Modules = "items" //道具模块 + ModuleShop core.M_Modules = "shop" //商店模块 + ModuleTask core.M_Modules = "task" //任务模块 ModuleNotify core.M_Modules = "notify" //公告模块 ModuleChat core.M_Modules = "chat" //聊天模块 ModuleGM core.M_Modules = "gm" //gm模块 diff --git a/modules/hero/api_strengthenUpSkill.go b/modules/hero/api_strengthenUpSkill.go index 539eb863a..20b36a8cb 100644 --- a/modules/hero/api_strengthenUpSkill.go +++ b/modules/hero/api_strengthenUpSkill.go @@ -43,24 +43,15 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt } return } - for _, v1 := range req.Item { - bFind := false - for _, v := range heroCfg.Heroskillup { - if v == v1 { - bFind = true - lvUpCount++ // 升级次数 - break - } + for _, v := range heroCfg.Heroskillup { + if v1, ok := req.Item[v]; ok { + lvUpCount += v1 // 升级次数 + cost = append(cost, &cfg.Gameatn{ + A: "item", + T: v, + N: v1, + }) } - if !bFind { - code = pb.ErrorCode_ReqParameterError - return - } - cost = append(cost, &cfg.Gameatn{ - A: "item", - T: v1, - N: 1, - }) } // 消耗获取 for i := 0; i < int(lvUpCount); i++ { diff --git a/modules/hunting/api_challenge.go b/modules/hunting/api_challenge.go index fd73d9be1..6029e5f70 100644 --- a/modules/hunting/api_challenge.go +++ b/modules/hunting/api_challenge.go @@ -33,6 +33,10 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallen cfgData, err := this.module.configure.GetHuntingBossConfigData(req.BossType, req.Difficulty) if err != nil { code = pb.ErrorCode_ConfigNoFound + data = &pb.ErrorData{ + Title: pb.GetErrorCodeMsg(code), + Message: err.Error(), + } return } if v1, ok := hunting.Ps[req.BossType]; ok && v1 == 0 { diff --git a/pb/hero_msg.pb.go b/pb/hero_msg.pb.go index 12dc5ea1a..2eb582619 100644 --- a/pb/hero_msg.pb.go +++ b/pb/hero_msg.pb.go @@ -478,8 +478,8 @@ type HeroStrengthenUpSkillReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - HeroObjID string `protobuf:"bytes,1,opt,name=heroObjID,proto3" json:"heroObjID"` // 英雄对象ID - Item []string `protobuf:"bytes,2,rep,name=item,proto3" json:"item"` // + HeroObjID string `protobuf:"bytes,1,opt,name=heroObjID,proto3" json:"heroObjID"` // 英雄对象ID + Item map[string]int32 `protobuf:"bytes,2,rep,name=item,proto3" json:"item" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key itemid value 数量 } func (x *HeroStrengthenUpSkillReq) Reset() { @@ -521,7 +521,7 @@ func (x *HeroStrengthenUpSkillReq) GetHeroObjID() string { return "" } -func (x *HeroStrengthenUpSkillReq) GetItem() []string { +func (x *HeroStrengthenUpSkillReq) GetItem() map[string]int32 { if x != nil { return x.Item } @@ -1870,127 +1870,133 @@ var file_hero_hero_msg_proto_rawDesc = []byte{ 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, - 0x65, 0x72, 0x6f, 0x22, 0x4c, 0x0a, 0x18, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x12, - 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x12, 0x0a, - 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x69, 0x74, 0x65, - 0x6d, 0x22, 0x38, 0x0a, 0x19, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, - 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, - 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x2d, 0x0a, 0x0d, 0x48, - 0x65, 0x72, 0x6f, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, - 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x2d, 0x0a, 0x0e, 0x48, 0x65, - 0x72, 0x6f, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, - 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, - 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0xaa, 0x02, 0x0a, 0x10, 0x48, 0x65, - 0x72, 0x6f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, - 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x41, 0x64, 0x64, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x64, - 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x25, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x22, 0x2b, 0x0a, - 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, + 0x65, 0x72, 0x6f, 0x22, 0xaa, 0x01, 0x0a, 0x18, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, + 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x37, + 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x48, + 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, + 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x1a, 0x37, 0x0a, 0x09, 0x49, 0x74, 0x65, 0x6d, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x38, 0x0a, 0x19, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, - 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x77, 0x0a, 0x13, 0x48, 0x65, - 0x72, 0x6f, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, - 0x71, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x69, 0x6e, 0x66, 0x69, 0x67, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x65, 0x72, 0x6f, 0x43, 0x6f, - 0x69, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, - 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x6c, 0x76, 0x22, 0x33, 0x0a, 0x14, 0x48, 0x65, 0x72, 0x6f, 0x47, 0x65, 0x74, 0x53, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, + 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x2d, 0x0a, 0x0d, 0x48, 0x65, + 0x72, 0x6f, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, + 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x2d, 0x0a, 0x0e, 0x48, 0x65, 0x72, + 0x6f, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, - 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x4b, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, - 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x64, - 0x72, 0x61, 0x77, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, - 0x72, 0x61, 0x77, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x72, 0x61, 0x77, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x72, 0x61, 0x77, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x29, 0x0a, 0x08, 0x41, 0x74, 0x6e, 0x6f, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x1d, 0x0a, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x6f, - 0x22, 0x31, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x41, 0x74, 0x6e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x6c, 0x69, - 0x73, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, - 0x72, 0x64, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x22, 0x73, 0x0a, 0x15, 0x48, 0x65, - 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x34, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x34, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x35, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x35, 0x12, - 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, 0x22, - 0x92, 0x01, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x05, 0x68, 0x65, 0x72, - 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x46, - 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x05, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x48, 0x65, - 0x72, 0x6f, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x28, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x22, 0x13, - 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x22, 0x3b, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x65, 0x6c, - 0x6e, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65, - 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, - 0x22, 0x5e, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x65, - 0x61, 0x72, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, - 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6f, 0x62, 0x6a, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, - 0x22, 0x58, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x65, - 0x61, 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, - 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x2a, 0x0a, 0x12, 0x48, 0x65, - 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6f, 0x62, 0x6a, 0x49, 0x64, 0x22, 0x3c, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, - 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, - 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, - 0x6c, 0x6e, 0x65, 0x74, 0x22, 0x42, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x42, 0x75, 0x79, 0x52, - 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x07, 0x62, 0x75, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x62, 0x75, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x62, 0x75, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x55, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, - 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, - 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x12, - 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, 0x22, - 0x2a, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x69, 0x72, 0x73, 0x74, 0x47, 0x65, 0x74, 0x50, - 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0xaa, 0x02, 0x0a, 0x10, 0x48, 0x65, 0x72, + 0x6f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, + 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, + 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x64, 0x64, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x25, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x0c, + 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, + 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, + 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x77, 0x0a, 0x13, 0x48, 0x65, 0x72, + 0x6f, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x71, + 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x69, 0x6e, 0x66, 0x69, 0x67, 0x49, + 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x69, + 0x6e, 0x66, 0x69, 0x67, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, + 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, + 0x6c, 0x76, 0x22, 0x33, 0x0a, 0x14, 0x48, 0x65, 0x72, 0x6f, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, + 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, + 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x4b, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x44, + 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x72, + 0x61, 0x77, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x72, + 0x61, 0x77, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x72, 0x61, 0x77, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x29, 0x0a, 0x08, 0x41, 0x74, 0x6e, 0x6f, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x1d, 0x0a, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x22, + 0x31, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x09, 0x2e, 0x41, 0x74, 0x6e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x50, 0x75, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, + 0x74, 0x22, 0x16, 0x0a, 0x14, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, + 0x64, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x22, 0x73, 0x0a, 0x15, 0x48, 0x65, 0x72, + 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x34, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x34, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x35, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x35, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, 0x22, 0x92, + 0x01, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x05, 0x68, 0x65, 0x72, 0x6f, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x05, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x48, 0x65, 0x72, + 0x6f, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x28, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x22, 0x13, 0x0a, + 0x11, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x22, 0x3b, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x65, 0x6c, 0x6e, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, + 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, 0x22, + 0x5e, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x61, + 0x72, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x49, + 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x49, + 0x44, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x62, 0x6a, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x22, + 0x58, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x61, + 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x54, + 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x2a, 0x0a, 0x12, 0x48, 0x65, 0x72, + 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, + 0x14, 0x0a, 0x05, 0x6f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6f, 0x62, 0x6a, 0x49, 0x64, 0x22, 0x3c, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x06, + 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, + 0x42, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6c, + 0x6e, 0x65, 0x74, 0x22, 0x42, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x42, 0x75, 0x79, 0x52, 0x65, + 0x71, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x07, 0x62, 0x75, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, + 0x75, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, + 0x75, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x55, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x42, + 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, 0x22, 0x2a, + 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x69, 0x72, 0x73, 0x74, 0x47, 0x65, 0x74, 0x50, 0x75, + 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2005,7 +2011,7 @@ func file_hero_hero_msg_proto_rawDescGZIP() []byte { return file_hero_hero_msg_proto_rawDescData } -var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 39) +var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_hero_hero_msg_proto_goTypes = []interface{}{ (*HeroInfoReq)(nil), // 0: HeroInfoReq (*HeroInfoResp)(nil), // 1: HeroInfoResp @@ -2043,37 +2049,39 @@ var file_hero_hero_msg_proto_goTypes = []interface{}{ (*HeroBuyResp)(nil), // 33: HeroBuyResp (*HeroFirstGetPush)(nil), // 34: HeroFirstGetPush nil, // 35: HeroStrengthenUplvReq.ItemEntry - nil, // 36: HeroPropertyPush.PropertyEntry - nil, // 37: HeroPropertyPush.AddPropertyEntry - nil, // 38: HeroFusionReq.HerosEntry - (*DBHero)(nil), // 39: DBHero - (*UserAtno)(nil), // 40: UserAtno - (*DBHeroTalent)(nil), // 41: DBHeroTalent + nil, // 36: HeroStrengthenUpSkillReq.ItemEntry + nil, // 37: HeroPropertyPush.PropertyEntry + nil, // 38: HeroPropertyPush.AddPropertyEntry + nil, // 39: HeroFusionReq.HerosEntry + (*DBHero)(nil), // 40: DBHero + (*UserAtno)(nil), // 41: UserAtno + (*DBHeroTalent)(nil), // 42: DBHeroTalent } var file_hero_hero_msg_proto_depIdxs = []int32{ - 39, // 0: HeroInfoResp.base:type_name -> DBHero - 39, // 1: HeroListResp.list:type_name -> DBHero + 40, // 0: HeroInfoResp.base:type_name -> DBHero + 40, // 1: HeroListResp.list:type_name -> DBHero 35, // 2: HeroStrengthenUplvReq.item:type_name -> HeroStrengthenUplvReq.ItemEntry - 39, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero - 39, // 4: HeroStrengthenUpStarResp.hero:type_name -> DBHero - 39, // 5: HeroStrengthenUpSkillResp.hero:type_name -> DBHero - 39, // 6: HeroAwakenResp.hero:type_name -> DBHero - 36, // 7: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry - 37, // 8: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry - 39, // 9: HeroLockResp.hero:type_name -> DBHero - 39, // 10: HeroGetSpecifiedResp.hero:type_name -> DBHero - 40, // 11: AtnoData.atno:type_name -> UserAtno - 19, // 12: HeroDrawCardResp.data:type_name -> AtnoData - 39, // 13: HeroChangePush.list:type_name -> DBHero - 38, // 14: HeroFusionReq.heros:type_name -> HeroFusionReq.HerosEntry - 41, // 15: HeroTalentListResp.telnet:type_name -> DBHeroTalent - 41, // 16: HeroTalentLearnResp.telnet:type_name -> DBHeroTalent - 41, // 17: HeroTalentResetResp.telnet:type_name -> DBHeroTalent - 18, // [18:18] is the sub-list for method output_type - 18, // [18:18] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name + 40, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero + 40, // 4: HeroStrengthenUpStarResp.hero:type_name -> DBHero + 36, // 5: HeroStrengthenUpSkillReq.item:type_name -> HeroStrengthenUpSkillReq.ItemEntry + 40, // 6: HeroStrengthenUpSkillResp.hero:type_name -> DBHero + 40, // 7: HeroAwakenResp.hero:type_name -> DBHero + 37, // 8: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry + 38, // 9: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry + 40, // 10: HeroLockResp.hero:type_name -> DBHero + 40, // 11: HeroGetSpecifiedResp.hero:type_name -> DBHero + 41, // 12: AtnoData.atno:type_name -> UserAtno + 19, // 13: HeroDrawCardResp.data:type_name -> AtnoData + 40, // 14: HeroChangePush.list:type_name -> DBHero + 39, // 15: HeroFusionReq.heros:type_name -> HeroFusionReq.HerosEntry + 42, // 16: HeroTalentListResp.telnet:type_name -> DBHeroTalent + 42, // 17: HeroTalentLearnResp.telnet:type_name -> DBHeroTalent + 42, // 18: HeroTalentResetResp.telnet:type_name -> DBHeroTalent + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name } func init() { file_hero_hero_msg_proto_init() } @@ -2511,7 +2519,7 @@ func file_hero_hero_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_hero_hero_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 39, + NumMessages: 40, NumExtensions: 0, NumServices: 0, }, From bd0055383201bbea4ef43b59f510573801d48085 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 1 Jun 2023 14:40:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E9=81=93=E5=85=B7=E4=BD=BF=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/buried/module.go | 70 +++++++++++++++++++----------- modules/items/api_useItem.go | 83 +++++++++--------------------------- modules/items/core.go | 9 ++++ 3 files changed, 73 insertions(+), 89 deletions(-) diff --git a/modules/buried/module.go b/modules/buried/module.go index b31a2bd7d..f62ac5f8d 100644 --- a/modules/buried/module.go +++ b/modules/buried/module.go @@ -184,12 +184,12 @@ func (this *Buried) trigger(uid string, burieds ...*pb.BuriedParam) { ok bool change bool changes []*pb.ConIProgress - - // completeConIds []int32 //完成id列表 - err error + notify map[string][]*pb.ConIProgress + module core.IModule + nmodule comm.IBuriedUpdateNotify + err error ) this.Debug("触发埋点!", log.Field{Key: "burieds", Value: burieds}) - lock, _ := this.modelBuried.userlock(uid) err = lock.Lock() if err != nil { @@ -219,6 +219,7 @@ func (this *Buried) trigger(uid string, burieds ...*pb.BuriedParam) { return } } + notify = make(map[string][]*pb.ConIProgress) changes = make([]*pb.ConIProgress, 0) //处理校验通过埋点数据 for buried, conds := range pass { @@ -236,43 +237,62 @@ func (this *Buried) trigger(uid string, burieds ...*pb.BuriedParam) { } for _, cond := range conds { this.Debug("更新埋点数据", log.Field{Key: "埋点类型", Value: buried.TaskType}, log.Field{Key: "条件类型", Value: cond.Id}) + autoActivated := false if cond.Rtype == rtype1 { //创号后入录 - if change, bitem, err = this.updateAndCheckBuried(bconf, bdata, buried, cond, true); change { - changes = append(changes, &pb.ConIProgress{ - Btype: bdata.Btype, - Conid: cond.Id, - Value: bitem.Value, - Target: cond.Value, - State: bitem.Finish, - }) - } + autoActivated = true } else if cond.Rtype == rtype2 { //任务接取后才会录入 判断用户埋点数据是否存在 不存在等待任务系统调用接口 ActivationBuried 激活 - if change, bitem, err = this.updateAndCheckBuried(bconf, bdata, buried, cond, false); change { - changes = append(changes, &pb.ConIProgress{ - Btype: bdata.Btype, - Conid: cond.Id, - Value: bitem.Value, - Target: cond.Value, - State: bitem.Finish, - }) - } + autoActivated = false } else { this.Error("未知的任务类型", log.Field{Key: "埋点类型", Value: buried.TaskType}, log.Field{Key: "条件Id", Value: cond.Id}, log.Field{Key: "条件类型", Value: cond.Rtype}) + continue } + if change, bitem, err = this.updateAndCheckBuried(bconf, bdata, buried, cond, autoActivated); change { + cp := &pb.ConIProgress{ + Btype: bdata.Btype, + Conid: cond.Id, + Value: bitem.Value, + Target: cond.Value, + State: bitem.Finish, + } + changes = append(changes, cp) + if len(cond.Notify) > 0 { + for _, mname := range cond.Notify { + if _, ok = notify[mname]; !ok { + notify[mname] = make([]*pb.ConIProgress, 0) + } + notify[mname] = append(notify[mname], cp) + } + } + } + } - change = true } - if change { //同步数据 + if len(changes) > 0 { //同步数据 if err = this.modelBuried.updateUserBurieds(uid, bdatas); err != nil { this.Error("更新用户埋点数据错误!", log.Field{Key: "err", Value: err.Error()}) return } } + if len(notify) > 0 { + for k, v := range notify { + if module, err = this.service.GetModule(core.M_Modules(k)); err != nil { + this.Error("通知条件变化异常 目标模块未找到!", log.Field{Key: "module", Value: k}, log.Field{Key: "err", Value: err.Error()}) + continue + } + if nmodule, ok = module.(comm.IBuriedUpdateNotify); !ok { + this.Error("通知条件变化异常 目标模块未实现 IBuriedUpdateNotify 接口 !", log.Field{Key: "module", Value: k}) + continue + } + //异步通知指定模块 + go nmodule.BuriedsNotify(uid, v) + } + } + //通知事件 if len(changes) > 0 { - this.Debug("条件达成通知", log.Field{Key: "ConIds", Value: changes}) + this.Debug("条件变化通知", log.Field{Key: "ConIds", Value: changes}) event.TriggerEvent(comm.EventBuriedComplete, uid, changes) } } diff --git a/modules/items/api_useItem.go b/modules/items/api_useItem.go index 6d2bc4fac..b314eb150 100644 --- a/modules/items/api_useItem.go +++ b/modules/items/api_useItem.go @@ -34,30 +34,24 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq) return } switch itemcf.Usetype { - case comm.UseType1: //英雄碎片 - if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil { - code = pb.ErrorCode_ConfigNoFound - return - } - if itemcf.SynthetizeNum*int32(req.Amount) > int32(item.Amount) { //碎片数量不够 - code = pb.ErrorCode_ItemsNoEnough - return - } - if code = this.module.AddItemforGrid(session, req.GridId, -1*itemcf.SynthetizeNum*int32(req.Amount), true); code != pb.ErrorCode_Success { - return - } - sale := RandomProps(prop) - var res []*cfg.Gameatn - res = append(res, &cfg.Gameatn{ - A: "hero", - T: sale.Prize[0].T, - N: int32(req.Amount), - }) - if code = this.module.DispenseRes(session, res, true); code != pb.ErrorCode_Success { - return - } + case itemuse_exchange: //分解(体力,兑换 + sale := make([]*cfg.Gameatn, 0, len(prop)) + for _, v := range itemcf.DecomposeDeplete { + sale = append(sale, &cfg.Gameatn{ + A: v.A, + T: v.T, + N: v.N * int32(req.Amount), + }) - case 4: //自选宝箱 + } + if code = this.module.AddItemforGrid(session, req.GridId, -1*int32(req.Amount), true); code != pb.ErrorCode_Success { + return + } + if code = this.module.DispenseRes(session, sale, true); code != pb.ErrorCode_Success { + return + } + break + case itemuse_optionalbox: //自选宝箱 if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil { code = pb.ErrorCode_ConfigNoFound return @@ -86,7 +80,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq) if code = this.module.DispenseRes(session, sale, true); code != pb.ErrorCode_Success { return } - case 5: //随机宝箱 + case itemuse_randombox: //宝箱 if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil { code = pb.ErrorCode_ConfigNoFound return @@ -101,30 +95,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq) if code = this.module.DispenseRes(session, sale, true); code != pb.ErrorCode_Success { return } - case 6: //箱子 - - if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil { - code = pb.ErrorCode_ConfigNoFound - return - } - sale := make([]*cfg.Gameatn, 0, len(prop)) - for _, v := range prop { - for _, v1 := range v.Prize { - sale = append(sale, &cfg.Gameatn{ - A: v1.A, - T: v1.T, - N: v1.N * int32(req.Amount), - }) - } - } - if code = this.module.AddItemforGrid(session, req.GridId, -1*int32(req.Amount), true); code != pb.ErrorCode_Success { - return - } - if code = this.module.DispenseRes(session, sale, true); code != pb.ErrorCode_Success { - return - } - break - case comm.UseType8: //觉醒材料合成 + case itemuse_synthesis: //合成 if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil { code = pb.ErrorCode_ConfigNoFound return @@ -161,23 +132,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq) if code = this.module.DispenseRes(session, sale, true); code != pb.ErrorCode_Success { return } - case 11: //药剂使用 - sale := make([]*cfg.Gameatn, 0, len(prop)) - for _, v := range itemcf.DecomposeDeplete { - sale = append(sale, &cfg.Gameatn{ - A: v.A, - T: v.T, - N: v.N * int32(req.Amount), - }) - } - if code = this.module.AddItemforGrid(session, req.GridId, -1*int32(req.Amount), true); code != pb.ErrorCode_Success { - return - } - if code = this.module.DispenseRes(session, sale, true); code != pb.ErrorCode_Success { - return - } - break default: code = pb.ErrorCode_ItemsUseNotSupported return diff --git a/modules/items/core.go b/modules/items/core.go index d38ec6039..5ab3bca2d 100644 --- a/modules/items/core.go +++ b/modules/items/core.go @@ -19,6 +19,15 @@ const ( Pack_Expiration = -1 //背包缓存数据过期时间 ) +const ( + itemuse_nouse int32 = 1 //不可使用 + itemuse_jump int32 = 2 //跳转 + itemuse_exchange int32 = 3 //分解(体力,兑换) + itemuse_optionalbox int32 = 4 //自选宝箱 + itemuse_randombox int32 = 5 //随机宝箱 + itemuse_synthesis int32 = 6 //合成(英雄,觉醒) +) + var ( NoFoundItemConfig = errors.New("no found itemconfig!") //道具配置未找到 ItemNotEnoughError = errors.New("item not enough!") //物品不足