diff --git a/modules/enchant/api_challengeover.go b/modules/enchant/api_challengeover.go index 942019a5f..b384e7956 100644 --- a/modules/enchant/api_challengeover.go +++ b/modules/enchant/api_challengeover.go @@ -4,6 +4,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/pb" cfg "go_dreamfactory/sys/configure/structs" + "time" ) //参数校验 @@ -33,6 +34,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha boos *pb.DBEnchantBoos ok bool err error + //bNewRecord bool ) if errdata = this.ChallengeOverCheck(session, req); errdata != nil { return // 参数校验失败直接返回 @@ -101,6 +103,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha }, } info.Boss[req.BossType] = boos + //bNewRecord = true } else { if boos.Score < req.Report.Score { boos = &pb.DBEnchantBoos{ @@ -114,6 +117,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha }, } info.Boss[req.BossType] = boos + //bNewRecord = true } } @@ -155,7 +159,15 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha } return } - this.module.modelRank.updateRank(req.Report.Score, session.GetUserId(), req.BossType) + + //if bNewRecord { // 只有新记录才记录战报数据 + go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { + + this.module.battlerecord.WrietBattleRecord(session.GetUserId(), req.Report, time.Now().Add(time.Hour*24*8)) + this.module.modelRank.CheckRank(session.GetUserId(), req.BossType, req.Report) + }) + //} + //this.module.modelRank.updateRank(req.Report.Score, session.GetUserId(), req.BossType) session.SendMsg(string(this.module.GetType()), EnchantChallengeOverResp, &pb.EnchantChallengeOverResp{Data: info, Heroexp: changExp, Atno: atno}) go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EnchantChallengeOverReq", conf.PsConsume) diff --git a/modules/enchant/api_ranklist.go b/modules/enchant/api_ranklist.go index 525b52967..051bc1f86 100644 --- a/modules/enchant/api_ranklist.go +++ b/modules/enchant/api_ranklist.go @@ -14,11 +14,10 @@ func (this *apiComp) RankListCheck(session comm.IUserSession, req *pb.EnchantRan func (this *apiComp) RankList(session comm.IUserSession, req *pb.EnchantRankListReq) (errdata *pb.ErrorData) { var ( uids []string - ranks []*pb.DBEnchant - ranksmap map[string]*pb.DBEnchant - franks []*pb.DBEnchant - players []*pb.DBEnchantRank - friends []*pb.DBEnchantRank + ranks []*pb.DBEnchantRecord + friends []*pb.DBEnchantRecord + ranksmap map[string]*pb.DBEnchantRank + frank []*pb.DBEnchantRank err error ) @@ -34,7 +33,7 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.EnchantRankList } return } - if ranks, err = this.module.modelEnchant.queryPlayers(uids); err != nil { + if ranks, err = this.module.modelRank.queryPlayers(uids); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, Title: pb.ErrorCode_DBError.ToString(), @@ -42,27 +41,20 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.EnchantRankList } return } - ranksmap = make(map[string]*pb.DBEnchant) + ranksmap = make(map[string]*pb.DBEnchantRank) for _, v := range ranks { - ranksmap[v.Uid] = v + ranksmap[v.Uid] = v.Data[req.BoosType] } - players = make([]*pb.DBEnchantRank, 0, len(uids)) + + players := make([]*pb.DBEnchantRank, 0, len(uids)) for _, v := range uids { if player, ok := ranksmap[v]; ok { - players = append(players, &pb.DBEnchantRank{ - Id: player.Uid, - Uinfo: player.Uinfo, - Score: player.Boss[req.BoosType].Score, - Grade: player.Boss[req.BoosType].Grade, - Gradegroup: player.Boss[req.BoosType].Gradegroup, - Battletime: player.Boss[req.BoosType].Battletime, - Line: player.Boss[req.BoosType].Line, - }) + players = append(players, player) } } - // 获取好友 + // // 获取好友 fids := this.module.ModuleFriend.GetFriendList(session.GetUserId()) - if franks, err = this.module.modelEnchant.queryPlayers(fids); err != nil { + if friends, err = this.module.modelRank.queryPlayers(fids); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, Title: pb.ErrorCode_DBError.ToString(), @@ -70,20 +62,14 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.EnchantRankList } return } - friends = make([]*pb.DBEnchantRank, len(franks)) - for i, v := range franks { - friends[i] = &pb.DBEnchantRank{ - Id: v.Uid, - Uinfo: v.Uinfo, - Score: v.Boss[req.BoosType].Score, - Grade: v.Boss[req.BoosType].Grade, - Gradegroup: v.Boss[req.BoosType].Gradegroup, - Line: v.Boss[req.BoosType].Line, + for _, v := range friends { + if v.Data != nil && v.Data[req.BoosType] != nil { + frank = append(frank, v.Data[req.BoosType]) } } session.SendMsg(string(this.module.GetType()), "ranklist", &pb.EnchantRankListResp{ Ranks: players, - Friends: friends, + Friends: frank, }) return } diff --git a/modules/enchant/model_enchant.go b/modules/enchant/model_enchant.go index 114f0702b..08e5bcca0 100644 --- a/modules/enchant/model_enchant.go +++ b/modules/enchant/model_enchant.go @@ -47,15 +47,6 @@ func (this *modelEnchant) getEnchantList(uid string) (result *pb.DBEnchant, err return result, err } -func (this *modelEnchant) queryPlayers(uIds []string) (result []*pb.DBEnchant, err error) { - result = make([]*pb.DBEnchant, 0) - if _, err = this.GetByUids(uIds, &result); err != nil && err != mgo.MongodbNil { - this.module.Errorln(err) - return - } - return -} - // 红点检测 func (this *modelEnchant) checkReddot33(session comm.IUserSession) bool { if conf, err := this.module.configure.GetEnchantBossConfigData(1); err == nil { diff --git a/modules/enchant/model_rank.go b/modules/enchant/model_rank.go index 5806d16fe..0014d3ec1 100644 --- a/modules/enchant/model_rank.go +++ b/modules/enchant/model_rank.go @@ -5,11 +5,15 @@ import ( "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/lego/sys/redis/pipe" "go_dreamfactory/modules" "go_dreamfactory/pb" + "go_dreamfactory/sys/db" + "strconv" "github.com/go-redis/redis/v8" + "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/x/bsonx" ) @@ -47,7 +51,8 @@ func (this *ModelRank) queryRankUser(boos int32) (ranks []string, err error) { var ( result []string ) - if result, err = this.DBModel.Redis.ZRevRange(this.rankKey(boos), 0, comm.MaxRankList).Result(); err != nil { + tableName := fmt.Sprintf("%s-%s", db.CrossTag(), this.TableName+strconv.Itoa(int(boos))) + if result, err = this.DBModel.Redis.ZRevRange(tableName, 0, comm.MaxRankList).Result(); err != nil { this.module.Errorln(err) return } @@ -82,3 +87,129 @@ func (this *ModelRank) updateRank(Score int32, uid string, boos int32) (err erro return } + +// 记录数据存在跨服 +func (this *ModelRank) CheckRank(uid string, boosID int32, report *pb.BattleReport) { + conn_, err := db.Cross() // 获取跨服数据库对象 + if err != nil { + return + } + user, err := this.module.ModuleUser.GetUser(uid) + if err != nil { + return + } + model := db.NewDBModelNoExpired(db.CrossTag(), comm.TableEnchantRank, conn_) + + // 写入排行榜 + record := &pb.DBEnchantRecord{ + Data: map[int32]*pb.DBEnchantRank{}, + } + if err = model.Get(uid, record); err == mgo.MongodbNil { + record.Id = primitive.NewObjectID().Hex() + record.Uid = uid + szLine := make([]*pb.LineUp, 0) + var Leadpos int32 + if report != nil && len(report.Info.Redflist) > 0 { + Leadpos = report.Info.Redflist[0].Leadpos + for _, v := range report.Info.Redflist[0].Team { + if v != nil { + szLine = append(szLine, &pb.LineUp{ + Cid: v.HeroID, + Star: v.Star, + Lv: v.Lv, + }) + } + } + } + record.Data[boosID] = &pb.DBEnchantRank{ + Uinfo: &pb.BaseUserInfo{ + Uid: uid, + Sid: user.Sid, + Name: user.Name, + Gender: user.Gender, + Skin: user.CurSkin, + Aframe: user.Curaframe, + Title: user.Curtitle, + Lv: user.Lv, + }, + Line: &pb.LineData{ + Leadpos: Leadpos, + Line: szLine, + Bid: report.Info.Id, // 战报id + }, + Score: report.Score, + Grade: report.Grade, + Gradegroup: report.Info.Scoregroup, + Battletime: report.Costtime, + } + + model.Add(uid, record) + } else if err == nil { + szLine := make([]*pb.LineUp, 0) + var Leadpos int32 + if report != nil && len(report.Info.Redflist) > 0 { + Leadpos = report.Info.Redflist[0].Leadpos + for _, v := range report.Info.Redflist[0].Team { + if v != nil { + szLine = append(szLine, &pb.LineUp{ + Cid: v.HeroID, + Star: v.Star, + Lv: v.Lv, + }) + } + } + } + record.Data[boosID] = &pb.DBEnchantRank{ + Uinfo: &pb.BaseUserInfo{ + Uid: uid, + Sid: user.Sid, + Name: user.Name, + Gender: user.Gender, + Skin: user.CurSkin, + Aframe: user.Curaframe, + Title: user.Curtitle, + Lv: user.Lv, + }, + Line: &pb.LineData{ + Leadpos: Leadpos, + Line: szLine, + Bid: report.Info.Id, // 战报id + }, + Score: report.Score, + Grade: report.Grade, + Gradegroup: report.Info.Scoregroup, + Battletime: report.Costtime, + } + + update := make(map[string]interface{}, 0) + update["data"] = record.Data + model.Change(uid, update) + } + var ( + pipe *pipe.RedisPipe = conn_.Redis.RedisPipe(context.TODO()) + menbers *redis.Z + tableName string + score int32 + ) + score = report.Score + tableName = fmt.Sprintf("%s-%s", db.CrossTag(), this.TableName+strconv.Itoa(int(boosID))) + menbers = &redis.Z{Score: float64(score), Member: uid} + + if cmd := pipe.ZAdd(tableName, menbers); cmd != nil { + if _, err = cmd.Result(); err != nil { + this.module.Errorln(err) + } + } + if _, err := pipe.Exec(); err != nil { + this.module.Errorln(err) + return + } +} +func (this *ModelRank) queryPlayers(uIds []string) (result []*pb.DBEnchantRecord, err error) { + result = make([]*pb.DBEnchantRecord, 0) + if _, err = this.GetByUids(uIds, &result); err != nil && err != mgo.MongodbNil { + this.module.Errorln(err) + return + } + return +} diff --git a/modules/enchant/module.go b/modules/enchant/module.go index 3e2237b01..225216125 100644 --- a/modules/enchant/module.go +++ b/modules/enchant/module.go @@ -14,6 +14,7 @@ type Enchant struct { modelRank *ModelRank battle comm.IBattle service core.IService + battlerecord comm.IBattleRecord // 战报模块 } func NewModule() core.IModule { @@ -42,6 +43,10 @@ func (this *Enchant) Start() (err error) { } this.battle = module.(comm.IBattle) + if module, err = this.service.GetModule(comm.ModuleBattleRecord); err != nil { + return + } + this.battlerecord = module.(comm.IBattleRecord) return } diff --git a/pb/enchant_db.pb.go b/pb/enchant_db.pb.go index b6a48e09f..72ef9679f 100644 --- a/pb/enchant_db.pb.go +++ b/pb/enchant_db.pb.go @@ -170,6 +170,70 @@ func (x *DBEnchantBoos) GetBattletime() int32 { return 0 } +// 战斗数据 +type DBEnchantRecord 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 + Data map[int32]*DBEnchantRank `protobuf:"bytes,3,rep,name=data,proto3" json:"data" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // key boss 类型 +} + +func (x *DBEnchantRecord) Reset() { + *x = DBEnchantRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_enchant_enchant_db_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBEnchantRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBEnchantRecord) ProtoMessage() {} + +func (x *DBEnchantRecord) ProtoReflect() protoreflect.Message { + mi := &file_enchant_enchant_db_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 DBEnchantRecord.ProtoReflect.Descriptor instead. +func (*DBEnchantRecord) Descriptor() ([]byte, []int) { + return file_enchant_enchant_db_proto_rawDescGZIP(), []int{2} +} + +func (x *DBEnchantRecord) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBEnchantRecord) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBEnchantRecord) GetData() map[int32]*DBEnchantRank { + if x != nil { + return x.Data + } + return nil +} + // 排行榜 type DBEnchantRank struct { state protoimpl.MessageState @@ -188,7 +252,7 @@ type DBEnchantRank struct { func (x *DBEnchantRank) Reset() { *x = DBEnchantRank{} if protoimpl.UnsafeEnabled { - mi := &file_enchant_enchant_db_proto_msgTypes[2] + mi := &file_enchant_enchant_db_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -201,7 +265,7 @@ func (x *DBEnchantRank) String() string { func (*DBEnchantRank) ProtoMessage() {} func (x *DBEnchantRank) ProtoReflect() protoreflect.Message { - mi := &file_enchant_enchant_db_proto_msgTypes[2] + mi := &file_enchant_enchant_db_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -214,7 +278,7 @@ func (x *DBEnchantRank) ProtoReflect() protoreflect.Message { // Deprecated: Use DBEnchantRank.ProtoReflect.Descriptor instead. func (*DBEnchantRank) Descriptor() ([]byte, []int) { - return file_enchant_enchant_db_proto_rawDescGZIP(), []int{2} + return file_enchant_enchant_db_proto_rawDescGZIP(), []int{3} } func (x *DBEnchantRank) GetId() string { @@ -295,21 +359,32 @@ var file_enchant_enchant_db_proto_rawDesc = []byte{ 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x74, 0x69, 0x6d, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, - 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x04, 0x6c, - 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, - 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x61, 0x64, 0x65, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x74, - 0x6c, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x69, 0x6d, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x0f, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, + 0x6e, 0x74, 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, 0x2e, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, + 0x68, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x47, 0x0a, 0x09, 0x44, 0x61, + 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, + 0x68, 0x61, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0xcf, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, + 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, + 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x61, 0x64, 0x65, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -324,27 +399,31 @@ func file_enchant_enchant_db_proto_rawDescGZIP() []byte { return file_enchant_enchant_db_proto_rawDescData } -var file_enchant_enchant_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_enchant_enchant_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_enchant_enchant_db_proto_goTypes = []interface{}{ - (*DBEnchant)(nil), // 0: DBEnchant - (*DBEnchantBoos)(nil), // 1: DBEnchantBoos - (*DBEnchantRank)(nil), // 2: DBEnchantRank - nil, // 3: DBEnchant.BossEntry - (*BaseUserInfo)(nil), // 4: BaseUserInfo - (*LineData)(nil), // 5: LineData + (*DBEnchant)(nil), // 0: DBEnchant + (*DBEnchantBoos)(nil), // 1: DBEnchantBoos + (*DBEnchantRecord)(nil), // 2: DBEnchantRecord + (*DBEnchantRank)(nil), // 3: DBEnchantRank + nil, // 4: DBEnchant.BossEntry + nil, // 5: DBEnchantRecord.DataEntry + (*BaseUserInfo)(nil), // 6: BaseUserInfo + (*LineData)(nil), // 7: LineData } var file_enchant_enchant_db_proto_depIdxs = []int32{ - 4, // 0: DBEnchant.uinfo:type_name -> BaseUserInfo - 3, // 1: DBEnchant.boss:type_name -> DBEnchant.BossEntry - 5, // 2: DBEnchantBoos.line:type_name -> LineData - 4, // 3: DBEnchantRank.uinfo:type_name -> BaseUserInfo - 5, // 4: DBEnchantRank.line:type_name -> LineData - 1, // 5: DBEnchant.BossEntry.value:type_name -> DBEnchantBoos - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 6, // 0: DBEnchant.uinfo:type_name -> BaseUserInfo + 4, // 1: DBEnchant.boss:type_name -> DBEnchant.BossEntry + 7, // 2: DBEnchantBoos.line:type_name -> LineData + 5, // 3: DBEnchantRecord.data:type_name -> DBEnchantRecord.DataEntry + 6, // 4: DBEnchantRank.uinfo:type_name -> BaseUserInfo + 7, // 5: DBEnchantRank.line:type_name -> LineData + 1, // 6: DBEnchant.BossEntry.value:type_name -> DBEnchantBoos + 3, // 7: DBEnchantRecord.DataEntry.value:type_name -> DBEnchantRank + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_enchant_enchant_db_proto_init() } @@ -380,6 +459,18 @@ func file_enchant_enchant_db_proto_init() { } } file_enchant_enchant_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBEnchantRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_enchant_enchant_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DBEnchantRank); i { case 0: return &v.state @@ -398,7 +489,7 @@ func file_enchant_enchant_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_enchant_enchant_db_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 0, },