diff --git a/modules/integral/api_achieve.go b/modules/integral/api_achieve.go index 6db3be76b..61a538213 100644 --- a/modules/integral/api_achieve.go +++ b/modules/integral/api_achieve.go @@ -57,6 +57,7 @@ func (this *apiComp) GetAchieve(session comm.IUserSession, req *pb.IntegralGetAc } list.Achieve[req.Id] = 1 update["achieve"] = list.Achieve // 更新数据 + if err = this.module.modelIntegral.modifyIntegralData(session.GetUserId(), update); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, @@ -69,8 +70,8 @@ func (this *apiComp) GetAchieve(session comm.IUserSession, req *pb.IntegralGetAc return } session.SendMsg(string(this.module.GetType()), "getachieve", &pb.IntegralGetAchieveResp{ - Achieve: list.Achieve, - Award: atno, + Id: req.Id, + Award: atno, }) return } diff --git a/modules/integral/api_challengeover.go b/modules/integral/api_challengeover.go index 9aeeff795..6e4bf8b79 100644 --- a/modules/integral/api_challengeover.go +++ b/modules/integral/api_challengeover.go @@ -149,6 +149,10 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.IntegralCh if errdata, atno = this.module.DispenseAtno(session, res, true); errdata != nil { return } + list.Carrybuff[req.Nandu] = &pb.FreightBuff{ + Buff: req.Report.Info.Buffer, + } + update["carrybuff"] = list.Carrybuff if err = this.module.modelIntegral.modifyIntegralData(session.GetUserId(), update); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, diff --git a/modules/integral/api_rank.go b/modules/integral/api_rank.go index 430ccf75b..203ea30f8 100644 --- a/modules/integral/api_rank.go +++ b/modules/integral/api_rank.go @@ -55,19 +55,7 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.IntegralRankLis } players = make([]*pb.DBIntegralRank, len(ranks)) for i, v := range ranks { - if bInRank { // 入榜了 - if v.Uid == session.GetUserId() { - myself = players[i] - } - players[i] = &pb.DBIntegralRank{ - Id: v.Uid, - Uinfo: v.Uinfo, - Nandu: v.Nandu, - Score: v.Score[req.Nandu], - Line: v.Line[req.Nandu], - } - - } else { // 没入榜 + if !bInRank { // 没入榜 if v.Uid == session.GetUserId() { myself = players[i] } else { @@ -77,10 +65,22 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.IntegralRankLis Nandu: v.Nandu, Score: v.Score[req.Nandu], Line: v.Line[req.Nandu], + Buff: v.Carrybuff[req.Nandu].Buff, } } + } else { // 入榜了 + if v.Uid == session.GetUserId() { + myself = players[i] + } + players[i] = &pb.DBIntegralRank{ + Id: v.Uid, + Uinfo: v.Uinfo, + Nandu: v.Nandu, + Score: v.Score[req.Nandu], + Line: v.Line[req.Nandu], + Buff: v.Carrybuff[req.Nandu].Buff, + } } - } // // 获取好友 // fids := this.module.ModuleFriend.GetFriendList(session.GetUserId()) diff --git a/modules/integral/model_integral.go b/modules/integral/model_integral.go index ef915c8a4..f52f00dc1 100644 --- a/modules/integral/model_integral.go +++ b/modules/integral/model_integral.go @@ -47,14 +47,22 @@ func (this *modelIntegral) queryPlayers(uIds []string) (result []*pb.DBIntegralB // 获取列表信息 func (this *modelIntegral) getIntegralList(session comm.IUserSession) (result *pb.DBIntegralBoss, err error) { uid := session.GetUserId() - result = &pb.DBIntegralBoss{} + result = &pb.DBIntegralBoss{ + Buff: map[int32]int32{}, + Score: map[int32]int32{}, + Uinfo: &pb.BaseUserInfo{}, + Line: map[int32]*pb.LineData{}, + Achieve: map[int32]int32{}, + Carrybuff: map[int32]*pb.FreightBuff{}, + } if err = this.Get(uid, result); mgo.MongodbNil == err { result.Id = primitive.NewObjectID().Hex() result.Uid = uid result.Buff = make(map[int32]int32) result.Score = make(map[int32]int32) result.Line = make(map[int32]*pb.LineData, 0) - result.Achieve = make(map[int32]int32) // 初始化成就 + result.Achieve = make(map[int32]int32) // 初始化成就 + result.Carrybuff = make(map[int32]*pb.FreightBuff) // 初始化成就 // 获取当前的hid curTime := configure.Now().Unix() szConf := this.module.configure.GetIntegralITime() diff --git a/pb/integral_db.pb.go b/pb/integral_db.pb.go index 63f50f47b..2f3659c91 100644 --- a/pb/integral_db.pb.go +++ b/pb/integral_db.pb.go @@ -25,23 +25,24 @@ 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"` //用户基础 - 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"` - Achieve map[int32]int32 `protobuf:"bytes,17,rep,name=achieve,proto3" json:"achieve" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 成就奖励 key 成就id + 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"` + Achieve map[int32]int32 `protobuf:"bytes,17,rep,name=achieve,proto3" json:"achieve" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 成就奖励 key 成就id + Carrybuff map[int32]*FreightBuff `protobuf:"bytes,18,rep,name=carrybuff,proto3" json:"carrybuff" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 携带的buff } func (x *DBIntegralBoss) Reset() { @@ -195,6 +196,60 @@ func (x *DBIntegralBoss) GetAchieve() map[int32]int32 { return nil } +func (x *DBIntegralBoss) GetCarrybuff() map[int32]*FreightBuff { + if x != nil { + return x.Carrybuff + } + return nil +} + +type FreightBuff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Buff []int32 `protobuf:"varint,6,rep,packed,name=buff,proto3" json:"buff"` +} + +func (x *FreightBuff) Reset() { + *x = FreightBuff{} + if protoimpl.UnsafeEnabled { + mi := &file_integral_integral_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FreightBuff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FreightBuff) ProtoMessage() {} + +func (x *FreightBuff) 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 FreightBuff.ProtoReflect.Descriptor instead. +func (*FreightBuff) Descriptor() ([]byte, []int) { + return file_integral_integral_db_proto_rawDescGZIP(), []int{1} +} + +func (x *FreightBuff) GetBuff() []int32 { + if x != nil { + return x.Buff + } + return nil +} + // 积分boss 排行 type DBIntegralRank struct { state protoimpl.MessageState @@ -206,12 +261,13 @@ type DBIntegralRank struct { 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"` // 阵容信息 + Buff []int32 `protobuf:"varint,6,rep,packed,name=buff,proto3" json:"buff"` } 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) } @@ -224,7 +280,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 { @@ -237,7 +293,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 { @@ -275,6 +331,13 @@ func (x *DBIntegralRank) GetLine() *LineData { return nil } +func (x *DBIntegralRank) GetBuff() []int32 { + if x != nil { + return x.Buff + } + return nil +} + var File_integral_integral_db_proto protoreflect.FileDescriptor var file_integral_integral_db_proto_rawDesc = []byte{ @@ -282,7 +345,7 @@ var file_integral_integral_db_proto_rawDesc = []byte{ 0x72, 0x61, 0x6c, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 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, 0x82, 0x06, 0x0a, 0x0e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, + 0x6f, 0x22, 0x8c, 0x07, 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, @@ -315,32 +378,44 @@ var file_integral_integral_db_proto_rawDesc = []byte{ 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x61, 0x63, 0x68, 0x69, - 0x65, 0x76, 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, 0x1a, 0x3a, 0x0a, 0x0c, 0x41, 0x63, - 0x68, 0x69, 0x65, 0x76, 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, 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, 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, + 0x65, 0x76, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x72, 0x79, 0x62, 0x75, 0x66, 0x66, + 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x43, 0x61, 0x72, 0x72, 0x79, 0x62, 0x75, 0x66, + 0x66, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x63, 0x61, 0x72, 0x72, 0x79, 0x62, 0x75, 0x66, + 0x66, 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, 0x1a, 0x3a, 0x0a, 0x0c, 0x41, 0x63, 0x68, 0x69, + 0x65, 0x76, 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, 0x4a, 0x0a, 0x0e, 0x43, 0x61, 0x72, 0x72, 0x79, 0x62, 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, 0x22, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x46, 0x72, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x42, 0x75, 0x66, 0x66, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x21, 0x0a, 0x0b, 0x46, 0x72, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x75, 0x66, 0x66, 0x12, + 0x12, 0x0a, 0x04, 0x62, 0x75, 0x66, 0x66, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x62, + 0x75, 0x66, 0x66, 0x22, 0xa4, 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, 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, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x75, 0x66, 0x66, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x62, 0x75, 0x66, 0x66, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -355,31 +430,35 @@ 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, 6) +var file_integral_integral_db_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_integral_integral_db_proto_goTypes = []interface{}{ (*DBIntegralBoss)(nil), // 0: DBIntegralBoss - (*DBIntegralRank)(nil), // 1: DBIntegralRank - nil, // 2: DBIntegralBoss.BuffEntry - nil, // 3: DBIntegralBoss.ScoreEntry - nil, // 4: DBIntegralBoss.LineEntry - nil, // 5: DBIntegralBoss.AchieveEntry - (*BaseUserInfo)(nil), // 6: BaseUserInfo - (*LineData)(nil), // 7: LineData + (*FreightBuff)(nil), // 1: FreightBuff + (*DBIntegralRank)(nil), // 2: DBIntegralRank + nil, // 3: DBIntegralBoss.BuffEntry + nil, // 4: DBIntegralBoss.ScoreEntry + nil, // 5: DBIntegralBoss.LineEntry + nil, // 6: DBIntegralBoss.AchieveEntry + nil, // 7: DBIntegralBoss.CarrybuffEntry + (*BaseUserInfo)(nil), // 8: BaseUserInfo + (*LineData)(nil), // 9: LineData } var file_integral_integral_db_proto_depIdxs = []int32{ - 2, // 0: DBIntegralBoss.buff:type_name -> DBIntegralBoss.BuffEntry - 3, // 1: DBIntegralBoss.score:type_name -> DBIntegralBoss.ScoreEntry - 6, // 2: DBIntegralBoss.uinfo:type_name -> BaseUserInfo - 4, // 3: DBIntegralBoss.line:type_name -> DBIntegralBoss.LineEntry - 5, // 4: DBIntegralBoss.achieve:type_name -> DBIntegralBoss.AchieveEntry - 6, // 5: DBIntegralRank.uinfo:type_name -> BaseUserInfo - 7, // 6: DBIntegralRank.line:type_name -> LineData - 7, // 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 + 3, // 0: DBIntegralBoss.buff:type_name -> DBIntegralBoss.BuffEntry + 4, // 1: DBIntegralBoss.score:type_name -> DBIntegralBoss.ScoreEntry + 8, // 2: DBIntegralBoss.uinfo:type_name -> BaseUserInfo + 5, // 3: DBIntegralBoss.line:type_name -> DBIntegralBoss.LineEntry + 6, // 4: DBIntegralBoss.achieve:type_name -> DBIntegralBoss.AchieveEntry + 7, // 5: DBIntegralBoss.carrybuff:type_name -> DBIntegralBoss.CarrybuffEntry + 8, // 6: DBIntegralRank.uinfo:type_name -> BaseUserInfo + 9, // 7: DBIntegralRank.line:type_name -> LineData + 9, // 8: DBIntegralBoss.LineEntry.value:type_name -> LineData + 1, // 9: DBIntegralBoss.CarrybuffEntry.value:type_name -> FreightBuff + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_integral_integral_db_proto_init() } @@ -403,6 +482,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.(*FreightBuff); 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 @@ -421,7 +512,7 @@ func file_integral_integral_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_integral_integral_db_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/integral_msg.pb.go b/pb/integral_msg.pb.go index e69327a4a..b44736969 100644 --- a/pb/integral_msg.pb.go +++ b/pb/integral_msg.pb.go @@ -603,8 +603,8 @@ type IntegralGetAchieveResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Achieve map[int32]int32 `protobuf:"bytes,1,rep,name=achieve,proto3" json:"achieve" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 成就奖励 key 成就id - Award []*UserAtno `protobuf:"bytes,2,rep,name=award,proto3" json:"award"` //奖励 + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` + Award []*UserAtno `protobuf:"bytes,2,rep,name=award,proto3" json:"award"` //奖励 } func (x *IntegralGetAchieveResp) Reset() { @@ -639,11 +639,11 @@ func (*IntegralGetAchieveResp) Descriptor() ([]byte, []int) { return file_integral_integral_msg_proto_rawDescGZIP(), []int{11} } -func (x *IntegralGetAchieveResp) GetAchieve() map[int32]int32 { +func (x *IntegralGetAchieveResp) GetId() int32 { if x != nil { - return x.Achieve + return x.Id } - return nil + return 0 } func (x *IntegralGetAchieveResp) GetAward() []*UserAtno { @@ -719,19 +719,12 @@ var file_integral_integral_msg_proto_rawDesc = []byte{ 0x52, 0x06, 0x6d, 0x79, 0x73, 0x65, 0x6c, 0x66, 0x22, 0x27, 0x0a, 0x15, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, - 0x64, 0x22, 0xb5, 0x01, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, - 0x74, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x07, - 0x61, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x63, 0x68, 0x69, 0x65, - 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x07, 0x61, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x12, 0x1f, 0x0a, 0x05, - 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x3a, 0x0a, - 0x0c, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x22, 0x49, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, + 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x61, + 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -746,7 +739,7 @@ func file_integral_integral_msg_proto_rawDescGZIP() []byte { return file_integral_integral_msg_proto_rawDescData } -var file_integral_integral_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_integral_integral_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_integral_integral_msg_proto_goTypes = []interface{}{ (*IntegralGetListReq)(nil), // 0: IntegralGetListReq (*IntegralGetListResp)(nil), // 1: IntegralGetListResp @@ -761,33 +754,31 @@ var file_integral_integral_msg_proto_goTypes = []interface{}{ (*IntegralGetAchieveReq)(nil), // 10: IntegralGetAchieveReq (*IntegralGetAchieveResp)(nil), // 11: IntegralGetAchieveResp nil, // 12: IntegralChallengeOverResp.HeroexpEntry - nil, // 13: IntegralGetAchieveResp.AchieveEntry - (*DBIntegralBoss)(nil), // 14: DBIntegralBoss - (*BattleFormation)(nil), // 15: BattleFormation - (*BattleInfo)(nil), // 16: BattleInfo - (*BattleReport)(nil), // 17: BattleReport - (*UserAtno)(nil), // 18: UserAtno - (*DBIntegralRank)(nil), // 19: DBIntegralRank + (*DBIntegralBoss)(nil), // 13: DBIntegralBoss + (*BattleFormation)(nil), // 14: BattleFormation + (*BattleInfo)(nil), // 15: BattleInfo + (*BattleReport)(nil), // 16: BattleReport + (*UserAtno)(nil), // 17: UserAtno + (*DBIntegralRank)(nil), // 18: DBIntegralRank } var file_integral_integral_msg_proto_depIdxs = []int32{ - 14, // 0: IntegralGetListResp.data:type_name -> DBIntegralBoss - 15, // 1: IntegralChallengeReq.battle:type_name -> BattleFormation - 16, // 2: IntegralChallengeResp.info:type_name -> BattleInfo - 17, // 3: IntegralChallengeOverReq.report:type_name -> BattleReport - 14, // 4: IntegralChallengeOverResp.data:type_name -> DBIntegralBoss - 18, // 5: IntegralChallengeOverResp.atno:type_name -> UserAtno + 13, // 0: IntegralGetListResp.data:type_name -> DBIntegralBoss + 14, // 1: IntegralChallengeReq.battle:type_name -> BattleFormation + 15, // 2: IntegralChallengeResp.info:type_name -> BattleInfo + 16, // 3: IntegralChallengeOverReq.report:type_name -> BattleReport + 13, // 4: IntegralChallengeOverResp.data:type_name -> DBIntegralBoss + 17, // 5: IntegralChallengeOverResp.atno:type_name -> UserAtno 12, // 6: IntegralChallengeOverResp.heroexp:type_name -> IntegralChallengeOverResp.HeroexpEntry - 14, // 7: IntegralGetRewardResp.data:type_name -> DBIntegralBoss - 18, // 8: IntegralGetRewardResp.award:type_name -> UserAtno - 19, // 9: IntegralRankListResp.ranks:type_name -> DBIntegralRank - 19, // 10: IntegralRankListResp.myself:type_name -> DBIntegralRank - 13, // 11: IntegralGetAchieveResp.achieve:type_name -> IntegralGetAchieveResp.AchieveEntry - 18, // 12: IntegralGetAchieveResp.award:type_name -> UserAtno - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 13, // 7: IntegralGetRewardResp.data:type_name -> DBIntegralBoss + 17, // 8: IntegralGetRewardResp.award:type_name -> UserAtno + 18, // 9: IntegralRankListResp.ranks:type_name -> DBIntegralRank + 18, // 10: IntegralRankListResp.myself:type_name -> DBIntegralRank + 17, // 11: IntegralGetAchieveResp.award:type_name -> UserAtno + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_integral_integral_msg_proto_init() } @@ -950,7 +941,7 @@ func file_integral_integral_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_integral_integral_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 13, NumExtensions: 0, NumServices: 0, },