From a0df4f8b39db1e511d235b82b8c80f161aea8d69 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 26 Dec 2023 15:18:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=95=B0=E6=8D=AE=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E9=98=B5=E5=AE=B9=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/enchant/model_rank.go | 8 - modules/hunting/model_rank.go | 8 - modules/integral/api_challengeover.go | 14 ++ modules/integral/api_rank.go | 5 +- modules/integral/model_integral.go | 15 +- modules/integral/model_rank.go | 9 +- modules/viking/model_rank.go | 6 - pb/integral_db.pb.go | 246 ++++++++++++++++++-------- pb/integral_msg.pb.go | 25 ++- 9 files changed, 223 insertions(+), 113 deletions(-) diff --git a/modules/enchant/model_rank.go b/modules/enchant/model_rank.go index 8bed3f9ae..2a647f8e5 100644 --- a/modules/enchant/model_rank.go +++ b/modules/enchant/model_rank.go @@ -29,14 +29,6 @@ func (this *ModelRank) Init(service core.IService, module core.IModule, comp cor return } -func (this *ModelRank) AddRankList(uId string, objId string, data *pb.DBEnchantRank) (err error) { - - if err = this.AddList(uId, objId, data); err != nil { - return - } - return nil -} - func (this *ModelRank) getEnchantRankList(uid string) []*pb.DBEnchantRank { ranks := make([]*pb.DBEnchantRank, 0) err := this.GetList(uid, &ranks) diff --git a/modules/hunting/model_rank.go b/modules/hunting/model_rank.go index fed409267..82e7b106e 100644 --- a/modules/hunting/model_rank.go +++ b/modules/hunting/model_rank.go @@ -29,14 +29,6 @@ func (this *ModelRank) Init(service core.IService, module core.IModule, comp cor return } -func (this *ModelRank) AddRankList(uId string, objId string, data *pb.DBHuntingRank) (err error) { - - if err = this.AddList(uId, objId, data); err != nil { - return - } - return nil -} - func (this *ModelRank) getHuntingRankList(uid string) []*pb.DBHuntingRank { ranks := make([]*pb.DBHuntingRank, 0) err := this.GetList(uid, &ranks) diff --git a/modules/integral/api_challengeover.go b/modules/integral/api_challengeover.go index a6ef46cf4..d539cb081 100644 --- a/modules/integral/api_challengeover.go +++ b/modules/integral/api_challengeover.go @@ -80,6 +80,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.IntegralCh list.Maxscore = req.Score update["maxscore"] = list.Maxscore } + list.Totalscore += req.Score update["totalscore"] = list.Totalscore if first { @@ -87,7 +88,20 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.IntegralCh res = append(res, v) } } + var line []*pb.LineUp + for _, v := range req.Report.Info.Redflist[0].Team { + line = append(line, &pb.LineUp{ + Cid: v.HeroID, + Star: v.Star, + Lv: v.Lv, + }) + } + list.Line[req.Nandu] = &pb.LineData{ + Leadpos: req.Report.Info.Redflist[0].Leadpos, + Line: line, + } + update["line"] = list.Line reward := this.module.ModuleTools.GetGroupDataByLottery(cfgData.Drop, userinfo.Vip, userinfo.Lv) res = append(res, reward...) diff --git a/modules/integral/api_rank.go b/modules/integral/api_rank.go index fac3984b4..177bb5a99 100644 --- a/modules/integral/api_rank.go +++ b/modules/integral/api_rank.go @@ -24,7 +24,7 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.IntegralRankLis return } - if uids, err = this.module.modelRank.queryRankUser(); err != nil { + if uids, err = this.module.modelRank.queryIntegralRankUser(int(req.Nandu)); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, Title: pb.ErrorCode_DBError.ToString(), @@ -47,7 +47,8 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.IntegralRankLis Id: v.Uid, Uinfo: v.Uinfo, Nandu: v.Nandu, - Score: v.Maxscore, + Score: v.Score[req.Nandu], + Line: v.Line[req.Nandu], } } session.SendMsg(string(this.module.GetType()), "rank", &pb.IntegralRankListResp{ diff --git a/modules/integral/model_integral.go b/modules/integral/model_integral.go index 429eccc36..56b70ba6b 100644 --- a/modules/integral/model_integral.go +++ b/modules/integral/model_integral.go @@ -52,19 +52,20 @@ func (this *modelIntegral) getIntegralList(uid string) (result *pb.DBIntegralBos result.Uid = uid result.Buff = make(map[int32]int32) result.Score = make(map[int32]int32) - + result.Line = make(map[int32]*pb.LineData, 0) // 获取当前的hid curTime := configure.Now().Unix() szConf := this.module.configure.GetIntegralITime() // 当前开服时间 openTime := this.module.service.GetOpentime().Unix() + openTime = configure.Now().Unix() // 临时校验 for _, v := range szConf { - if curTime >= int64(v.Openday)+openTime && curTime <= int64(v.Endday)+openTime { - result.Hid = v.Hdid - result.Etime = int64(v.Endday) + openTime - result.CTime = curTime - break - } + //if curTime >= int64(v.Openday)+openTime && curTime <= int64(v.Endday)+openTime { + result.Hid = v.Hdid + result.Etime = int64(v.Endday) + openTime + result.CTime = curTime + break + //} } var conf *cfg.GameIntegralBossData diff --git a/modules/integral/model_rank.go b/modules/integral/model_rank.go index 860351dd2..6db6a80ee 100644 --- a/modules/integral/model_rank.go +++ b/modules/integral/model_rank.go @@ -7,6 +7,7 @@ import ( "go_dreamfactory/lego/sys/redis/pipe" "go_dreamfactory/modules" "go_dreamfactory/pb" + "strconv" "github.com/go-redis/redis/v8" ) @@ -26,7 +27,7 @@ func (this *modelRank) Init(service core.IService, module core.IModule, comp cor } // 更新排名 -func (this *modelRank) updateRank(data *pb.DBIntegralRank) (err error) { +func (this *modelRank) updateRank(data *pb.DBIntegralRank, nandu int) (err error) { var ( pipe *pipe.RedisPipe = this.DBModel.Redis.RedisPipe(context.TODO()) menbers *redis.Z @@ -35,7 +36,7 @@ func (this *modelRank) updateRank(data *pb.DBIntegralRank) (err error) { menbers = &redis.Z{Score: float64(data.Score), Member: data.Uinfo.Uid} - if cmd = pipe.ZAdd(this.TableName, menbers); err != nil { + if cmd = pipe.ZAdd(this.TableName+strconv.Itoa(nandu), menbers); err != nil { this.module.Errorln(err) } @@ -52,11 +53,11 @@ func (this *modelRank) updateRank(data *pb.DBIntegralRank) (err error) { } // 获取排行榜前50的用户名单 -func (this *modelRank) queryRankUser() (ranks []string, err error) { +func (this *modelRank) queryIntegralRankUser(nandu int) (ranks []string, err error) { var ( result []string ) - if result, err = this.DBModel.Redis.ZRevRange(this.TableName, 0, 50).Result(); err != nil { + if result, err = this.DBModel.Redis.ZRevRange(this.TableName+strconv.Itoa(nandu), 0, 50).Result(); err != nil { this.module.Errorln(err) return } diff --git a/modules/viking/model_rank.go b/modules/viking/model_rank.go index b5b7d55c5..9a931262e 100644 --- a/modules/viking/model_rank.go +++ b/modules/viking/model_rank.go @@ -26,12 +26,6 @@ func (this *ModelRank) Init(service core.IService, module core.IModule, comp cor }) return } -func (this *ModelRank) AddRankList(uId string, id string, data *pb.DBVikingRank) (err error) { - if err = this.AddList(uId, id, data); err != nil { - return - } - return nil -} // 获取排行榜数据 func (this *ModelRank) getVikingRankList(uid string) []*pb.DBVikingRank { diff --git a/pb/integral_db.pb.go b/pb/integral_db.pb.go index 0749efd05..653e30ba0 100644 --- a/pb/integral_db.pb.go +++ b/pb/integral_db.pb.go @@ -25,21 +25,22 @@ type DBIntegralBoss struct { 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 - Itype int32 `protobuf:"varint,3,opt,name=itype,proto3" json:"itype"` // boss 类型 1 难度模式 2 事件模式 - Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count"` // 今日挑战次数 - CTime int64 `protobuf:"varint,5,opt,name=cTime,proto3" json:"cTime" bson:"cTime"` //修改时间 - Etime int64 `protobuf:"varint,6,opt,name=etime,proto3" json:"etime"` // 活动结束时间 - Hid int32 `protobuf:"varint,7,opt,name=hid,proto3" json:"hid"` // 活动id - Maxscore int32 `protobuf:"varint,8,opt,name=maxscore,proto3" json:"maxscore"` // 最大积分 - Totalscore int32 `protobuf:"varint,9,opt,name=totalscore,proto3" json:"totalscore"` // 累计积分 - Reward1 int32 `protobuf:"varint,10,opt,name=reward1,proto3" json:"reward1"` // 类型1 奖励( Integralreward ) - Reward2 int32 `protobuf:"varint,11,opt,name=reward2,proto3" json:"reward2"` // 类型2 奖励( Integralreward ) - Buff map[int32]int32 `protobuf:"bytes,12,rep,name=buff,proto3" json:"buff" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 激活的buff (key Integralcondition value :0 未激活) 注:事件类型 才有值 - Nandu int32 `protobuf:"varint,13,opt,name=nandu,proto3" json:"nandu"` // 已经解锁的难度 - Score map[int32]int32 `protobuf:"bytes,14,rep,name=score,proto3" json:"score" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 难度 value 积分 - Uinfo *BaseUserInfo `protobuf:"bytes,15,opt,name=uinfo,proto3" json:"uinfo"` //用户基础 + 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 + Itype int32 `protobuf:"varint,3,opt,name=itype,proto3" json:"itype"` // boss 类型 1 难度模式 2 事件模式 + Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count"` // 今日挑战次数 + CTime int64 `protobuf:"varint,5,opt,name=cTime,proto3" json:"cTime" bson:"cTime"` //修改时间 + Etime int64 `protobuf:"varint,6,opt,name=etime,proto3" json:"etime"` // 活动结束时间 + Hid int32 `protobuf:"varint,7,opt,name=hid,proto3" json:"hid"` // 活动id + Maxscore int32 `protobuf:"varint,8,opt,name=maxscore,proto3" json:"maxscore"` // 最大积分 + Totalscore int32 `protobuf:"varint,9,opt,name=totalscore,proto3" json:"totalscore"` // 累计积分 + Reward1 int32 `protobuf:"varint,10,opt,name=reward1,proto3" json:"reward1"` // 类型1 奖励( Integralreward ) + Reward2 int32 `protobuf:"varint,11,opt,name=reward2,proto3" json:"reward2"` // 类型2 奖励( Integralreward ) + Buff map[int32]int32 `protobuf:"bytes,12,rep,name=buff,proto3" json:"buff" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 激活的buff (key Integralcondition value :0 未激活) 注:事件类型 才有值 + Nandu int32 `protobuf:"varint,13,opt,name=nandu,proto3" json:"nandu"` // 已经解锁的难度 + Score map[int32]int32 `protobuf:"bytes,14,rep,name=score,proto3" json:"score" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 难度 value 积分 + Uinfo *BaseUserInfo `protobuf:"bytes,15,opt,name=uinfo,proto3" json:"uinfo"` //用户基础 + Line map[int32]*LineData `protobuf:"bytes,16,rep,name=line,proto3" json:"line" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *DBIntegralBoss) Reset() { @@ -179,6 +180,68 @@ func (x *DBIntegralBoss) GetUinfo() *BaseUserInfo { return nil } +func (x *DBIntegralBoss) GetLine() map[int32]*LineData { + if x != nil { + return x.Line + } + return nil +} + +type LineData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Leadpos int32 `protobuf:"varint,1,opt,name=leadpos,proto3" json:"leadpos"` //队长位置 + Line []*LineUp `protobuf:"bytes,2,rep,name=line,proto3" json:"line"` // 阵容数据 +} + +func (x *LineData) Reset() { + *x = LineData{} + if protoimpl.UnsafeEnabled { + mi := &file_integral_integral_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LineData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LineData) ProtoMessage() {} + +func (x *LineData) ProtoReflect() protoreflect.Message { + mi := &file_integral_integral_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 LineData.ProtoReflect.Descriptor instead. +func (*LineData) Descriptor() ([]byte, []int) { + return file_integral_integral_db_proto_rawDescGZIP(), []int{1} +} + +func (x *LineData) GetLeadpos() int32 { + if x != nil { + return x.Leadpos + } + return 0 +} + +func (x *LineData) GetLine() []*LineUp { + if x != nil { + return x.Line + } + return nil +} + // 积分boss 排行 type DBIntegralRank struct { state protoimpl.MessageState @@ -189,12 +252,13 @@ type DBIntegralRank struct { Uinfo *BaseUserInfo `protobuf:"bytes,2,opt,name=uinfo,proto3" json:"uinfo"` //用户基础 Nandu int32 `protobuf:"varint,3,opt,name=nandu,proto3" json:"nandu"` Score int32 `protobuf:"varint,4,opt,name=score,proto3" json:"score"` // 积分 + Line *LineData `protobuf:"bytes,5,opt,name=line,proto3" json:"line"` // 阵容信息 } func (x *DBIntegralRank) Reset() { *x = DBIntegralRank{} if protoimpl.UnsafeEnabled { - mi := &file_integral_integral_db_proto_msgTypes[1] + mi := &file_integral_integral_db_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -207,7 +271,7 @@ func (x *DBIntegralRank) String() string { func (*DBIntegralRank) ProtoMessage() {} func (x *DBIntegralRank) ProtoReflect() protoreflect.Message { - mi := &file_integral_integral_db_proto_msgTypes[1] + mi := &file_integral_integral_db_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -220,7 +284,7 @@ func (x *DBIntegralRank) ProtoReflect() protoreflect.Message { // Deprecated: Use DBIntegralRank.ProtoReflect.Descriptor instead. func (*DBIntegralRank) Descriptor() ([]byte, []int) { - return file_integral_integral_db_proto_rawDescGZIP(), []int{1} + return file_integral_integral_db_proto_rawDescGZIP(), []int{2} } func (x *DBIntegralRank) GetId() string { @@ -251,54 +315,76 @@ func (x *DBIntegralRank) GetScore() int32 { return 0 } +func (x *DBIntegralRank) GetLine() *LineData { + if x != nil { + return x.Line + } + return nil +} + var File_integral_integral_db_proto protoreflect.FileDescriptor var file_integral_integral_db_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, - 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x04, 0x0a, 0x0e, 0x44, 0x42, 0x49, - 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 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, 0x14, 0x0a, - 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x68, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x73, 0x63, - 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x73, 0x63, - 0x6f, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x63, 0x6f, 0x72, - 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x63, - 0x6f, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x31, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x31, 0x12, 0x18, 0x0a, - 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x32, 0x12, 0x2d, 0x0a, 0x04, 0x62, 0x75, 0x66, 0x66, 0x18, - 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x04, 0x62, 0x75, 0x66, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x12, 0x30, 0x0a, 0x05, - 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x44, 0x42, - 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x53, 0x63, 0x6f, - 0x72, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x23, - 0x0a, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0f, 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, 0x1a, 0x37, 0x0a, 0x09, 0x42, 0x75, 0x66, 0x66, 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, - 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, - 0x53, 0x63, 0x6f, 0x72, 0x65, 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, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x71, 0x0a, 0x0e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, + 0x6d, 0x6d, 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, 0x8e, 0x05, 0x0a, 0x0e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, + 0x42, 0x6f, 0x73, 0x73, 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, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x68, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x68, 0x69, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x31, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x31, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x32, + 0x12, 0x2d, 0x0a, 0x04, 0x62, 0x75, 0x66, 0x66, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x2e, + 0x42, 0x75, 0x66, 0x66, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x62, 0x75, 0x66, 0x66, 0x12, + 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x0e, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x0f, 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, 0x2d, 0x0a, 0x04, + 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x49, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x4c, 0x69, 0x6e, 0x65, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x42, + 0x75, 0x66, 0x66, 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, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x72, 0x65, 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, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, + 0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, + 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x41, 0x0a, 0x08, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, + 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, 0x52, + 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 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, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, 0x6e, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -313,24 +399,31 @@ func file_integral_integral_db_proto_rawDescGZIP() []byte { return file_integral_integral_db_proto_rawDescData } -var file_integral_integral_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_integral_integral_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_integral_integral_db_proto_goTypes = []interface{}{ (*DBIntegralBoss)(nil), // 0: DBIntegralBoss - (*DBIntegralRank)(nil), // 1: DBIntegralRank - nil, // 2: DBIntegralBoss.BuffEntry - nil, // 3: DBIntegralBoss.ScoreEntry - (*BaseUserInfo)(nil), // 4: BaseUserInfo + (*LineData)(nil), // 1: LineData + (*DBIntegralRank)(nil), // 2: DBIntegralRank + nil, // 3: DBIntegralBoss.BuffEntry + nil, // 4: DBIntegralBoss.ScoreEntry + nil, // 5: DBIntegralBoss.LineEntry + (*BaseUserInfo)(nil), // 6: BaseUserInfo + (*LineUp)(nil), // 7: LineUp } var file_integral_integral_db_proto_depIdxs = []int32{ - 2, // 0: DBIntegralBoss.buff:type_name -> DBIntegralBoss.BuffEntry - 3, // 1: DBIntegralBoss.score:type_name -> DBIntegralBoss.ScoreEntry - 4, // 2: DBIntegralBoss.uinfo:type_name -> BaseUserInfo - 4, // 3: DBIntegralRank.uinfo:type_name -> BaseUserInfo - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 3, // 0: DBIntegralBoss.buff:type_name -> DBIntegralBoss.BuffEntry + 4, // 1: DBIntegralBoss.score:type_name -> DBIntegralBoss.ScoreEntry + 6, // 2: DBIntegralBoss.uinfo:type_name -> BaseUserInfo + 5, // 3: DBIntegralBoss.line:type_name -> DBIntegralBoss.LineEntry + 7, // 4: LineData.line:type_name -> LineUp + 6, // 5: DBIntegralRank.uinfo:type_name -> BaseUserInfo + 1, // 6: DBIntegralRank.line:type_name -> LineData + 1, // 7: DBIntegralBoss.LineEntry.value:type_name -> LineData + 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_integral_integral_db_proto_init() } @@ -339,6 +432,7 @@ func file_integral_integral_db_proto_init() { return } file_comm_proto_init() + file_battle_battle_msg_proto_init() if !protoimpl.UnsafeEnabled { file_integral_integral_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DBIntegralBoss); i { @@ -353,6 +447,18 @@ func file_integral_integral_db_proto_init() { } } file_integral_integral_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LineData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_integral_integral_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DBIntegralRank); i { case 0: return &v.state @@ -371,7 +477,7 @@ func file_integral_integral_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_integral_integral_db_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/integral_msg.pb.go b/pb/integral_msg.pb.go index 6083e36b9..ef8c33cb5 100644 --- a/pb/integral_msg.pb.go +++ b/pb/integral_msg.pb.go @@ -436,7 +436,8 @@ type IntegralRankListReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Nandu int32 `protobuf:"varint,1,opt,name=nandu,proto3" json:"nandu"` // 难度 + Nandu int32 `protobuf:"varint,1,opt,name=nandu,proto3" json:"nandu"` // 难度 + Bfriend bool `protobuf:"varint,2,opt,name=bfriend,proto3" json:"bfriend"` // 是否好友榜 } func (x *IntegralRankListReq) Reset() { @@ -478,6 +479,13 @@ func (x *IntegralRankListReq) GetNandu() int32 { return 0 } +func (x *IntegralRankListReq) GetBfriend() bool { + if x != nil { + return x.Bfriend + } + return false +} + type IntegralRankListResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -569,15 +577,16 @@ var file_integral_integral_msg_proto_rawDesc = []byte{ 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, - 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x45, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, - 0x6e, 0x64, 0x75, 0x22, 0x3d, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, - 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x05, 0x72, - 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x49, - 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, - 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6e, 0x64, 0x75, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x62, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x3d, 0x0a, + 0x14, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var (