From 802a322f2a13ca7349b2d4126470371002278ed5 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 8 Nov 2022 10:26:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B5=9B=E5=AD=A3=E5=A1=94=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=89=8B=E5=8A=A8=E6=BF=80=E6=B4=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/pagoda/api_challengeover.go | 51 +++++++---------------------- 1 file changed, 12 insertions(+), 39 deletions(-) diff --git a/modules/pagoda/api_challengeover.go b/modules/pagoda/api_challengeover.go index 9c0d5d066..8902afa99 100644 --- a/modules/pagoda/api_challengeover.go +++ b/modules/pagoda/api_challengeover.go @@ -7,7 +7,6 @@ import ( "strconv" "time" - "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "google.golang.org/protobuf/proto" ) @@ -24,10 +23,9 @@ func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.Pagod ///挑战主线关卡 func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChallengeOverReq) (code pb.ErrorCode, data proto.Message) { var ( - mapData map[string]interface{} - pagoda *pb.DBPagoda - seasonPagoda *pb.DBSeasonPagoda - costTime int32 // 本次战斗消耗的时间 + mapData map[string]interface{} + pagoda *pb.DBPagoda + costTime int32 // 本次战斗消耗的时间 ) mapData = make(map[string]interface{}, 0) code = this.ChallengeOverCheck(session, req) @@ -58,12 +56,12 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal } } else { // 塔数据校验 - seasonPagoda, err = this.module.modelSeasonPagoda.getSeasonPagodaList(session.GetUserId()) + pagoda, err = this.module.modelSeasonPagoda.getSeasonPagodaList(session.GetUserId()) if err != nil { code = pb.ErrorCode_PagodaNotFound return } - if seasonPagoda.Type != req.PagodaType || conf.LayerNum-1 != seasonPagoda.PagodaId { + if pagoda.Type != req.PagodaType || conf.LayerNum-1 != pagoda.PagodaId { code = pb.ErrorCode_PagodaLevlErr // 挑战关卡数据不匹配 return } @@ -119,32 +117,15 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal } // 普通塔通关了 Nomalcfg := this.module.configure.GetPagodaConfigData(comm.PagodaType, pagoda.PagodaId+1) - if Nomalcfg == nil { // 创建赛季塔数据 + if Nomalcfg == nil { // 修改expand 数据 update := map[string]interface{}{ "completePagoda": true, } this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), update) - seasonPagoda := &pb.DBSeasonPagoda{} - seasonPagoda.Id = primitive.NewObjectID().Hex() - - seasonPagoda.Uid = session.GetUserId() - seasonPagoda.PagodaId = 0 // 初始数据0层 - - if conn, err := db.Cross(); err == nil { - rst := conn.Mgo.FindOne(comm.TableServerData, bson.M{}) - server := &pb.DBServerData{} - rst.Decode(server) - seasonPagoda.Type = server.SeasonType // 动态获取塔数据 - } - this.module.modelSeasonPagoda.addNewSeasonPagoda(session.GetUserId(), seasonPagoda) - // 推送新的 - pagoda.PagodaId = seasonPagoda.PagodaId - pagoda.Type = seasonPagoda.Type - session.SendMsg(string(this.module.GetType()), PagodaGetListResp, &pb.PagodaGetListResp{Data: pagoda}) } } else { - seasonPagoda.PagodaId = conf.LayerNum + pagoda.PagodaId = conf.LayerNum mapData["pagodaId"] = conf.LayerNum // 记录爬塔明细数据 if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { @@ -164,8 +145,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal newData := &pb.DBPagodaRecord{ Id: primitive.NewObjectID().Hex(), Uid: session.GetUserId(), - PagodaId: seasonPagoda.PagodaId, - Type: seasonPagoda.Type, + PagodaId: pagoda.PagodaId, + Type: pagoda.Type, Nickname: userinfo.Name, Icon: "", // icon 暂无 Lv: userinfo.Lv, @@ -175,24 +156,16 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal // 数据写到跨服中 conn_, err := db.Cross() dbModel := db.NewDBModel(comm.TableSeasonRecord, time.Hour, conn_) - //if err = dbModel.GetList(uid, newData); err == nil { dbModel.AddList(uid, newData.Id, newData) this.module.SetPagodaRankList("pagodaList"+strconv.Itoa(int(newData.PagodaId)), newData.CostTime, newData.Id) - //} dbModelTable := db.NewDBModel(comm.TableSeasonPagoda, time.Hour, conn_) - if err = dbModelTable.Get(session.GetUserId(), seasonPagoda); err == nil { + if err = dbModelTable.Get(session.GetUserId(), pagoda); err == nil { dbModelTable.Change(session.GetUserId(), mapData) // 修改跨服数据 - this.module.SetPagodaRankList("pagodaSeasonRank", seasonPagoda.PagodaId<<8+costTime, session.GetUserId()) + this.module.SetPagodaRankList("pagodaSeasonRank", pagoda.PagodaId<<8+costTime, session.GetUserId()) } } code = this.module.ModifySeasonPagodaData(session.GetUserId(), mapData) - pagoda = &pb.DBPagoda{ - Id: seasonPagoda.Id, - Uid: seasonPagoda.Uid, - PagodaId: seasonPagoda.PagodaId, - Reward: seasonPagoda.Reward, - Type: seasonPagoda.Type, - } + session.SendMsg(string(this.module.GetType()), PagodaChallengeOverResp, &pb.PagodaChallengeOverResp{Data: pagoda}) } From faea3b1549c12ea501deaa0a6b86fe0a49c4dd2c Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 8 Nov 2022 10:27:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B5=9B=E5=AD=A3=E5=A1=94=E9=9C=80?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E6=BF=80=E6=B4=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/pagoda/api_activate.go | 56 ++++++++ modules/pagoda/api_getlist.go | 21 +-- modules/pagoda/model_rank.go | 2 +- modules/pagoda/model_seasonpagoda.go | 6 +- modules/timer/season.go | 48 +------ modules/troll/api_getlist.go | 3 +- pb/pagoda_db.pb.go | 185 +++++++-------------------- 7 files changed, 107 insertions(+), 214 deletions(-) create mode 100644 modules/pagoda/api_activate.go diff --git a/modules/pagoda/api_activate.go b/modules/pagoda/api_activate.go new file mode 100644 index 000000000..3dcced3c2 --- /dev/null +++ b/modules/pagoda/api_activate.go @@ -0,0 +1,56 @@ +package pagoda + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + "go_dreamfactory/sys/db" + + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) ActivateCheck(session comm.IUserSession, req *pb.PagodaActivateReq) (code pb.ErrorCode) { + + return +} + +///获取主线关卡信息 +func (this *apiComp) Activate(session comm.IUserSession, req *pb.PagodaActivateReq) (code pb.ErrorCode, data proto.Message) { + var ( + list *pb.DBPagoda + ) + this.ActivateCheck(session, req) + expand, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + if expand.CompletePagoda { // 普通塔 + season, _ := this.module.modelSeasonPagoda.getSeasonPagodaList(session.GetUserId()) + if season.Id == "" { + season.Id = primitive.NewObjectID().Hex() + season.Uid = session.GetUserId() + season.PagodaId = 0 // 初始数据0层 + if conn, err := db.Cross(); err == nil { + rst := conn.Mgo.FindOne(comm.TableServerData, bson.M{}) + server := &pb.DBServerData{} + rst.Decode(server) + season.Type = server.SeasonType + } + this.module.modelSeasonPagoda.addNewSeasonPagoda(session.GetUserId(), season) + } + + list = &pb.DBPagoda{ + Id: season.Id, + Uid: season.Uid, + PagodaId: season.PagodaId, + Reward: season.Reward, + Type: season.Type, + } + } + + session.SendMsg(string(this.module.GetType()), PagodaGetListResp, &pb.PagodaGetListResp{Data: list}) + return +} diff --git a/modules/pagoda/api_getlist.go b/modules/pagoda/api_getlist.go index 569cbf36f..c4accec01 100644 --- a/modules/pagoda/api_getlist.go +++ b/modules/pagoda/api_getlist.go @@ -3,9 +3,7 @@ package pagoda import ( "go_dreamfactory/comm" "go_dreamfactory/pb" - "go_dreamfactory/sys/db" - "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "google.golang.org/protobuf/proto" ) @@ -41,24 +39,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.PagodaGetListReq } else { season, _ := this.module.modelSeasonPagoda.getSeasonPagodaList(session.GetUserId()) if season.Id == "" { - season.Id = primitive.NewObjectID().Hex() - season.Uid = session.GetUserId() - season.PagodaId = 0 // 初始数据0层 - if conn, err := db.Cross(); err == nil { - rst := conn.Mgo.FindOne(comm.TableServerData, bson.M{}) - server := &pb.DBServerData{} - rst.Decode(server) - season.Type = server.SeasonType - } - this.module.modelSeasonPagoda.addNewSeasonPagoda(session.GetUserId(), season) - } - - list = &pb.DBPagoda{ - Id: season.Id, - Uid: season.Uid, - PagodaId: season.PagodaId, - Reward: season.Reward, - Type: season.Type, + list.Complete = true } } diff --git a/modules/pagoda/model_rank.go b/modules/pagoda/model_rank.go index 421afef6b..759ebf9bc 100644 --- a/modules/pagoda/model_rank.go +++ b/modules/pagoda/model_rank.go @@ -80,7 +80,7 @@ func (this *ModelRank) getPagodaRankList(uid string) []*pb.DBPagodaRecord { } // 插入新的排行数据 -func (this *ModelRank) addPagodaRankList(session comm.IUserSession, data *pb.DBSeasonPagoda, Leadpos int32, line []*pb.LineUp, costTime int32) { +func (this *ModelRank) addPagodaRankList(session comm.IUserSession, data *pb.DBPagoda, Leadpos int32, line []*pb.LineUp, costTime int32) { uid := session.GetUserId() var ( dbModel *db.DBModel diff --git a/modules/pagoda/model_seasonpagoda.go b/modules/pagoda/model_seasonpagoda.go index 460c2d7ad..dd83c0d83 100644 --- a/modules/pagoda/model_seasonpagoda.go +++ b/modules/pagoda/model_seasonpagoda.go @@ -32,8 +32,8 @@ func (this *ModelSeasonPagoda) Init(service core.IService, module core.IModule, } // 获取爬塔信息 -func (this *ModelSeasonPagoda) getSeasonPagodaList(uid string) (result *pb.DBSeasonPagoda, err error) { - result = &pb.DBSeasonPagoda{} +func (this *ModelSeasonPagoda) getSeasonPagodaList(uid string) (result *pb.DBPagoda, err error) { + result = &pb.DBPagoda{} if err = this.Get(uid, result); err != nil { return @@ -48,7 +48,7 @@ func (this *ModelSeasonPagoda) modifySeasonPagodaDataByObjId(uid string, data ma } // 创建一个新的赛季塔数据 -func (this *ModelSeasonPagoda) addNewSeasonPagoda(uId string, data *pb.DBSeasonPagoda) (err error) { +func (this *ModelSeasonPagoda) addNewSeasonPagoda(uId string, data *pb.DBPagoda) (err error) { //err = this.InsertModelLogs(this.TableName, uId, []interface{}{data}) // 不需要经过redis if err = this.Add(uId, data); err != nil { this.module.Errorf("err:%v", err) diff --git a/modules/timer/season.go b/modules/timer/season.go index 903db58c8..76367e63e 100644 --- a/modules/timer/season.go +++ b/modules/timer/season.go @@ -62,7 +62,7 @@ func (this *SeasonPagoda) Start() (err error) { return } func (this *SeasonPagoda) CreatTestData(index int) { - seasonPagoda := &pb.DBSeasonPagoda{} + seasonPagoda := &pb.DBPagoda{} seasonPagoda.Id = primitive.NewObjectID().Hex() seasonPagoda.Uid = "dfmxf_634f8f28609d489230fb40fa" @@ -166,49 +166,3 @@ func (this *SeasonPagoda) TimerSeasonOver() { func (this *SeasonPagoda) TimerSeasonStar() { this.module.Debugf("TimerSeasonStar:%d", time.Now().Unix()) } - -// 测试用 后面删 -func (this *SeasonPagoda) TestFunc() { - // newData1 := &pb.DBSeasonPagoda{ - // Id: primitive.NewObjectID().Hex(), - // Uid: "sdsdassd", - // PagodaId: 1, - // Reward: map[int32]bool{}, - // Type: 201, - // } - // if conn, err := db.Cross(); err == nil { - // rst, err := conn.Mgo.InsertOne(comm.TableSeasonPagoda, newData) - - // fmt.Printf("%v,%v", rst, err) - // } - // _data := this.GetSeasonLoop(2) - // this.module.Debugf("%v", _data) - // for i := 0; i < 10000; i++ { - // this.CreatTestData(i) - // } - - // if conn, err := db.Cross(); err == nil { - // rst := conn.Mgo.FindOne(comm.TableServerData, bson.M{}) - // server := &pb.DBServerData{} - // rst.Decode(server) - // fmt.Printf("%v", server) - // } - - // newData := &pb.DBPagodaRecord{ - // Id: primitive.NewObjectID().Hex(), - // Uid: "sdsd", - // PagodaId: 1, - // Type: 2, - // Nickname: "userinfo.Name", - // Icon: "", // icon 暂无 - // Lv: 12, - // CostTime: 12000, - // } - // // 数据写到跨服中 - // if !db.IsCross() { - // if conn, err := db.Cross(); err == nil { - // conn.Mgo.InsertOne(comm.TableSeasonRecord, newData) - // } - // } - //this.TimerSeasonOver() -} diff --git a/modules/troll/api_getlist.go b/modules/troll/api_getlist.go index f4864b4c9..c14423e32 100644 --- a/modules/troll/api_getlist.go +++ b/modules/troll/api_getlist.go @@ -79,7 +79,8 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.TrollGetListReq) if trolltrain.Circle != c { trolltrain.SurpriseID = make(map[int32]int32, 0) n, _ := rand.Int(rand.Reader, big.NewInt(int64(trainNum))) - n2, _ := rand.Int(rand.Reader, big.NewInt(int64(maxCoefficient-1))) //算的是下标所以-1 + goods := this.configure.GetTrollAllGoods() + n2, _ := rand.Int(rand.Reader, big.NewInt(int64(len(goods)-1))) //算的是下标所以-1 trolltrain.SurpriseID[int32(n.Int64())+1] = int32(n2.Int64()) + 1 update["surpriseID"] = trolltrain.SurpriseID trolltrain.Circle = c diff --git a/pb/pagoda_db.pb.go b/pb/pagoda_db.pb.go index 527473ceb..6a808b331 100644 --- a/pb/pagoda_db.pb.go +++ b/pb/pagoda_db.pb.go @@ -31,6 +31,7 @@ type DBPagoda struct { PagodaId int32 `protobuf:"varint,3,opt,name=pagodaId,proto3" json:"pagodaId" bson:"pagodaId"` //塔层 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"` // 是否领奖 Type int32 `protobuf:"varint,5,opt,name=type,proto3" json:"type"` + Complete bool `protobuf:"varint,6,opt,name=complete,proto3" json:"complete"` // 是否通关 } func (x *DBPagoda) Reset() { @@ -100,84 +101,11 @@ func (x *DBPagoda) GetType() int32 { return 0 } -// 赛季塔 赛季结束会清理 -type DBSeasonPagoda 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:"pagodaId"` //塔层 - 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"` // 是否领奖 - Type int32 `protobuf:"varint,5,opt,name=type,proto3" json:"type"` -} - -func (x *DBSeasonPagoda) Reset() { - *x = DBSeasonPagoda{} - if protoimpl.UnsafeEnabled { - mi := &file_pagoda_pagoda_db_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DBSeasonPagoda) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DBSeasonPagoda) ProtoMessage() {} - -func (x *DBSeasonPagoda) ProtoReflect() protoreflect.Message { - mi := &file_pagoda_pagoda_db_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 DBSeasonPagoda.ProtoReflect.Descriptor instead. -func (*DBSeasonPagoda) Descriptor() ([]byte, []int) { - return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{1} -} - -func (x *DBSeasonPagoda) GetId() string { +func (x *DBPagoda) GetComplete() bool { if x != nil { - return x.Id + return x.Complete } - return "" -} - -func (x *DBSeasonPagoda) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *DBSeasonPagoda) GetPagodaId() int32 { - if x != nil { - return x.PagodaId - } - return 0 -} - -func (x *DBSeasonPagoda) GetReward() map[int32]bool { - if x != nil { - return x.Reward - } - return nil -} - -func (x *DBSeasonPagoda) GetType() int32 { - if x != nil { - return x.Type - } - return 0 + return false } // 爬塔数据明细 @@ -201,7 +129,7 @@ type DBPagodaRecord struct { func (x *DBPagodaRecord) Reset() { *x = DBPagodaRecord{} if protoimpl.UnsafeEnabled { - mi := &file_pagoda_pagoda_db_proto_msgTypes[2] + mi := &file_pagoda_pagoda_db_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -214,7 +142,7 @@ func (x *DBPagodaRecord) String() string { func (*DBPagodaRecord) ProtoMessage() {} func (x *DBPagodaRecord) ProtoReflect() protoreflect.Message { - mi := &file_pagoda_pagoda_db_proto_msgTypes[2] + mi := &file_pagoda_pagoda_db_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -227,7 +155,7 @@ func (x *DBPagodaRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use DBPagodaRecord.ProtoReflect.Descriptor instead. func (*DBPagodaRecord) Descriptor() ([]byte, []int) { - return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{2} + return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{1} } func (x *DBPagodaRecord) GetId() string { @@ -306,7 +234,7 @@ 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, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xc6, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x12, 0x0e, + 0x6f, 0x22, 0xe2, 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, @@ -314,41 +242,29 @@ var file_pagoda_pagoda_db_proto_rawDesc = []byte{ 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, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 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, 0x22, 0xd2, 0x01, 0x0a, 0x0e, 0x44, - 0x42, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 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, 0x33, 0x0a, 0x06, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, - 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 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, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 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, 0x22, - 0xf5, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 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, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1b, - 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4c, - 0x69, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, - 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, - 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 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, 0x22, 0xf5, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x50, 0x61, 0x67, + 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, + 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, + 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x6c, + 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x6c, + 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, + 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x09, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x04, 0x6c, 0x69, + 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -363,24 +279,21 @@ func file_pagoda_pagoda_db_proto_rawDescGZIP() []byte { return file_pagoda_pagoda_db_proto_rawDescData } -var file_pagoda_pagoda_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_pagoda_pagoda_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_pagoda_pagoda_db_proto_goTypes = []interface{}{ (*DBPagoda)(nil), // 0: DBPagoda - (*DBSeasonPagoda)(nil), // 1: DBSeasonPagoda - (*DBPagodaRecord)(nil), // 2: DBPagodaRecord - nil, // 3: DBPagoda.RewardEntry - nil, // 4: DBSeasonPagoda.RewardEntry - (*LineUp)(nil), // 5: LineUp + (*DBPagodaRecord)(nil), // 1: DBPagodaRecord + nil, // 2: DBPagoda.RewardEntry + (*LineUp)(nil), // 3: LineUp } var file_pagoda_pagoda_db_proto_depIdxs = []int32{ - 3, // 0: DBPagoda.reward:type_name -> DBPagoda.RewardEntry - 4, // 1: DBSeasonPagoda.reward:type_name -> DBSeasonPagoda.RewardEntry - 5, // 2: DBPagodaRecord.line:type_name -> LineUp - 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 + 2, // 0: DBPagoda.reward:type_name -> DBPagoda.RewardEntry + 3, // 1: DBPagodaRecord.line:type_name -> LineUp + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_pagoda_pagoda_db_proto_init() } @@ -403,18 +316,6 @@ func file_pagoda_pagoda_db_proto_init() { } } file_pagoda_pagoda_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DBSeasonPagoda); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pagoda_pagoda_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DBPagodaRecord); i { case 0: return &v.state @@ -433,7 +334,7 @@ func file_pagoda_pagoda_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pagoda_pagoda_db_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 3, NumExtensions: 0, NumServices: 0, },