From 96f5831e423a2e931a448961ab1abcfcd8f2fb56 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 25 Jan 2024 18:00:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=99=84=E9=AD=94=E5=89=AF?= =?UTF-8?q?=E6=9C=AC=E6=97=B6=E9=95=BF=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/enchant/api_challengeover.go | 2 + modules/enchant/api_ranklist.go | 1 + pb/enchant_db.pb.go | 60 ++++++++++++++++++---------- 3 files changed, 43 insertions(+), 20 deletions(-) diff --git a/modules/enchant/api_challengeover.go b/modules/enchant/api_challengeover.go index e4d90d565..942019a5f 100644 --- a/modules/enchant/api_challengeover.go +++ b/modules/enchant/api_challengeover.go @@ -94,6 +94,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha Score: req.Report.Score, Grade: req.Report.Grade, Gradegroup: req.Report.Info.Scoregroup, + Battletime: req.Report.Costtime, Line: &pb.LineData{ Leadpos: req.Report.Info.Redflist[0].Leadpos, Line: line, @@ -106,6 +107,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha Score: req.Report.Score, Grade: req.Report.Grade, Gradegroup: req.Report.Info.Scoregroup, + Battletime: req.Report.Costtime, Line: &pb.LineData{ Leadpos: req.Report.Info.Redflist[0].Leadpos, Line: line, diff --git a/modules/enchant/api_ranklist.go b/modules/enchant/api_ranklist.go index dac480067..3b5b8e96e 100644 --- a/modules/enchant/api_ranklist.go +++ b/modules/enchant/api_ranklist.go @@ -49,6 +49,7 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.EnchantRankList Score: v.Boss[req.BoosType].Score, Grade: v.Boss[req.BoosType].Grade, Gradegroup: v.Boss[req.BoosType].Gradegroup, + Battletime: v.Boss[req.BoosType].Battletime, Line: v.Boss[req.BoosType].Line, } } diff --git a/pb/enchant_db.pb.go b/pb/enchant_db.pb.go index ff82ea448..b6a48e09f 100644 --- a/pb/enchant_db.pb.go +++ b/pb/enchant_db.pb.go @@ -100,6 +100,7 @@ type DBEnchantBoos struct { Grade int32 `protobuf:"varint,2,opt,name=grade,proto3" json:"grade"` Gradegroup int32 `protobuf:"varint,3,opt,name=gradegroup,proto3" json:"gradegroup"` Line *LineData `protobuf:"bytes,4,opt,name=line,proto3" json:"line"` + Battletime int32 `protobuf:"varint,5,opt,name=battletime,proto3" json:"battletime"` } func (x *DBEnchantBoos) Reset() { @@ -162,6 +163,13 @@ func (x *DBEnchantBoos) GetLine() *LineData { return nil } +func (x *DBEnchantBoos) GetBattletime() int32 { + if x != nil { + return x.Battletime + } + return 0 +} + // 排行榜 type DBEnchantRank struct { state protoimpl.MessageState @@ -174,6 +182,7 @@ type DBEnchantRank struct { Score int32 `protobuf:"varint,4,opt,name=score,proto3" json:"score"` //积分 Grade int32 `protobuf:"varint,5,opt,name=grade,proto3" json:"grade"` //评级 Gradegroup int32 `protobuf:"varint,6,opt,name=gradegroup,proto3" json:"gradegroup"` //评分组 + Battletime int32 `protobuf:"varint,7,opt,name=battletime,proto3" json:"battletime"` //战斗时长 } func (x *DBEnchantRank) Reset() { @@ -250,6 +259,13 @@ func (x *DBEnchantRank) GetGradegroup() int32 { return 0 } +func (x *DBEnchantRank) GetBattletime() int32 { + if x != nil { + return x.Battletime + } + return 0 +} + var File_enchant_enchant_db_proto protoreflect.FileDescriptor var file_enchant_enchant_db_proto_rawDesc = []byte{ @@ -269,27 +285,31 @@ var file_enchant_enchant_db_proto_rawDesc = []byte{ 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, 0x42, 0x6f, 0x6f, 0x73, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7a, 0x0a, 0x0d, 0x44, 0x42, 0x45, 0x6e, 0x63, - 0x68, 0x61, 0x6e, 0x74, 0x42, 0x6f, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x64, 0x65, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, - 0x69, 0x6e, 0x65, 0x22, 0xaf, 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, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9a, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x45, 0x6e, + 0x63, 0x68, 0x61, 0x6e, 0x74, 0x42, 0x6f, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x02, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, + 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, } var (