diff --git a/bin/json/game_pagodataskreward.json b/bin/json/game_pagodataskreward.json index add5984ad..17989e44d 100644 --- a/bin/json/game_pagodataskreward.json +++ b/bin/json/game_pagodataskreward.json @@ -2,9 +2,7 @@ { "key": 1, "pagoda_type": 1, - "layer_num": [ - 10 - ], + "layer_num": 10, "reward": [ { "a": "attr", @@ -16,9 +14,7 @@ { "key": 2, "pagoda_type": 1, - "layer_num": [ - 20 - ], + "layer_num": 20, "reward": [ { "a": "attr", @@ -30,9 +26,7 @@ { "key": 3, "pagoda_type": 1, - "layer_num": [ - 30 - ], + "layer_num": 30, "reward": [ { "a": "attr", @@ -44,9 +38,7 @@ { "key": 4, "pagoda_type": 1, - "layer_num": [ - 40 - ], + "layer_num": 40, "reward": [ { "a": "attr", @@ -58,9 +50,7 @@ { "key": 5, "pagoda_type": 1, - "layer_num": [ - 50 - ], + "layer_num": 50, "reward": [ { "a": "attr", @@ -72,9 +62,7 @@ { "key": 6, "pagoda_type": 1, - "layer_num": [ - 60 - ], + "layer_num": 60, "reward": [ { "a": "attr", @@ -86,9 +74,7 @@ { "key": 7, "pagoda_type": 1, - "layer_num": [ - 70 - ], + "layer_num": 70, "reward": [ { "a": "attr", @@ -100,9 +86,7 @@ { "key": 8, "pagoda_type": 1, - "layer_num": [ - 80 - ], + "layer_num": 80, "reward": [ { "a": "attr", @@ -114,9 +98,7 @@ { "key": 9, "pagoda_type": 1, - "layer_num": [ - 90 - ], + "layer_num": 90, "reward": [ { "a": "attr", @@ -128,9 +110,7 @@ { "key": 10, "pagoda_type": 1, - "layer_num": [ - 100 - ], + "layer_num": 100, "reward": [ { "a": "attr", @@ -142,9 +122,7 @@ { "key": 11, "pagoda_type": 2, - "layer_num": [ - 5 - ], + "layer_num": 5, "reward": [ { "a": "attr", @@ -156,9 +134,7 @@ { "key": 12, "pagoda_type": 2, - "layer_num": [ - 10 - ], + "layer_num": 10, "reward": [ { "a": "attr", @@ -170,9 +146,7 @@ { "key": 13, "pagoda_type": 2, - "layer_num": [ - 15 - ], + "layer_num": 15, "reward": [ { "a": "attr", @@ -184,9 +158,7 @@ { "key": 14, "pagoda_type": 2, - "layer_num": [ - 20 - ], + "layer_num": 20, "reward": [ { "a": "attr", @@ -198,9 +170,7 @@ { "key": 15, "pagoda_type": 2, - "layer_num": [ - 25 - ], + "layer_num": 25, "reward": [ { "a": "attr", @@ -212,9 +182,7 @@ { "key": 16, "pagoda_type": 2, - "layer_num": [ - 30 - ], + "layer_num": 30, "reward": [ { "a": "attr", @@ -226,9 +194,7 @@ { "key": 17, "pagoda_type": 2, - "layer_num": [ - 35 - ], + "layer_num": 35, "reward": [ { "a": "attr", @@ -240,9 +206,7 @@ { "key": 18, "pagoda_type": 2, - "layer_num": [ - 40 - ], + "layer_num": 40, "reward": [ { "a": "attr", @@ -254,9 +218,7 @@ { "key": 19, "pagoda_type": 2, - "layer_num": [ - 45 - ], + "layer_num": 45, "reward": [ { "a": "attr", @@ -268,9 +230,7 @@ { "key": 20, "pagoda_type": 2, - "layer_num": [ - 50 - ], + "layer_num": 50, "reward": [ { "a": "attr", diff --git a/comm/const.go b/comm/const.go index 3fb3d00e9..64e6ec3f2 100644 --- a/comm/const.go +++ b/comm/const.go @@ -88,6 +88,8 @@ const ( TableEquipment = "equipment" ///聊天数据表 TableChat = "chat" + // 爬塔数据表 + TablePagoda = "pagoda" ) //RPC服务接口定义处 diff --git a/modules/pagoda/api.go b/modules/pagoda/api.go index f9cc0c835..e22631068 100644 --- a/modules/pagoda/api.go +++ b/modules/pagoda/api.go @@ -6,10 +6,9 @@ import ( ) const ( - MainlineGetListResp = "getlist" - MainlineChallengeResp = "challenge" - MainlineGetRewardResp = "getreward" - MainlineNewChapterPush = "newchapter" + PagodaGetListResp = "getlist" + PagodaChallengeResp = "challenge" + PagodaGetRewardResp = "getreward" ) type apiComp struct { diff --git a/modules/pagoda/api_challenge.go b/modules/pagoda/api_challenge.go index 500c74d76..003ffc5cf 100644 --- a/modules/pagoda/api_challenge.go +++ b/modules/pagoda/api_challenge.go @@ -8,8 +8,8 @@ import ( ) //参数校验 -func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode) { - if req.MainlineId == 0 { +func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.PagodaChallengeReq) (code pb.ErrorCode) { + if req.LevelID <= 0 { code = pb.ErrorCode_ReqParameterError return } @@ -17,7 +17,7 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineC } ///挑战主线关卡 -func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode, data proto.Message) { +func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChallengeReq) (code pb.ErrorCode, data proto.Message) { code = this.ChallengeCheck(session, req) if code != pb.ErrorCode_Success { diff --git a/modules/pagoda/api_getReward.go b/modules/pagoda/api_getReward.go index 7fb941437..e2b3ffa55 100644 --- a/modules/pagoda/api_getReward.go +++ b/modules/pagoda/api_getReward.go @@ -8,15 +8,15 @@ import ( ) //参数校验 -func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.MainlineGetRewardReq) (code pb.ErrorCode) { - if req.ChapterObj == "" { +func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.PagodaGetRewardReq) (code pb.ErrorCode) { + if req.Id <= 0 { code = pb.ErrorCode_ReqParameterError } return } ///获取主线关卡信息 -func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MainlineGetRewardReq) (code pb.ErrorCode, data proto.Message) { +func (this *apiComp) GetReward(session comm.IUserSession, req *pb.PagodaGetRewardReq) (code pb.ErrorCode, data proto.Message) { code = this.GetRewardCheck(session, req) if code != pb.ErrorCode_Success { diff --git a/modules/pagoda/api_getlist.go b/modules/pagoda/api_getlist.go index 2fca609d3..e3e11b036 100644 --- a/modules/pagoda/api_getlist.go +++ b/modules/pagoda/api_getlist.go @@ -9,15 +9,14 @@ import ( ) //参数校验 -func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode) { +func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.PagodaGetListReq) (code pb.ErrorCode) { return } ///获取主线关卡信息 -func (this *apiComp) GetList(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode, data proto.Message) { - rsp := &pb.MainlineGetListResp{} - +func (this *apiComp) GetList(session comm.IUserSession, req *pb.PagodaGetListReq) (code pb.ErrorCode, data proto.Message) { + _data := &pb.DBPagoda{} code = this.GetListCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 @@ -28,19 +27,17 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.MainlineGetListR code = pb.ErrorCode_DBError return } - if len(list) == 0 { // 如果数量为0 则默认创建一条数据 - _data := &pb.DBMainline{} + if list == nil { // redis没有数据 + _data.Id = primitive.NewObjectID().Hex() - _data.ChapterId = 1 // 默认第一章节 + _mData := make(map[string]interface{}, 0) _data.Uid = session.GetUserId() _mData[_data.Id] = _data - this.module.modelPagoda.addNewPagoda(session.GetUserId(), _mData) - list = append(list, _data) - } - rsp.Data = list - session.SendMsg(string(this.module.GetType()), MainlineGetListResp, &pb.MainlineGetListResp{Data: rsp.Data}) + } + + session.SendMsg(string(this.module.GetType()), PagodaGetListResp, &pb.PagodaGetListResp{Data: _data}) return } diff --git a/modules/pagoda/model_pagoda.go b/modules/pagoda/model_pagoda.go index 673a0904b..ef0516b96 100644 --- a/modules/pagoda/model_pagoda.go +++ b/modules/pagoda/model_pagoda.go @@ -1,32 +1,34 @@ package pagoda import ( + "go_dreamfactory/comm" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/redis" "go_dreamfactory/modules" "go_dreamfactory/pb" ) -const ( //Redis - TablePagoda core.SqlTable = "pagoda" -) - type ModelPagoda struct { modules.MCompModel module *Pagoda } func (this *ModelPagoda) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + this.TableName = string(comm.TablePagoda) err = this.MCompModel.Init(service, module, comp, options) this.module = module.(*Pagoda) - this.TableName = string(TablePagoda) + return } // 获取爬塔信息 -func (this *ModelPagoda) getPagodaList(uid string) (storys []*pb.DBMainline, err error) { - storys = make([]*pb.DBMainline, 0) - err = this.GetList(uid, &storys) - return +func (this *ModelPagoda) getPagodaList(uid string) (result *pb.DBPagoda, err error) { + result = &pb.DBPagoda{} + if err = this.Get(uid, result); err != nil && redis.RedisNil != err { + return + } + err = nil + return result, err } // 修改爬塔数据信息 @@ -43,14 +45,3 @@ func (this *ModelPagoda) addNewPagoda(uId string, data map[string]interface{}) ( } return nil } - -// 获取指定塔数据 -func (this *ModelPagoda) getPagodaByObjId(uid, obj string) *pb.DBMainline { - data := &pb.DBMainline{} - err := this.GetListObj(uid, obj, data) - if err != nil { - this.module.Errorf("%v", err) - return nil - } - return data -} diff --git a/pb/pagoda_db.pb.go b/pb/pagoda_db.pb.go new file mode 100644 index 000000000..18b74c259 --- /dev/null +++ b/pb/pagoda_db.pb.go @@ -0,0 +1,176 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: pagoda/pagoda_db.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DBPagoda struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID + PagodaId int32 `protobuf:"varint,3,opt,name=pagodaId,proto3" json:"pagodaId" bson:"chapterId"` //塔层 + Reward map[int32]bool `protobuf:"bytes,4,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 是否领奖 +} + +func (x *DBPagoda) Reset() { + *x = DBPagoda{} + if protoimpl.UnsafeEnabled { + mi := &file_pagoda_pagoda_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBPagoda) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBPagoda) ProtoMessage() {} + +func (x *DBPagoda) ProtoReflect() protoreflect.Message { + mi := &file_pagoda_pagoda_db_proto_msgTypes[0] + 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 DBPagoda.ProtoReflect.Descriptor instead. +func (*DBPagoda) Descriptor() ([]byte, []int) { + return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{0} +} + +func (x *DBPagoda) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBPagoda) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBPagoda) GetPagodaId() int32 { + if x != nil { + return x.PagodaId + } + return 0 +} + +func (x *DBPagoda) GetReward() map[int32]bool { + if x != nil { + return x.Reward + } + return nil +} + +var File_pagoda_pagoda_db_proto protoreflect.FileDescriptor + +var file_pagoda_pagoda_db_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x2f, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x5f, + 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x50, + 0x61, 0x67, 0x6f, 0x64, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x6f, 0x64, + 0x61, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x6f, 0x64, + 0x61, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x2e, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pagoda_pagoda_db_proto_rawDescOnce sync.Once + file_pagoda_pagoda_db_proto_rawDescData = file_pagoda_pagoda_db_proto_rawDesc +) + +func file_pagoda_pagoda_db_proto_rawDescGZIP() []byte { + file_pagoda_pagoda_db_proto_rawDescOnce.Do(func() { + file_pagoda_pagoda_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_pagoda_pagoda_db_proto_rawDescData) + }) + return file_pagoda_pagoda_db_proto_rawDescData +} + +var file_pagoda_pagoda_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_pagoda_pagoda_db_proto_goTypes = []interface{}{ + (*DBPagoda)(nil), // 0: DBPagoda + nil, // 1: DBPagoda.RewardEntry +} +var file_pagoda_pagoda_db_proto_depIdxs = []int32{ + 1, // 0: DBPagoda.reward:type_name -> DBPagoda.RewardEntry + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_pagoda_pagoda_db_proto_init() } +func file_pagoda_pagoda_db_proto_init() { + if File_pagoda_pagoda_db_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pagoda_pagoda_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBPagoda); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pagoda_pagoda_db_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pagoda_pagoda_db_proto_goTypes, + DependencyIndexes: file_pagoda_pagoda_db_proto_depIdxs, + MessageInfos: file_pagoda_pagoda_db_proto_msgTypes, + }.Build() + File_pagoda_pagoda_db_proto = out.File + file_pagoda_pagoda_db_proto_rawDesc = nil + file_pagoda_pagoda_db_proto_goTypes = nil + file_pagoda_pagoda_db_proto_depIdxs = nil +} diff --git a/pb/pagoda_msg.pb.go b/pb/pagoda_msg.pb.go new file mode 100644 index 000000000..140874f2e --- /dev/null +++ b/pb/pagoda_msg.pb.go @@ -0,0 +1,457 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: pagoda/pagoda_msg.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// 查询塔进度 +type PagodaGetListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PagodaGetListReq) Reset() { + *x = PagodaGetListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PagodaGetListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PagodaGetListReq) ProtoMessage() {} + +func (x *PagodaGetListReq) ProtoReflect() protoreflect.Message { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[0] + 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 PagodaGetListReq.ProtoReflect.Descriptor instead. +func (*PagodaGetListReq) Descriptor() ([]byte, []int) { + return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{0} +} + +// 返回进度信息 +type PagodaGetListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBPagoda `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *PagodaGetListResp) Reset() { + *x = PagodaGetListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PagodaGetListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PagodaGetListResp) ProtoMessage() {} + +func (x *PagodaGetListResp) ProtoReflect() protoreflect.Message { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[1] + 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 PagodaGetListResp.ProtoReflect.Descriptor instead. +func (*PagodaGetListResp) Descriptor() ([]byte, []int) { + return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{1} +} + +func (x *PagodaGetListResp) GetData() *DBPagoda { + if x != nil { + return x.Data + } + return nil +} + +// 领取关卡宝箱 +type PagodaGetRewardReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` // 对应 task_reward 表中的id +} + +func (x *PagodaGetRewardReq) Reset() { + *x = PagodaGetRewardReq{} + if protoimpl.UnsafeEnabled { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PagodaGetRewardReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PagodaGetRewardReq) ProtoMessage() {} + +func (x *PagodaGetRewardReq) ProtoReflect() protoreflect.Message { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[2] + 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 PagodaGetRewardReq.ProtoReflect.Descriptor instead. +func (*PagodaGetRewardReq) Descriptor() ([]byte, []int) { + return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{2} +} + +func (x *PagodaGetRewardReq) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +type PagodaGetRewardResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBPagoda `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *PagodaGetRewardResp) Reset() { + *x = PagodaGetRewardResp{} + if protoimpl.UnsafeEnabled { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PagodaGetRewardResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PagodaGetRewardResp) ProtoMessage() {} + +func (x *PagodaGetRewardResp) ProtoReflect() protoreflect.Message { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[3] + 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 PagodaGetRewardResp.ProtoReflect.Descriptor instead. +func (*PagodaGetRewardResp) Descriptor() ([]byte, []int) { + return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{3} +} + +func (x *PagodaGetRewardResp) GetData() *DBPagoda { + if x != nil { + return x.Data + } + return nil +} + +// 挑战 +type PagodaChallengeReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LevelID int32 `protobuf:"varint,1,opt,name=levelID,proto3" json:"levelID"` // 挑战的关卡ID +} + +func (x *PagodaChallengeReq) Reset() { + *x = PagodaChallengeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PagodaChallengeReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PagodaChallengeReq) ProtoMessage() {} + +func (x *PagodaChallengeReq) ProtoReflect() protoreflect.Message { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[4] + 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 PagodaChallengeReq.ProtoReflect.Descriptor instead. +func (*PagodaChallengeReq) Descriptor() ([]byte, []int) { + return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{4} +} + +func (x *PagodaChallengeReq) GetLevelID() int32 { + if x != nil { + return x.LevelID + } + return 0 +} + +type PagodaChallengeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBPagoda `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *PagodaChallengeResp) Reset() { + *x = PagodaChallengeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PagodaChallengeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PagodaChallengeResp) ProtoMessage() {} + +func (x *PagodaChallengeResp) ProtoReflect() protoreflect.Message { + mi := &file_pagoda_pagoda_msg_proto_msgTypes[5] + 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 PagodaChallengeResp.ProtoReflect.Descriptor instead. +func (*PagodaChallengeResp) Descriptor() ([]byte, []int) { + return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{5} +} + +func (x *PagodaChallengeResp) GetData() *DBPagoda { + if x != nil { + return x.Data + } + return nil +} + +var File_pagoda_pagoda_msg_proto protoreflect.FileDescriptor + +var file_pagoda_pagoda_msg_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x2f, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x5f, + 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x61, 0x67, 0x6f, 0x64, + 0x61, 0x2f, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, 0x65, 0x74, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, + 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, + 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x24, 0x0a, 0x12, 0x50, 0x61, 0x67, + 0x6f, 0x64, 0x61, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x34, 0x0a, 0x13, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, + 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x49, 0x44, 0x22, 0x34, 0x0a, 0x13, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, + 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x50, + 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pagoda_pagoda_msg_proto_rawDescOnce sync.Once + file_pagoda_pagoda_msg_proto_rawDescData = file_pagoda_pagoda_msg_proto_rawDesc +) + +func file_pagoda_pagoda_msg_proto_rawDescGZIP() []byte { + file_pagoda_pagoda_msg_proto_rawDescOnce.Do(func() { + file_pagoda_pagoda_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_pagoda_pagoda_msg_proto_rawDescData) + }) + return file_pagoda_pagoda_msg_proto_rawDescData +} + +var file_pagoda_pagoda_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_pagoda_pagoda_msg_proto_goTypes = []interface{}{ + (*PagodaGetListReq)(nil), // 0: PagodaGetListReq + (*PagodaGetListResp)(nil), // 1: PagodaGetListResp + (*PagodaGetRewardReq)(nil), // 2: PagodaGetRewardReq + (*PagodaGetRewardResp)(nil), // 3: PagodaGetRewardResp + (*PagodaChallengeReq)(nil), // 4: PagodaChallengeReq + (*PagodaChallengeResp)(nil), // 5: PagodaChallengeResp + (*DBPagoda)(nil), // 6: DBPagoda +} +var file_pagoda_pagoda_msg_proto_depIdxs = []int32{ + 6, // 0: PagodaGetListResp.data:type_name -> DBPagoda + 6, // 1: PagodaGetRewardResp.data:type_name -> DBPagoda + 6, // 2: PagodaChallengeResp.data:type_name -> DBPagoda + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_pagoda_pagoda_msg_proto_init() } +func file_pagoda_pagoda_msg_proto_init() { + if File_pagoda_pagoda_msg_proto != nil { + return + } + file_pagoda_pagoda_db_proto_init() + if !protoimpl.UnsafeEnabled { + file_pagoda_pagoda_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PagodaGetListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pagoda_pagoda_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PagodaGetListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pagoda_pagoda_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PagodaGetRewardReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pagoda_pagoda_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PagodaGetRewardResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pagoda_pagoda_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PagodaChallengeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pagoda_pagoda_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PagodaChallengeResp); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pagoda_pagoda_msg_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pagoda_pagoda_msg_proto_goTypes, + DependencyIndexes: file_pagoda_pagoda_msg_proto_depIdxs, + MessageInfos: file_pagoda_pagoda_msg_proto_msgTypes, + }.Build() + File_pagoda_pagoda_msg_proto = out.File + file_pagoda_pagoda_msg_proto_rawDesc = nil + file_pagoda_pagoda_msg_proto_goTypes = nil + file_pagoda_pagoda_msg_proto_depIdxs = nil +}