From 97d388fe387afcec8a02aea70b1edca88e997aa3 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 8 May 2023 18:54:06 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E4=B8=80=E9=94=AE=E5=87=BA=E5=94=AE?= =?UTF-8?q?=E8=A3=85=E5=A4=87=E9=81=93=E5=85=B7=E7=AD=89=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/user/api_sellres.go | 58 ++++ pb/user_msg.pb.go | 592 ++++++++++++++++++++++-------------- 2 files changed, 426 insertions(+), 224 deletions(-) create mode 100644 modules/user/api_sellres.go diff --git a/modules/user/api_sellres.go b/modules/user/api_sellres.go new file mode 100644 index 000000000..8c76d4a86 --- /dev/null +++ b/modules/user/api_sellres.go @@ -0,0 +1,58 @@ +package user + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +//参数校验 +func (this *apiComp) SellItemCheck(session comm.IUserSession, req *pb.UserSellResReq) (code pb.ErrorCode) { + if len(req.Atno) == 0 { + code = pb.ErrorCode_ReqParameterError + } + return +} + +//分解道具 +func (this *apiComp) SellItem(session comm.IUserSession, req *pb.UserSellResReq) (code pb.ErrorCode, data *pb.ErrorData) { + var ( + item []*pb.UserAtno // 出售的道具 + equip []*pb.UserAtno // 出售的装备 + sale []*pb.UserAssets + ) + if code = this.SellItemCheck(session, req); code != pb.ErrorCode_Success { + return + } + for _, v := range req.Atno { + if v.A == "item" { + item = append(item, v) + } else if v.A == "equi" { + equip = append(equip, v) + } + } + if len(item) > 0 { + + } + if len(equip) > 0 { + var id []string + for _, v := range equip { + id = append(id, v.O) + } + if code, d := this.module.ModuleEquipment.SellEquipments(session, id); code != pb.ErrorCode_Success { + //sale = append(sale, d...) + for _, v := range d { + sale = append(sale, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + } + } + + session.SendMsg(string(this.module.GetType()), "sellres", &pb.UserSellResResp{ + Atn: sale, + IsSucc: true, + }) + return +} diff --git a/pb/user_msg.pb.go b/pb/user_msg.pb.go index 506164042..3c890c817 100644 --- a/pb/user_msg.pb.go +++ b/pb/user_msg.pb.go @@ -2683,6 +2683,110 @@ func (x *UserChangeTipsResp) GetData() *DBSign { return nil } +//出售资源 +type UserSellResReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Atno []*UserAtno `protobuf:"bytes,1,rep,name=atno,proto3" json:"atno"` +} + +func (x *UserSellResReq) Reset() { + *x = UserSellResReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserSellResReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserSellResReq) ProtoMessage() {} + +func (x *UserSellResReq) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[52] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserSellResReq.ProtoReflect.Descriptor instead. +func (*UserSellResReq) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{52} +} + +func (x *UserSellResReq) GetAtno() []*UserAtno { + if x != nil { + return x.Atno + } + return nil +} + +//出售道具请求 回应 +type UserSellResResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Atn []*UserAssets `protobuf:"bytes,1,rep,name=atn,proto3" json:"atn"` + IsSucc bool `protobuf:"varint,2,opt,name=IsSucc,proto3" json:"IsSucc"` +} + +func (x *UserSellResResp) Reset() { + *x = UserSellResResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserSellResResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserSellResResp) ProtoMessage() {} + +func (x *UserSellResResp) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[53] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserSellResResp.ProtoReflect.Descriptor instead. +func (*UserSellResResp) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{53} +} + +func (x *UserSellResResp) GetAtn() []*UserAssets { + if x != nil { + return x.Atn + } + return nil +} + +func (x *UserSellResResp) GetIsSucc() bool { + if x != nil { + return x.IsSucc + } + return false +} + var File_user_user_msg_proto protoreflect.FileDescriptor var file_user_user_msg_proto_rawDesc = []byte{ @@ -2696,198 +2800,207 @@ var file_user_user_msg_proto_rawDesc = []byte{ 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, - 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, + 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, + 0x22, 0x65, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, + 0x0a, 0x02, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x55, + 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x02, 0x65, 0x78, 0x12, 0x18, 0x0a, + 0x07, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x6f, 0x77, 0x22, 0x0d, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x22, 0x4a, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x02, + 0x65, 0x78, 0x22, 0x0f, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, + 0x52, 0x65, 0x71, 0x22, 0x10, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x6f, 0x75, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x3d, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x73, 0x69, 0x64, 0x22, 0x65, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x02, 0x65, - 0x78, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x6f, 0x77, 0x22, 0x0d, 0x0a, 0x0b, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x22, 0x4a, 0x0a, 0x0c, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, - 0x6e, 0x64, 0x52, 0x02, 0x65, 0x78, 0x22, 0x0f, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, - 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x22, 0x10, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4c, - 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x3d, 0x0a, 0x0f, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, - 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x22, 0x28, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 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, 0x22, 0xf0, 0x02, - 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, - 0x50, 0x75, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x69, - 0x70, 0x65, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x76, 0x69, 0x70, 0x65, - 0x78, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x63, 0x6f, 0x69, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x63, 0x6f, 0x69, 0x6e, - 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x1c, - 0x0a, 0x09, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x09, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, - 0x70, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x70, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x6d, 0x6f, 0x6f, 0x6e, 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x6d, 0x6f, 0x6f, 0x6e, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x6c, 0x65, - 0x6e, 0x74, 0x31, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, - 0x74, 0x31, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x32, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x32, 0x12, 0x18, 0x0a, 0x07, - 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x33, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, - 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x33, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, - 0x34, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x34, - 0x22, 0x2a, 0x0a, 0x16, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x54, 0x65, 0x72, - 0x6d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, - 0x55, 0x73, 0x65, 0x72, 0x50, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, - 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x70, - 0x73, 0x22, 0x13, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x22, 0x3e, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, - 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x40, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x28, - 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x22, 0x26, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, - 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x25, - 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, - 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x24, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, - 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x11, 0x55, - 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, - 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x03, 0x73, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0a, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x22, 0x5b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, + 0x28, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 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, 0x22, 0xf0, 0x02, 0x0a, 0x12, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, + 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, + 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x69, 0x70, 0x65, 0x78, 0x70, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x76, 0x69, 0x70, 0x65, 0x78, 0x70, 0x12, 0x18, + 0x0a, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, + 0x67, 0x75, 0x69, 0x6c, 0x64, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x09, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, + 0x65, 0x6e, 0x61, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x61, + 0x72, 0x65, 0x6e, 0x61, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x70, 0x73, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x70, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x6f, 0x6f, 0x6e, + 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x6f, 0x6f, 0x6e, + 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x31, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x31, 0x12, 0x18, + 0x0a, 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x6c, 0x65, + 0x6e, 0x74, 0x33, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, + 0x74, 0x33, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x34, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x34, 0x22, 0x2a, 0x0a, 0x16, + 0x55, 0x73, 0x65, 0x72, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x54, 0x65, 0x72, 0x6d, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, + 0x50, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x0e, 0x0a, + 0x02, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x70, 0x73, 0x22, 0x13, 0x0a, + 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x22, 0x3e, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x22, 0x40, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, + 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, + 0x11, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x71, 0x22, 0x26, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x22, 0x24, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, + 0x6f, 0x64, 0x69, 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x50, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x6e, 0x61, + 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, + 0x69, 0x66, 0x79, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, 0x22, 0x28, 0x0a, 0x10, 0x55, + 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x62, 0x67, 0x70, 0x52, 0x65, 0x71, 0x12, + 0x14, 0x0a, 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x67, 0x70, 0x49, 0x64, 0x22, 0x3b, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, + 0x69, 0x66, 0x79, 0x62, 0x67, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x79, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, - 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x14, 0x55, 0x73, 0x65, - 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, 0x22, - 0x28, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x62, 0x67, 0x70, - 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, 0x22, 0x3b, 0x0a, 0x11, 0x55, 0x73, 0x65, - 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x62, 0x67, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x79, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, - 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x14, 0x55, 0x73, 0x65, - 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, 0x22, - 0x12, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, - 0x52, 0x65, 0x71, 0x22, 0x2d, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x54, 0x75, - 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, - 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, - 0x64, 0x73, 0x22, 0x47, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x76, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, - 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x54, 0x0a, 0x12, 0x55, - 0x73, 0x65, 0x72, 0x56, 0x69, 0x70, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, - 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x69, 0x70, 0x45, 0x78, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x06, 0x76, 0x69, 0x70, 0x45, 0x78, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x69, 0x70, 0x4c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x69, 0x70, 0x4c, - 0x76, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x73, - 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x26, 0x0a, 0x12, 0x55, 0x73, - 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x22, 0x27, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xf0, 0x01, 0x0a, 0x14, - 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x1d, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x02, 0x65, 0x78, - 0x12, 0x33, 0x0a, 0x0c, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, - 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0c, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x34, 0x0a, 0x0d, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, - 0x42, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x0d, 0x68, 0x75, - 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x31, 0x0a, 0x0c, 0x76, - 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, - 0x52, 0x0c, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x34, - 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x74, 0x65, 0x61, - 0x6d, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, - 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, - 0x6a, 0x49, 0x64, 0x73, 0x22, 0x27, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x74, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x11, 0x0a, - 0x0f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x77, 0x74, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, - 0x22, 0x32, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x77, 0x74, 0x65, 0x61, 0x6d, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, - 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, - 0x6a, 0x49, 0x64, 0x73, 0x22, 0x32, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x31, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, - 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x05, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x55, - 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x71, 0x22, 0x3a, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, - 0x0d, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x2b, - 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, - 0x42, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2a, 0x0a, 0x12, 0x55, - 0x73, 0x65, 0x72, 0x50, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x71, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x2b, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x50, - 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x54, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x70, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x69, 0x70, 0x73, 0x22, 0x31, 0x0a, - 0x12, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x70, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x67, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x67, 0x70, + 0x49, 0x64, 0x22, 0x31, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x65, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, + 0x69, 0x66, 0x79, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, 0x22, 0x12, 0x0a, 0x10, 0x55, + 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x22, + 0x2d, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x22, 0x47, + 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x76, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, + 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x54, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x56, + 0x69, 0x70, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x76, 0x69, 0x70, 0x45, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x76, 0x69, 0x70, 0x45, 0x78, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x69, 0x70, 0x4c, 0x76, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x69, 0x70, 0x4c, 0x76, 0x22, 0x27, 0x0a, + 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x73, 0x69, 0x67, 0x6e, 0x52, + 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x26, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, + 0x64, 0x69, 0x66, 0x79, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x27, + 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xf0, 0x01, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, + 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, + 0x02, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x55, 0x73, + 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x02, 0x65, 0x78, 0x12, 0x33, 0x0a, 0x0c, + 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x52, 0x0c, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x12, 0x34, 0x0a, 0x0d, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x48, 0x75, 0x6e, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x0d, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x31, 0x0a, 0x0c, 0x76, 0x69, 0x6b, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x0c, 0x76, 0x69, + 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x34, 0x0a, 0x12, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x74, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, + 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, + 0x22, 0x27, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x74, + 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x73, 0x65, + 0x72, 0x53, 0x68, 0x6f, 0x77, 0x74, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x10, + 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x77, 0x74, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, + 0x22, 0x32, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x20, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x22, 0x31, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x47, + 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x22, + 0x3a, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x0d, 0x0a, 0x0b, 0x55, + 0x73, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x2b, 0x0a, 0x0c, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x53, 0x69, 0x67, + 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2a, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x50, + 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x22, 0x2b, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x7a, 0x7a, 0x6c, + 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x22, 0x27, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, + 0x70, 0x73, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x69, 0x70, 0x73, 0x22, 0x31, 0x0a, 0x12, 0x55, 0x73, 0x65, + 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, + 0x44, 0x42, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2f, 0x0a, 0x0e, + 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x52, 0x65, 0x71, 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, 0x48, 0x0a, + 0x0f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1d, 0x0a, 0x03, 0x61, 0x74, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x03, 0x61, 0x74, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2902,7 +3015,7 @@ func file_user_user_msg_proto_rawDescGZIP() []byte { return file_user_user_msg_proto_rawDescData } -var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 52) +var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 54) var file_user_user_msg_proto_goTypes = []interface{}{ (*UserLoginReq)(nil), // 0: UserLoginReq (*UserLoginResp)(nil), // 1: UserLoginResp @@ -2956,41 +3069,47 @@ var file_user_user_msg_proto_goTypes = []interface{}{ (*UserPuzzleAwardResp)(nil), // 49: UserPuzzleAwardResp (*UserChangeTipsReq)(nil), // 50: UserChangeTipsReq (*UserChangeTipsResp)(nil), // 51: UserChangeTipsResp - (*DBUser)(nil), // 52: DBUser - (*DBUserExpand)(nil), // 53: DBUserExpand - (ErrorCode)(0), // 54: ErrorCode - (*CacheUser)(nil), // 55: CacheUser - (*DBUserSetting)(nil), // 56: DBUserSetting - (*DBPagodaRecord)(nil), // 57: DBPagodaRecord - (*DBHuntingRank)(nil), // 58: DBHuntingRank - (*DBVikingRank)(nil), // 59: DBVikingRank - (*DBServerData)(nil), // 60: DBServerData - (*DBSign)(nil), // 61: DBSign + (*UserSellResReq)(nil), // 52: UserSellResReq + (*UserSellResResp)(nil), // 53: UserSellResResp + (*DBUser)(nil), // 54: DBUser + (*DBUserExpand)(nil), // 55: DBUserExpand + (ErrorCode)(0), // 56: ErrorCode + (*CacheUser)(nil), // 57: CacheUser + (*DBUserSetting)(nil), // 58: DBUserSetting + (*DBPagodaRecord)(nil), // 59: DBPagodaRecord + (*DBHuntingRank)(nil), // 60: DBHuntingRank + (*DBVikingRank)(nil), // 61: DBVikingRank + (*DBServerData)(nil), // 62: DBServerData + (*DBSign)(nil), // 63: DBSign + (*UserAtno)(nil), // 64: UserAtno + (*UserAssets)(nil), // 65: UserAssets } var file_user_user_msg_proto_depIdxs = []int32{ - 52, // 0: UserLoginResp.data:type_name -> DBUser - 53, // 1: UserLoginResp.ex:type_name -> DBUserExpand - 52, // 2: UserInfoResp.data:type_name -> DBUser - 53, // 3: UserInfoResp.ex:type_name -> DBUserExpand - 54, // 4: UserRegisterResp.Code:type_name -> ErrorCode - 55, // 5: UserLoadResp.data:type_name -> CacheUser - 56, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting - 56, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting - 52, // 8: UserBattlerecordResp.data:type_name -> DBUser - 53, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand - 57, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord - 58, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank - 59, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank - 55, // 13: UserOnlineResp.users:type_name -> CacheUser - 52, // 14: UserDataListResp.users:type_name -> DBUser - 60, // 15: UserGetServerDataResp.data:type_name -> DBServerData - 61, // 16: UserSignResp.data:type_name -> DBSign - 61, // 17: UserChangeTipsResp.data:type_name -> DBSign - 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 + 54, // 0: UserLoginResp.data:type_name -> DBUser + 55, // 1: UserLoginResp.ex:type_name -> DBUserExpand + 54, // 2: UserInfoResp.data:type_name -> DBUser + 55, // 3: UserInfoResp.ex:type_name -> DBUserExpand + 56, // 4: UserRegisterResp.Code:type_name -> ErrorCode + 57, // 5: UserLoadResp.data:type_name -> CacheUser + 58, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting + 58, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting + 54, // 8: UserBattlerecordResp.data:type_name -> DBUser + 55, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand + 59, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord + 60, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank + 61, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank + 57, // 13: UserOnlineResp.users:type_name -> CacheUser + 54, // 14: UserDataListResp.users:type_name -> DBUser + 62, // 15: UserGetServerDataResp.data:type_name -> DBServerData + 63, // 16: UserSignResp.data:type_name -> DBSign + 63, // 17: UserChangeTipsResp.data:type_name -> DBSign + 64, // 18: UserSellResReq.atno:type_name -> UserAtno + 65, // 19: UserSellResResp.atn:type_name -> UserAssets + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_user_user_msg_proto_init() } @@ -3005,6 +3124,7 @@ func file_user_user_msg_proto_init() { file_viking_viking_db_proto_init() file_hunting_hunting_db_proto_init() file_serverdata_proto_init() + file_comm_proto_init() if !protoimpl.UnsafeEnabled { file_user_user_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserLoginReq); i { @@ -3630,6 +3750,30 @@ func file_user_user_msg_proto_init() { return nil } } + file_user_user_msg_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserSellResReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_msg_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserSellResResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3637,7 +3781,7 @@ func file_user_user_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_user_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 52, + NumMessages: 54, NumExtensions: 0, NumServices: 0, }, From 4d697b4e709be4ddb1583cdfa66477d6170d5245 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 8 May 2023 19:38:52 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_opencond.json | 69 ++++++++++++++++++++++++++---- comm/imodule.go | 2 + modules/items/module.go | 68 +++++++++++++++++++++++++++++ modules/practice/api_gymrefresh.go | 11 +++++ 4 files changed, 141 insertions(+), 9 deletions(-) diff --git a/bin/json/game_opencond.json b/bin/json/game_opencond.json index 5e4ccf7be..143f572f6 100644 --- a/bin/json/game_opencond.json +++ b/bin/json/game_opencond.json @@ -261,7 +261,7 @@ "main": [ { "key": 1, - "param": 1 + "param": 9999 } ], "wkqbx": 2, @@ -675,7 +675,7 @@ "main": [ { "key": 1, - "param": 1 + "param": 9999 } ], "wkqbx": 0, @@ -836,7 +836,7 @@ "main": [ { "key": 1, - "param": 1 + "param": 9999 } ], "wkqbx": 0, @@ -859,7 +859,7 @@ "main": [ { "key": 1, - "param": 1 + "param": 9999 } ], "wkqbx": 0, @@ -882,7 +882,7 @@ "main": [ { "key": 1, - "param": 1 + "param": 9999 } ], "wkqbx": 2, @@ -974,7 +974,7 @@ "main": [ { "key": 1, - "param": 1 + "param": 9999 } ], "wkqbx": 1, @@ -1365,7 +1365,7 @@ "main": [ { "key": 1, - "param": 1 + "param": 9999 } ], "wkqbx": 1, @@ -1598,7 +1598,12 @@ "key": "num_3008", "text": "经验副本" }, - "main": [], + "main": [ + { + "key": 1, + "param": 1 + } + ], "wkqbx": 0, "kqbx": 0, "img": "", @@ -1653,7 +1658,53 @@ "text": "" }, "uiid": 0, - "activateType": 2, + "activateType": 0, + "notify": [] + }, + { + "id": "userset", + "name": { + "key": "num_3008", + "text": "设置" + }, + "main": [ + { + "key": 1, + "param": 9999 + } + ], + "wkqbx": 0, + "kqbx": 0, + "img": "", + "prompt": { + "key": "opencond_prompt_hero", + "text": "功能暂未开启" + }, + "uiid": 0, + "activateType": 0, + "notify": [] + }, + { + "id": "vip", + "name": { + "key": "num_3009", + "text": "vip" + }, + "main": [ + { + "key": 1, + "param": 9999 + } + ], + "wkqbx": 0, + "kqbx": 0, + "img": "", + "prompt": { + "key": "opencond_prompt_hero", + "text": "功能暂未开启" + }, + "uiid": 0, + "activateType": 0, "notify": [] } ] \ No newline at end of file diff --git a/comm/imodule.go b/comm/imodule.go index 940f1744b..349462795 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -55,6 +55,8 @@ type ( BuyUnifiedTicket(session IUserSession, buynum int32) (code pb.ErrorCode) ///刷新恢复入场券 RecoverTicket(session IUserSession) (code pb.ErrorCode) + //出售道具 + SellItem(session IUserSession, items map[string]int32) (code pb.ErrorCode, atno []*pb.UserAtno) } //英雄 diff --git a/modules/items/module.go b/modules/items/module.go index 1feb3e1ee..994b34a69 100644 --- a/modules/items/module.go +++ b/modules/items/module.go @@ -4,6 +4,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/modules" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" @@ -188,6 +189,73 @@ func (this *Items) RecoverTicket(session comm.IUserSession) (code pb.ErrorCode) return } +//出售道具 +func (this *Items) SellItem(session comm.IUserSession, items map[string]int32, bPush bool) (code pb.ErrorCode, atno []*pb.UserAtno) { + var ( + grids []string = make([]string, 0, len(items)) + _itmes []*pb.DB_UserItemData + itemcf *cfg.GameItemData + _grids map[string]*pb.DB_UserItemData = make(map[string]*pb.DB_UserItemData) + sale []*cfg.Gameatn = make([]*cfg.Gameatn, 0) + change []*pb.DB_UserItemData = make([]*pb.DB_UserItemData, 0) + g *pb.DB_UserItemData + err error + ok bool + ) + for k, _ := range items { + grids = append(grids, k) + } + if _itmes, err = this.modelItems.QueryUserPackByGridIds(session.GetUserId(), grids); err != nil { + code = pb.ErrorCode_DBError + return + } + for _, v := range _itmes { + _grids[v.GridId] = v + } + + for k, v := range items { + if g, ok = _grids[k]; ok { + if int32(g.Amount) <= v { + if itemcf, err = this.configure.GetItemConfigure(g.ItemId); err != nil { + code = pb.ErrorCode_ConfigurationException + return + } + if itemcf.Sale == nil || len(itemcf.Sale) == 0 { + code = pb.ErrorCode_ItemsUseNoCanSell + return + } + for _, v1 := range itemcf.Sale { + temp := *v1 + temp.N = v1.N * v + sale = append(sale, &temp) + } + g.Amount -= uint32(v) + if g.Amount > 0 { + this.modelItems.UpdateUserPack(session.GetUserId(), g) + } else { + this.modelItems.DeleteUserPack(session.GetUserId(), g) + } + change = append(change, g) + } else { + code = pb.ErrorCode_ItemsNoEnough + return + } + } else { + code = pb.ErrorCode_ItemsNoFoundGird + return + } + + } + + if code, atno = this.DispenseAtno(session, sale, bPush); code != pb.ErrorCode_Success { + return + } + if len(change) > 0 && bPush { + this.itemsChangePush(session, change) //推送道具背包变化 + } + return +} + //Evens-------------------------------------------------------------------------------------------------------------------------------- //推送道具变化消息 func (this *Items) itemsChangePush(session comm.IUserSession, items []*pb.DB_UserItemData) (err error) { diff --git a/modules/practice/api_gymrefresh.go b/modules/practice/api_gymrefresh.go index ae74e406f..ff07ac877 100644 --- a/modules/practice/api_gymrefresh.go +++ b/modules/practice/api_gymrefresh.go @@ -46,6 +46,17 @@ func (this *apiComp) GymRefresh(session comm.IUserSession, req *pb.PracticeGymRe code = pb.ErrorCode_ConfigNoFound return } + //过滤掉当前的buff + for i, v := range confs { + if v.Id == room.Gymaction { + confs = append(confs[0:i], confs[i+1:]...) + break + } + } + if len(confs) == 0 { + code = pb.ErrorCode_ConfigurationException + return + } r := rand.New(rand.NewSource(configure.Now().Unix())) room.Gymaction = confs[r.Perm(len(confs))[0]].Id room.Gymrefresh++ From 77d0636bd19aaeb982ed9e3a0c0f59669a7c6d19 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 8 May 2023 19:42:58 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E5=B7=A5=E5=85=B7=E5=8F=B0=E6=8A=80?= =?UTF-8?q?=E8=83=BD=E5=8A=A0=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithy/api_forgeequip.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/smithy/api_forgeequip.go b/modules/smithy/api_forgeequip.go index 10a184727..af1d998ed 100644 --- a/modules/smithy/api_forgeequip.go +++ b/modules/smithy/api_forgeequip.go @@ -88,11 +88,15 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq // 熟练度减少的温度 t := this.module.modelStove.CheckTemperature(req.ReelId, stove.Data[req.ReelId].Lv) needTemperatureCos = needTemperatureCos * (1000 - t) / 1000 // 千分比 - + // 工具台技能减少 + _s := this.module.modelStove.StoveToolsTemperature(stove) + if _s != 0 { + needTemperatureCos *= (1 - _s/1000) + } if req.Lava > 0 { // 熔岩打造 exemption := this.module.ModuleTools.GetGlobalConf().ExemptionTemperatureCos // 预计消耗温度 gloabNum := this.module.ModuleTools.GetGlobalConf().ExemptionTemperatureCosNum - if needTemperatureCos > req.Lava*gloabNum { + if needTemperatureCos > req.Count*gloabNum { code = pb.ErrorCode_SmithyLackLava // 缺少熔岩 return } From 90dc48d146a8678f2c94ba5126aea09601ab5190 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 8 May 2023 19:48:20 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=87=BA=E5=94=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/user/api_sellres.go | 40 +++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/modules/user/api_sellres.go b/modules/user/api_sellres.go index 8c76d4a86..ce9ad1ee5 100644 --- a/modules/user/api_sellres.go +++ b/modules/user/api_sellres.go @@ -16,30 +16,23 @@ func (this *apiComp) SellItemCheck(session comm.IUserSession, req *pb.UserSellRe //分解道具 func (this *apiComp) SellItem(session comm.IUserSession, req *pb.UserSellResReq) (code pb.ErrorCode, data *pb.ErrorData) { var ( - item []*pb.UserAtno // 出售的道具 - equip []*pb.UserAtno // 出售的装备 - sale []*pb.UserAssets + equip []string // 出售的装备 + sale []*pb.UserAssets + mapitem map[string]int32 ) + mapitem = map[string]int32{} if code = this.SellItemCheck(session, req); code != pb.ErrorCode_Success { return } for _, v := range req.Atno { if v.A == "item" { - item = append(item, v) + mapitem[v.O] += v.N } else if v.A == "equi" { - equip = append(equip, v) + equip = append(equip, v.O) } } - if len(item) > 0 { - - } - if len(equip) > 0 { - var id []string - for _, v := range equip { - id = append(id, v.O) - } - if code, d := this.module.ModuleEquipment.SellEquipments(session, id); code != pb.ErrorCode_Success { - //sale = append(sale, d...) + if len(mapitem) > 0 { + if c, d := this.module.ModuleItems.SellItem(session, mapitem); c != pb.ErrorCode_Success { for _, v := range d { sale = append(sale, &pb.UserAssets{ A: v.A, @@ -47,6 +40,23 @@ func (this *apiComp) SellItem(session comm.IUserSession, req *pb.UserSellResReq) N: v.N, }) } + } else { + code = c + return + } + } + if len(equip) > 0 { + if c, d := this.module.ModuleEquipment.SellEquipments(session, equip); c != pb.ErrorCode_Success { + for _, v := range d { + sale = append(sale, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + } else { + code = c + return } } From f1c0979c1aa3e31accb09e1b3febf8e361aa21b1 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 8 May 2023 20:04:09 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 2 +- modules/items/module.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/comm/imodule.go b/comm/imodule.go index 349462795..6d9c59d67 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -56,7 +56,7 @@ type ( ///刷新恢复入场券 RecoverTicket(session IUserSession) (code pb.ErrorCode) //出售道具 - SellItem(session IUserSession, items map[string]int32) (code pb.ErrorCode, atno []*pb.UserAtno) + SellItem(session IUserSession, items map[string]int32, bPush bool) (code pb.ErrorCode, atno []*pb.UserAtno) } //英雄 diff --git a/modules/items/module.go b/modules/items/module.go index 994b34a69..ae5880f34 100644 --- a/modules/items/module.go +++ b/modules/items/module.go @@ -244,7 +244,6 @@ func (this *Items) SellItem(session comm.IUserSession, items map[string]int32, b code = pb.ErrorCode_ItemsNoFoundGird return } - } if code, atno = this.DispenseAtno(session, sale, bPush); code != pb.ErrorCode_Success { From 4b5ebf92687f93d9f5be3d462304578f75e6aba9 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 8 May 2023 20:06:06 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/user/api_sellres.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/user/api_sellres.go b/modules/user/api_sellres.go index ce9ad1ee5..b86af7699 100644 --- a/modules/user/api_sellres.go +++ b/modules/user/api_sellres.go @@ -6,7 +6,7 @@ import ( ) //参数校验 -func (this *apiComp) SellItemCheck(session comm.IUserSession, req *pb.UserSellResReq) (code pb.ErrorCode) { +func (this *apiComp) SellResCheck(session comm.IUserSession, req *pb.UserSellResReq) (code pb.ErrorCode) { if len(req.Atno) == 0 { code = pb.ErrorCode_ReqParameterError } @@ -14,14 +14,14 @@ func (this *apiComp) SellItemCheck(session comm.IUserSession, req *pb.UserSellRe } //分解道具 -func (this *apiComp) SellItem(session comm.IUserSession, req *pb.UserSellResReq) (code pb.ErrorCode, data *pb.ErrorData) { +func (this *apiComp) SellRes(session comm.IUserSession, req *pb.UserSellResReq) (code pb.ErrorCode, data *pb.ErrorData) { var ( equip []string // 出售的装备 sale []*pb.UserAssets mapitem map[string]int32 ) mapitem = map[string]int32{} - if code = this.SellItemCheck(session, req); code != pb.ErrorCode_Success { + if code = this.SellResCheck(session, req); code != pb.ErrorCode_Success { return } for _, v := range req.Atno { @@ -32,7 +32,7 @@ func (this *apiComp) SellItem(session comm.IUserSession, req *pb.UserSellResReq) } } if len(mapitem) > 0 { - if c, d := this.module.ModuleItems.SellItem(session, mapitem); c != pb.ErrorCode_Success { + if c, d := this.module.ModuleItems.SellItem(session, mapitem, true); c != pb.ErrorCode_Success { for _, v := range d { sale = append(sale, &pb.UserAssets{ A: v.A, From 84720ed7f1985646f12903e790446dd559d70927 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 8 May 2023 20:23:49 +0800 Subject: [PATCH 07/14] update --- modules/user/api_sellres.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/user/api_sellres.go b/modules/user/api_sellres.go index b86af7699..20661eace 100644 --- a/modules/user/api_sellres.go +++ b/modules/user/api_sellres.go @@ -20,7 +20,7 @@ func (this *apiComp) SellRes(session comm.IUserSession, req *pb.UserSellResReq) sale []*pb.UserAssets mapitem map[string]int32 ) - mapitem = map[string]int32{} + mapitem = make(map[string]int32) if code = this.SellResCheck(session, req); code != pb.ErrorCode_Success { return } @@ -32,7 +32,7 @@ func (this *apiComp) SellRes(session comm.IUserSession, req *pb.UserSellResReq) } } if len(mapitem) > 0 { - if c, d := this.module.ModuleItems.SellItem(session, mapitem, true); c != pb.ErrorCode_Success { + if c, d := this.module.ModuleItems.SellItem(session, mapitem, true); c == pb.ErrorCode_Success { for _, v := range d { sale = append(sale, &pb.UserAssets{ A: v.A, @@ -46,7 +46,7 @@ func (this *apiComp) SellRes(session comm.IUserSession, req *pb.UserSellResReq) } } if len(equip) > 0 { - if c, d := this.module.ModuleEquipment.SellEquipments(session, equip); c != pb.ErrorCode_Success { + if c, d := this.module.ModuleEquipment.SellEquipments(session, equip); c == pb.ErrorCode_Success { for _, v := range d { sale = append(sale, &pb.UserAssets{ A: v.A, From 34f506bea1d7bde4b5040a8a9f5eedeeee729f0c Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 8 May 2023 20:35:05 +0800 Subject: [PATCH 08/14] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_dreamlandtrigger.json | 28 +++++++++++- bin/json/game_opencond.json | 69 ++++------------------------- 2 files changed, 36 insertions(+), 61 deletions(-) diff --git a/bin/json/game_dreamlandtrigger.json b/bin/json/game_dreamlandtrigger.json index 0637a088a..40ae01665 100644 --- a/bin/json/game_dreamlandtrigger.json +++ b/bin/json/game_dreamlandtrigger.json @@ -1 +1,27 @@ -[] \ No newline at end of file +[ + { + "id": 1, + "dreamland_pro": 1000, + "open": true + }, + { + "id": 2, + "dreamland_pro": 1000, + "open": true + }, + { + "id": 3, + "dreamland_pro": 1000, + "open": true + }, + { + "id": 4, + "dreamland_pro": 1000, + "open": true + }, + { + "id": 5, + "dreamland_pro": 1000, + "open": true + } +] \ No newline at end of file diff --git a/bin/json/game_opencond.json b/bin/json/game_opencond.json index 143f572f6..5e4ccf7be 100644 --- a/bin/json/game_opencond.json +++ b/bin/json/game_opencond.json @@ -261,7 +261,7 @@ "main": [ { "key": 1, - "param": 9999 + "param": 1 } ], "wkqbx": 2, @@ -675,7 +675,7 @@ "main": [ { "key": 1, - "param": 9999 + "param": 1 } ], "wkqbx": 0, @@ -836,7 +836,7 @@ "main": [ { "key": 1, - "param": 9999 + "param": 1 } ], "wkqbx": 0, @@ -859,7 +859,7 @@ "main": [ { "key": 1, - "param": 9999 + "param": 1 } ], "wkqbx": 0, @@ -882,7 +882,7 @@ "main": [ { "key": 1, - "param": 9999 + "param": 1 } ], "wkqbx": 2, @@ -974,7 +974,7 @@ "main": [ { "key": 1, - "param": 9999 + "param": 1 } ], "wkqbx": 1, @@ -1365,7 +1365,7 @@ "main": [ { "key": 1, - "param": 9999 + "param": 1 } ], "wkqbx": 1, @@ -1598,12 +1598,7 @@ "key": "num_3008", "text": "经验副本" }, - "main": [ - { - "key": 1, - "param": 1 - } - ], + "main": [], "wkqbx": 0, "kqbx": 0, "img": "", @@ -1658,53 +1653,7 @@ "text": "" }, "uiid": 0, - "activateType": 0, - "notify": [] - }, - { - "id": "userset", - "name": { - "key": "num_3008", - "text": "设置" - }, - "main": [ - { - "key": 1, - "param": 9999 - } - ], - "wkqbx": 0, - "kqbx": 0, - "img": "", - "prompt": { - "key": "opencond_prompt_hero", - "text": "功能暂未开启" - }, - "uiid": 0, - "activateType": 0, - "notify": [] - }, - { - "id": "vip", - "name": { - "key": "num_3009", - "text": "vip" - }, - "main": [ - { - "key": 1, - "param": 9999 - } - ], - "wkqbx": 0, - "kqbx": 0, - "img": "", - "prompt": { - "key": "opencond_prompt_hero", - "text": "功能暂未开启" - }, - "uiid": 0, - "activateType": 0, + "activateType": 2, "notify": [] } ] \ No newline at end of file From d15efb7cf8c9f38390c88a226411b6ba013a9bf2 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 8 May 2023 21:11:26 +0800 Subject: [PATCH 09/14] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_friends.json | 66 ++++++++++++++++------- sys/configure/structs/Game.FriendsData.go | 4 ++ 2 files changed, 52 insertions(+), 18 deletions(-) diff --git a/bin/json/game_friends.json b/bin/json/game_friends.json index 521416256..7bf6f35ad 100644 --- a/bin/json/game_friends.json +++ b/bin/json/game_friends.json @@ -12,9 +12,11 @@ "text": "师徒二人" }, "png": "jiban_img_zu02", + "img": "hgd_img_bg", "friends_lv": 1, "favorability_lv": 1, "hid": "25001", + "hidimg": "hgd_role_25001", "attribute": [ { "a": "atkpro", @@ -38,10 +40,12 @@ "key": "favorability_friends_friend_name_40001", "text": "师徒二人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu03", + "img": "hgd_img_bg", "friends_lv": 1, "favorability_lv": 1, "hid": "14002", + "hidimg": "hgd_role_14002", "attribute": [ { "a": "atk", @@ -65,10 +69,12 @@ "key": "favorability_friends_friend_name_40001", "text": "师徒二人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu04", + "img": "hgd_img_bg", "friends_lv": 2, - "favorability_lv": 9, + "favorability_lv": 3, "hid": "25001", + "hidimg": "hgd_role_25001", "attribute": [ { "a": "atkpro", @@ -92,10 +98,12 @@ "key": "favorability_friends_friend_name_40001", "text": "师徒二人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu05", + "img": "hgd_img_bg", "friends_lv": 2, - "favorability_lv": 9, + "favorability_lv": 3, "hid": "14002", + "hidimg": "hgd_role_14002", "attribute": [ { "a": "atk", @@ -119,10 +127,12 @@ "key": "favorability_friends_friend_name_40001", "text": "师徒二人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu06", + "img": "hgd_img_bg", "friends_lv": 3, - "favorability_lv": 15, + "favorability_lv": 6, "hid": "25001", + "hidimg": "hgd_role_25001", "attribute": [ { "a": "atkpro", @@ -146,10 +156,12 @@ "key": "favorability_friends_friend_name_40001", "text": "师徒二人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu07", + "img": "hgd_img_bg", "friends_lv": 3, - "favorability_lv": 15, + "favorability_lv": 6, "hid": "14002", + "hidimg": "hgd_role_14002", "attribute": [ { "a": "atk", @@ -173,10 +185,12 @@ "key": "favorability_friends_friend_name_102", "text": "师徒三人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu08", + "img": "hgd_img_bg", "friends_lv": 1, "favorability_lv": 1, "hid": "25001", + "hidimg": "hgd_role_25001", "attribute": [ { "a": "atkpro", @@ -200,10 +214,12 @@ "key": "favorability_friends_friend_name_102", "text": "师徒三人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu09", + "img": "hgd_img_bg", "friends_lv": 1, "favorability_lv": 1, "hid": "35001", + "hidimg": "hgd_role_35001", "attribute": [ { "a": "atk", @@ -227,10 +243,12 @@ "key": "favorability_friends_friend_name_102", "text": "师徒三人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu10", + "img": "hgd_img_bg", "friends_lv": 1, "favorability_lv": 1, "hid": "15004", + "hidimg": "hgd_role_15004", "attribute": [ { "a": "HP", @@ -254,10 +272,12 @@ "key": "favorability_friends_friend_name_102", "text": "师徒三人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu11", + "img": "hgd_img_bg", "friends_lv": 2, "favorability_lv": 9, "hid": "25001", + "hidimg": "hgd_role_25001", "attribute": [ { "a": "atkpro", @@ -281,10 +301,12 @@ "key": "favorability_friends_friend_name_102", "text": "师徒三人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu12", + "img": "hgd_img_bg", "friends_lv": 2, "favorability_lv": 9, "hid": "35001", + "hidimg": "hgd_role_35001", "attribute": [ { "a": "atk", @@ -308,10 +330,12 @@ "key": "favorability_friends_friend_name_102", "text": "师徒三人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu13", + "img": "hgd_img_bg", "friends_lv": 2, "favorability_lv": 9, "hid": "15004", + "hidimg": "hgd_role_15004", "attribute": [ { "a": "HP", @@ -335,10 +359,12 @@ "key": "favorability_friends_friend_name_102", "text": "师徒三人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu14", + "img": "hgd_img_bg", "friends_lv": 3, "favorability_lv": 15, "hid": "25001", + "hidimg": "hgd_role_25001", "attribute": [ { "a": "atkpro", @@ -362,10 +388,12 @@ "key": "favorability_friends_friend_name_102", "text": "师徒三人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu15", + "img": "hgd_img_bg", "friends_lv": 3, "favorability_lv": 15, "hid": "35001", + "hidimg": "hgd_role_35001", "attribute": [ { "a": "atk", @@ -389,10 +417,12 @@ "key": "favorability_friends_friend_name_102", "text": "师徒三人" }, - "png": "jiban_img_zu02", + "png": "jiban_img_zu16", + "img": "hgd_img_bg", "friends_lv": 3, "favorability_lv": 15, "hid": "15004", + "hidimg": "hgd_role_15004", "attribute": [ { "a": "HP", diff --git a/sys/configure/structs/Game.FriendsData.go b/sys/configure/structs/Game.FriendsData.go index afd00823f..f64fe30c0 100644 --- a/sys/configure/structs/Game.FriendsData.go +++ b/sys/configure/structs/Game.FriendsData.go @@ -17,9 +17,11 @@ type GameFriendsData struct { TypeName string FriendName string Png string + Img string FriendsLv int32 FavorabilityLv int32 Hid string + Hidimg string Attribute []*Gameatr AttributeTxt string } @@ -37,9 +39,11 @@ func (_v *GameFriendsData)Deserialize(_buf map[string]interface{}) (err error) { {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["type_name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TypeName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TypeName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["friend_name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.FriendName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.FriendName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } { var _ok_ bool; if _v.Png, _ok_ = _buf["png"].(string); !_ok_ { err = errors.New("png error"); return } } + { var _ok_ bool; if _v.Img, _ok_ = _buf["img"].(string); !_ok_ { err = errors.New("img error"); return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["friends_lv"].(float64); !_ok_ { err = errors.New("friends_lv error"); return }; _v.FriendsLv = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["favorability_lv"].(float64); !_ok_ { err = errors.New("favorability_lv error"); return }; _v.FavorabilityLv = int32(_tempNum_) } { var _ok_ bool; if _v.Hid, _ok_ = _buf["hid"].(string); !_ok_ { err = errors.New("hid error"); return } } + { var _ok_ bool; if _v.Hidimg, _ok_ = _buf["hidimg"].(string); !_ok_ { err = errors.New("hidimg error"); return } } { var _arr_ []interface{} var _ok_ bool From 8c72293119b71de083d0d9eca3aef877d51a474f Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 9 May 2023 15:22:54 +0800 Subject: [PATCH 10/14] =?UTF-8?q?=E5=85=A5=E6=A6=9C=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hunting/api_challengeover.go | 2 +- modules/viking/api_challengeover.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hunting/api_challengeover.go b/modules/hunting/api_challengeover.go index 7e38912d1..6a56ba40b 100644 --- a/modules/hunting/api_challengeover.go +++ b/modules/hunting/api_challengeover.go @@ -88,7 +88,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha } hunting.BossTime[key] = req.Report.Costtime // 耗时校验 当前战斗胜利时间消耗小于之前刷新数据 - if hunting.BossTime[key] > req.Report.Costtime || hunting.BossTime[key] == 0 && req.Difficulty >= hunting.Boss[req.BossType] { + if (hunting.BossTime[key] > req.Report.Costtime || hunting.BossTime[key] == 0) && req.Difficulty >= hunting.Boss[req.BossType] { mapData["bossTime"] = hunting.BossTime // 更新时间 userinfo := this.module.ModuleUser.GetUser(session.GetUserId()) diff --git a/modules/viking/api_challengeover.go b/modules/viking/api_challengeover.go index 48517bb89..db14bfac0 100644 --- a/modules/viking/api_challengeover.go +++ b/modules/viking/api_challengeover.go @@ -95,7 +95,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal } } - if viking.BossTime[key] > req.Report.Costtime || (viking.BossTime[key] == 0 && req.Difficulty >= viking.Boss[req.BossId]) { + if (viking.BossTime[key] > req.Report.Costtime || viking.BossTime[key] == 0) && req.Difficulty >= viking.Boss[req.BossId] { viking.BossTime[key] = req.Report.Costtime userinfo := this.module.ModuleUser.GetUser(session.GetUserId()) this.module.CheckRank(session.GetUserId(), req.BossId, req.Difficulty, req.Report, userinfo) From 72b1d99a192dc5716c63f8e50d94d743f8e4a4a5 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 9 May 2023 16:01:20 +0800 Subject: [PATCH 11/14] =?UTF-8?q?=E7=86=94=E5=B2=A9=E6=89=93=E9=80=A0?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E7=BC=BA=E5=B0=91=E7=86=94=E5=B2=A9=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/api_awaken.go | 3 ++- modules/smithy/api_forgeequip.go | 33 ++++++++++++++++---------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/modules/hero/api_awaken.go b/modules/hero/api_awaken.go index 14adf7e56..5cacfaa04 100644 --- a/modules/hero/api_awaken.go +++ b/modules/hero/api_awaken.go @@ -63,6 +63,7 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c code = pb.ErrorCode_ConfigNoFound return } + _hero.JuexingLv += 1 _value, ok := strconv.Atoi(awakenData.Phasebonus[0]) if ok == nil { // 升级技能 for pos, v := range _hero.NormalSkill { @@ -77,7 +78,7 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c } else { // 加属性 this.module.modelHero.resetJuexingProperty(_hero) } - _hero.JuexingLv += 1 + _heroMap["juexingLv"] = _hero.JuexingLv _heroMap["juexProperty"] = _hero.JuexProperty // 保存数据 diff --git a/modules/smithy/api_forgeequip.go b/modules/smithy/api_forgeequip.go index af1d998ed..0c5346e2f 100644 --- a/modules/smithy/api_forgeequip.go +++ b/modules/smithy/api_forgeequip.go @@ -19,16 +19,16 @@ func (this *apiComp) ForgeEquipCheck(session comm.IUserSession, req *pb.SmithyFo // 打造装备 func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEquipReq) (code pb.ErrorCode, data *pb.ErrorData) { var ( - stove *pb.DBStove - err error - update map[string]interface{} - addProbability int32 - costRes []*cfg.Gameatn - customLv int32 // 定制装备的等级 - rsp *pb.SmithyForgeEquipResp - needTemperatureCos int32 // 需要消耗的温度 - maxT int32 - atno []*pb.UserAtno + stove *pb.DBStove + err error + update map[string]interface{} + addProbability int32 + costRes []*cfg.Gameatn + customLv int32 // 定制装备的等级 + rsp *pb.SmithyForgeEquipResp + needT int32 // 需要消耗的温度 + maxT int32 + atno []*pb.UserAtno ) // 参数校验 if req.Count == 0 { // 传0 默认打造意见 @@ -84,19 +84,20 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq customLv = reelcfg.CustomizedLv[index] } } - needTemperatureCos = reelcfg.TemperatureCos * req.Count + needT = reelcfg.TemperatureCos * req.Count // 熟练度减少的温度 t := this.module.modelStove.CheckTemperature(req.ReelId, stove.Data[req.ReelId].Lv) - needTemperatureCos = needTemperatureCos * (1000 - t) / 1000 // 千分比 + needT = needT * (1000 - t) / 1000 // 千分比 // 工具台技能减少 _s := this.module.modelStove.StoveToolsTemperature(stove) if _s != 0 { - needTemperatureCos *= (1 - _s/1000) + needT *= (1 - _s/1000) } if req.Lava > 0 { // 熔岩打造 exemption := this.module.ModuleTools.GetGlobalConf().ExemptionTemperatureCos // 预计消耗温度 gloabNum := this.module.ModuleTools.GetGlobalConf().ExemptionTemperatureCosNum - if needTemperatureCos > req.Count*gloabNum { + if needT > req.Lava*gloabNum { + this.module.Errorf("ErrorCode_SmithyLackLava needT:%d,curT:%d,count :%d", needT, req.Count*gloabNum, req.Count) code = pb.ErrorCode_SmithyLackLava // 缺少熔岩 return } @@ -112,11 +113,11 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq costRes = append(costRes, lavaCost) } else { // 检查炉温 是否够 - if stove.Temperature < needTemperatureCos { + if stove.Temperature < needT { code = pb.ErrorCode_SmithyNoTemperature // 炉温不够 直接返回 return } - stove.Temperature -= needTemperatureCos // 消耗温度 + stove.Temperature -= needT // 消耗温度 update["temperature"] = stove.Temperature } From d0fed35a83cf3120ecde96df0c96b73e748d9008 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 9 May 2023 16:23:31 +0800 Subject: [PATCH 12/14] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=8B=B1=E9=9B=84?= =?UTF-8?q?=E8=B5=A0=E9=80=81=E9=A3=9F=E7=89=A9=E7=9A=84=E5=BC=80=E5=A7=8B?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/library/api_lvup.go | 19 +++++++++---------- modules/library/api_usegift.go | 9 +++++++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/modules/library/api_lvup.go b/modules/library/api_lvup.go index 6eb7f8bef..9bc6bd7f7 100644 --- a/modules/library/api_lvup.go +++ b/modules/library/api_lvup.go @@ -37,26 +37,25 @@ func (this *apiComp) FetterLvUp(session comm.IUserSession, req *pb.LibraryFetter totalFetterLv += _d.Favorlv } } - totalFetterLv = 0 - conf := this.module.configure.GetFriendData(fetter.Fid, fetter.Fidlv+1) + fetter.Fidlv += 1 + conf := this.module.configure.GetFriendData(fetter.Fid, fetter.Fidlv) if len(conf) == 0 { code = pb.ErrorCode_ConfigNoFound return - } else { - fetter.Fidlv += 1 - if conf[0].FavorabilityLv > totalFetterLv { - code = pb.ErrorCode_LibraryLvReward - return - } } - if _, ok := fetter.Prize[fetter.Fidlv]; ok { + + if conf[0].FavorabilityLv > totalFetterLv { + code = pb.ErrorCode_LibraryLvReward + return + } + + if _, ok := fetter.Prize[fetter.Fidlv]; !ok { code = pb.ErrorCode_LibraryReward return } fetter.Prize[fetter.Fidlv] = 1 // 发奖 - hProperty := make(map[string][]*cfg.Gameatr, 0) for _, v := range conf { var sz []*cfg.Gameatr diff --git a/modules/library/api_usegift.go b/modules/library/api_usegift.go index 3879be8f4..b2fa46fbe 100644 --- a/modules/library/api_usegift.go +++ b/modules/library/api_usegift.go @@ -3,6 +3,7 @@ package library import ( "go_dreamfactory/comm" "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/utils" ) @@ -64,10 +65,10 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe } } for i := sCount + 1; i <= sCount+req.Counts; i++ { - _heroObj.Givecount += 1 + addExp += attenuation[i] } - + _heroObj.Givecount += req.Counts // 校验是否是自己喜欢的食物 _c := this.module.configure.GetFavorability(_heroObj.Heroid, _heroObj.Favorlv) if _c == nil { @@ -133,6 +134,10 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe mapData["favorexp"] = _heroObj.Favorexp mapData["favorlv"] = _heroObj.Favorlv mapData["givecount"] = _heroObj.Givecount + if _heroObj.Ctime == 0 { // 记录刷新的时间 + _heroObj.Ctime = configure.Now().Unix() + mapData["ctime"] = _heroObj.Ctime + } this.module.modelFetter.modifyHeroFetterDataByObjId(session.GetUserId(), _heroObj.Id, mapData) rsp.Data = _heroObj session.SendMsg(string(this.module.GetType()), LibraryUseGiftResp, rsp) From d3d0c627ffec11e2352032d4bb9628b2921f3481 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 10 May 2023 10:29:52 +0800 Subject: [PATCH 13/14] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=AF=8F=E6=97=A5?= =?UTF-8?q?=E4=B8=80=E7=BB=83=E5=88=B7=E6=96=B0=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/practice/api_gymrefresh.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/practice/api_gymrefresh.go b/modules/practice/api_gymrefresh.go index ff07ac877..9d7291640 100644 --- a/modules/practice/api_gymrefresh.go +++ b/modules/practice/api_gymrefresh.go @@ -20,6 +20,7 @@ func (this *apiComp) GymRefresh(session comm.IUserSession, req *pb.PracticeGymRe err error room *pb.DBPracticeRoom confs []*cfg.GamePandamasMrylData + temp []*cfg.GamePandamasMrylData refreshAtns []*cfg.Gameatn atn *cfg.Gameatn ) @@ -46,11 +47,11 @@ func (this *apiComp) GymRefresh(session comm.IUserSession, req *pb.PracticeGymRe code = pb.ErrorCode_ConfigNoFound return } + temp = make([]*cfg.GamePandamasMrylData, 0) //过滤掉当前的buff - for i, v := range confs { - if v.Id == room.Gymaction { - confs = append(confs[0:i], confs[i+1:]...) - break + for _, v := range confs { + if v.Id != room.Gymaction { + temp = append(temp, v) } } if len(confs) == 0 { @@ -58,7 +59,7 @@ func (this *apiComp) GymRefresh(session comm.IUserSession, req *pb.PracticeGymRe return } r := rand.New(rand.NewSource(configure.Now().Unix())) - room.Gymaction = confs[r.Perm(len(confs))[0]].Id + room.Gymaction = temp[r.Perm(len(temp))[0]].Id room.Gymrefresh++ room.Lastrefresh = configure.Now().Unix() this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{ From 72867cea6e9c1fa33c752e60fe4d7941cd4f45c0 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 10 May 2023 10:30:53 +0800 Subject: [PATCH 14/14] =?UTF-8?q?=E6=89=93=E9=80=A0=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E5=8D=87=E5=A4=9A=E7=BA=A7=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithy/api_forgeequip.go | 38 ++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/modules/smithy/api_forgeequip.go b/modules/smithy/api_forgeequip.go index 0c5346e2f..082ed9b02 100644 --- a/modules/smithy/api_forgeequip.go +++ b/modules/smithy/api_forgeequip.go @@ -237,29 +237,35 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq stove.Data[req.ReelId].Value += req.Count stove.Forge[req.ReelId] += req.Count + // 可能存在一次升多级的情况 // 检查是否提升了熟练度等级 - nextProficiency := this.module.configure.GetSmithyProficileData(req.ReelId, stove.Data[req.ReelId].Lv+1) - if nextProficiency != nil && nextProficiency.Proficiency <= stove.Data[req.ReelId].Value { // 提升熟练度 - stove.Data[req.ReelId].Lv += 1 + for { + nextProficiency := this.module.configure.GetSmithyProficileData(req.ReelId, stove.Data[req.ReelId].Lv+1) + if nextProficiency != nil && nextProficiency.Proficiency <= stove.Data[req.ReelId].Value { // 提升熟练度 + stove.Data[req.ReelId].Lv += 1 - // 校验是否解锁了新的图纸 - if nextProficiency.Type == comm.SmithyReelType3 { - stove.Data[nextProficiency.Value1] = &pb.Mastery{ - Lv: 1, - Value: 0, + // 校验是否解锁了新的图纸 + if nextProficiency.Type == comm.SmithyReelType3 { + stove.Data[nextProficiency.Value1] = &pb.Mastery{ + Lv: 1, + Value: 0, + } } - } - // 是否解锁新套装 - if nextProficiency.Type == comm.SmithyReelType4 { - if rst, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil { - rst.SuiteId = append(rst.SuiteId, nextProficiency.Value1) + // 是否解锁新套装 + if nextProficiency.Type == comm.SmithyReelType4 { + if rst, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil { + rst.SuiteId = append(rst.SuiteId, nextProficiency.Value1) - this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{ - "suiteId": rst.SuiteId, - }) + this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{ + "suiteId": rst.SuiteId, + }) + } } + } else { + break } } + update["data"] = stove.Data update["forge"] = stove.Forge // 打造次数