From 592503d08dbb7a1330f194b03d004d9ce2091c01 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 6 Nov 2023 10:03:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E6=B8=B8=E6=88=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/dcolor/api_award.go | 58 ++++++++++++-------------------- modules/dcolor/api_singleover.go | 7 ++-- modules/dcolor/configure.go | 11 ++---- pb/dcolor_msg.pb.go | 26 +++----------- 4 files changed, 32 insertions(+), 70 deletions(-) diff --git a/modules/dcolor/api_award.go b/modules/dcolor/api_award.go index 37ef6a277..12211f917 100644 --- a/modules/dcolor/api_award.go +++ b/modules/dcolor/api_award.go @@ -14,17 +14,18 @@ func (this *apiComp) AwardCheck(session comm.IUserSession, req *pb.DColorAwardRe func (this *apiComp) Award(session comm.IUserSession, req *pb.DColorAwardReq) (errdata *pb.ErrorData) { var ( - info *pb.DBDColor - conf *cfg.GameGColorRewardData - atno []*pb.UserAtno - ok bool - err error + info *pb.DBDColor + confs []*cfg.GameGColorRewardData + res []*cfg.Gameatn + atno []*pb.UserAtno + ok bool + err error ) if errdata = this.AwardCheck(session, req); errdata != nil { return } - if conf, err = this.module.configure.getGameGColorRewardData(req.Id); err != nil { + if confs, err = this.module.configure.getGameGColorRewardDatas(); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_ConfigNoFound, Message: err.Error(), @@ -44,43 +45,27 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.DColorAwardReq) (e info.Weekaward = make(map[int32]bool) } - if _, ok = info.Weekaward[req.Id]; req.Atype == 0 && ok { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Message: "Weekaward Claimed!", + for _, conf := range confs { + if req.Atype == 0 && conf.Type == 1 { + if _, ok = info.Weekaward[conf.Key]; !ok && info.Integral >= conf.Condition { + res = append(res, conf.Reward...) + info.Weekaward[conf.Key] = true + } } - return - } - if _, ok = info.Allaward[req.Id]; req.Atype == 1 && ok { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Message: "Allaward Claimed!", + if req.Atype == 1 && conf.Type == 2 { + if _, ok = info.Allaward[conf.Key]; !ok && info.Accruedintegral >= conf.Condition { + res = append(res, conf.Reward...) + info.Allaward[conf.Key] = true + } } - return - } - if req.Atype == 0 && info.Integral < conf.Condition { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Message: "Integral Not enough points!", - } - return - } - if req.Atype == 0 && info.Accruedintegral < conf.Condition { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Message: "Accruedintegral Not enough points!", - } - return + } - if errdata, atno = this.module.DispenseAtno(session, conf.Reward, true); errdata != nil { + if errdata, atno = this.module.DispenseAtno(session, res, true); errdata != nil { return } if req.Atype == 0 { - info.Weekaward[req.Id] = true info.Weektime = configure.Now().Unix() - } else { - info.Allaward[req.Id] = true } this.module.model.Change(session.GetUserId(), map[string]interface{}{ @@ -88,7 +73,6 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.DColorAwardReq) (e "allaward": info.Allaward, "weektime": info.Weektime, }) - - session.SendMsg(string(this.module.GetType()), "info", &pb.DColorAwardResp{Id: req.Id, Atype: req.Atype, Award: atno}) + session.SendMsg(string(this.module.GetType()), "award", &pb.DColorAwardResp{Atype: req.Atype, Award: atno}) return } diff --git a/modules/dcolor/api_singleover.go b/modules/dcolor/api_singleover.go index 9d33c1784..9644fafac 100644 --- a/modules/dcolor/api_singleover.go +++ b/modules/dcolor/api_singleover.go @@ -17,6 +17,7 @@ func (this *apiComp) SingleOverCheck(session comm.IUserSession, req *pb.DColorSi func (this *apiComp) SingleOver(session comm.IUserSession, req *pb.DColorSingleOverReq) (errdata *pb.ErrorData) { var ( info *pb.DBDColor + score int32 conf *cfg.GameGColorGetfractionData tconf *cfg.GameGColortTmedecayData err error @@ -45,8 +46,8 @@ func (this *apiComp) SingleOver(session comm.IUserSession, req *pb.DColorSingleO } return } - - info.Integral += int32(math.Floor(float64(conf.Fraction) * float64(tconf.Pro) / float64(1000))) + score = int32(math.Floor(float64(conf.Fraction) * float64(tconf.Pro) / float64(1000))) + info.Integral += score if err = this.module.model.Change(session.GetUserId(), map[string]interface{}{ "integral": info.Integral, }); err != nil { @@ -56,6 +57,6 @@ func (this *apiComp) SingleOver(session comm.IUserSession, req *pb.DColorSingleO } return } - session.SendMsg(string(this.module.GetType()), "singleover", &pb.DColorSingleOverResp{Integral: info.Integral}) + session.SendMsg(string(this.module.GetType()), "singleover", &pb.DColorSingleOverResp{Integral: score}) return } diff --git a/modules/dcolor/configure.go b/modules/dcolor/configure.go index 70ab62486..b7e671b9d 100644 --- a/modules/dcolor/configure.go +++ b/modules/dcolor/configure.go @@ -115,18 +115,13 @@ func (this *configureComp) getGameGColortTmedecayData(time int32) (conf *cfg.Gam } // 获取奖励列表 -func (this *configureComp) getGameGColorRewardData(id int32) (conf *cfg.GameGColorRewardData, err error) { +func (this *configureComp) getGameGColorRewardDatas() (confs []*cfg.GameGColorRewardData, err error) { var ( - v interface{} - ok bool + v interface{} ) if v, err = this.GetConfigure(game_gcolorreward); err != nil { return } - if conf, ok = v.(*cfg.GameGColorReward).GetDataMap()[id]; !ok { - err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_gcolorreward, id) - this.module.Errorln(err) - return - } + confs = v.(*cfg.GameGColorReward).GetDataList() return } diff --git a/pb/dcolor_msg.pb.go b/pb/dcolor_msg.pb.go index 3338deac7..259a39f22 100644 --- a/pb/dcolor_msg.pb.go +++ b/pb/dcolor_msg.pb.go @@ -1178,7 +1178,6 @@ type DColorAwardReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` Atype int32 `protobuf:"varint,2,opt,name=atype,proto3" json:"atype"` //0 周奖励 1 累计奖励 } @@ -1214,13 +1213,6 @@ func (*DColorAwardReq) Descriptor() ([]byte, []int) { return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{21} } -func (x *DColorAwardReq) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - func (x *DColorAwardReq) GetAtype() int32 { if x != nil { return x.Atype @@ -1233,7 +1225,6 @@ type DColorAwardResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` Atype int32 `protobuf:"varint,2,opt,name=atype,proto3" json:"atype"` //0 周奖励 1 累计奖励 Award []*UserAtno `protobuf:"bytes,3,rep,name=award,proto3" json:"award"` //获取资源 } @@ -1270,13 +1261,6 @@ func (*DColorAwardResp) Descriptor() ([]byte, []int) { return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{22} } -func (x *DColorAwardResp) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - func (x *DColorAwardResp) GetAtype() int32 { if x != nil { return x.Atype @@ -1398,13 +1382,11 @@ var file_dcolor_dcolor_msg_proto_rawDesc = []byte{ 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x6c, 0x75, 0x65, - 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x36, 0x0a, 0x0e, 0x44, 0x43, 0x6f, 0x6c, - 0x6f, 0x72, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x74, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x26, 0x0a, 0x0e, 0x44, 0x43, 0x6f, 0x6c, + 0x6f, 0x72, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x61, 0x74, 0x79, 0x70, 0x65, - 0x22, 0x58, 0x0a, 0x0f, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x22, 0x48, 0x0a, 0x0f, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x61, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 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, From d7e592959569603c131613364d682000d4e022b1 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 6 Nov 2023 11:30:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=B4=AF=E8=AE=A1?= =?UTF-8?q?=E7=A7=AF=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/dcolor/api_award.go | 23 ++++----- modules/dcolor/api_singleover.go | 4 +- modules/dcolor/module.go | 29 ++++++++--- modules/dcolor/room.go | 12 +++-- pb/battle_struct.pb.go | 10 ++-- pb/dcolor_db.pb.go | 85 ++++++++++++++++++-------------- 6 files changed, 96 insertions(+), 67 deletions(-) diff --git a/modules/dcolor/api_award.go b/modules/dcolor/api_award.go index 12211f917..1f2a71b4c 100644 --- a/modules/dcolor/api_award.go +++ b/modules/dcolor/api_award.go @@ -46,19 +46,20 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.DColorAwardReq) (e } for _, conf := range confs { - if req.Atype == 0 && conf.Type == 1 { - if _, ok = info.Weekaward[conf.Key]; !ok && info.Integral >= conf.Condition { - res = append(res, conf.Reward...) - info.Weekaward[conf.Key] = true + if req.Atype == conf.Type { + if req.Atype == 1 { + if _, ok = info.Weekaward[conf.Key]; !ok && info.Integral >= conf.Condition { + res = append(res, conf.Reward...) + info.Weekaward[conf.Key] = true + } + } else { + if _, ok = info.Allaward[conf.Key]; !ok && info.Accruedintegral >= conf.Condition { + res = append(res, conf.Reward...) + info.Allaward[conf.Key] = true + } } - } - if req.Atype == 1 && conf.Type == 2 { - if _, ok = info.Allaward[conf.Key]; !ok && info.Accruedintegral >= conf.Condition { - res = append(res, conf.Reward...) - info.Allaward[conf.Key] = true - } - } + } } if errdata, atno = this.module.DispenseAtno(session, res, true); errdata != nil { diff --git a/modules/dcolor/api_singleover.go b/modules/dcolor/api_singleover.go index 9644fafac..f73cdeaff 100644 --- a/modules/dcolor/api_singleover.go +++ b/modules/dcolor/api_singleover.go @@ -48,8 +48,10 @@ func (this *apiComp) SingleOver(session comm.IUserSession, req *pb.DColorSingleO } score = int32(math.Floor(float64(conf.Fraction) * float64(tconf.Pro) / float64(1000))) info.Integral += score + info.Accruedintegral += score if err = this.module.model.Change(session.GetUserId(), map[string]interface{}{ - "integral": info.Integral, + "integral": info.Integral, + "accruedintegral": info.Accruedintegral, }); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, diff --git a/modules/dcolor/module.go b/modules/dcolor/module.go index 55554741a..779c39fb0 100644 --- a/modules/dcolor/module.go +++ b/modules/dcolor/module.go @@ -65,17 +65,26 @@ func (this *DColor) OnInstallComp() { func (this *DColor) CreateRoom(sessions []comm.IUserSession, rulesStr string) (roomid string, err error) { var ( - rules *GameRules = &GameRules{} - red *pb.DBUser - blue *pb.DBUser - room *Room + rules *GameRules = &GameRules{} + redinfo *pb.DBDColor + blueinfo *pb.DBDColor + red *pb.DBUser + blue *pb.DBUser + room *Room ) if err = json.Unmarshal([]byte(rulesStr), rules); err != nil { this.Error("解析规则json", log.Field{Key: "err", Value: err.Error()}) return } - + if redinfo, err = this.model.getModel(sessions[0].GetUserId()); err != nil { + this.Error("未找到红方信息", log.Field{Key: "uid", Value: sessions[0].GetUserId()}) + return + } + if blueinfo, err = this.model.getModel(sessions[0].GetUserId()); err != nil { + this.Error("未找到蓝方信息", log.Field{Key: "uid", Value: sessions[0].GetUserId()}) + return + } //发起者 red red, err = this.ModuleUser.GetUser(sessions[0].GetUserId()) if err != nil { @@ -95,10 +104,16 @@ func (this *DColor) CreateRoom(sessions []comm.IUserSession, rulesStr string) (r Results: RandomColor(rules.Difficulty, rules.Repeat), Handles: make([]*pb.DBDColorResult, 0), Red: &pb.DBDColorRoomPlayer{ - Info: comm.GetUserBaseInfo(red), + Info: comm.GetUserBaseInfo(red), + Integral: redinfo.Integral, + Maxintegral: redinfo.Maxintegral, + Accruedintegral: redinfo.Accruedintegral, }, Blue: &pb.DBDColorRoomPlayer{ - Info: comm.GetUserBaseInfo(blue), + Info: comm.GetUserBaseInfo(blue), + Integral: blueinfo.Integral, + Maxintegral: blueinfo.Maxintegral, + Accruedintegral: blueinfo.Accruedintegral, }, }, sessions); err != nil { this.Error("创建房间错误", log.Field{Key: "err", Value: err.Error()}) diff --git a/modules/dcolor/room.go b/modules/dcolor/room.go index c0a600979..ead662d82 100644 --- a/modules/dcolor/room.go +++ b/modules/dcolor/room.go @@ -100,20 +100,24 @@ func (this *Room) PlayerHandle(uid string, handle *pb.DColorHandleReq) (err erro this.data.Red.Score = int32(math.Floor(float64(conf.Fail) * float64(tconf.Pro) / float64(1000))) } this.data.Red.Integral += this.data.Red.Score + this.data.Red.Accruedintegral += this.data.Blue.Score if this.data.Red.Score > this.data.Red.Maxintegral { this.data.Red.Maxintegral = this.data.Red.Score } this.data.Blue.Integral += this.data.Blue.Score + this.data.Blue.Accruedintegral += this.data.Blue.Score if this.data.Blue.Score > this.data.Blue.Maxintegral { this.data.Blue.Maxintegral = this.data.Blue.Score } this.module.model.Change(this.data.Red.Info.Uid, map[string]interface{}{ - "integral": this.data.Red.Integral, - "maxintegral": this.data.Red.Maxintegral, + "integral": this.data.Red.Integral, + "accruedintegral": this.data.Red.Accruedintegral, + "maxintegral": this.data.Red.Maxintegral, }) this.module.model.Change(this.data.Blue.Info.Uid, map[string]interface{}{ - "integral": this.data.Blue.Integral, - "maxintegral": this.data.Blue.Maxintegral, + "integral": this.data.Blue.Integral, + "accruedintegral": this.data.Blue.Accruedintegral, + "maxintegral": this.data.Blue.Maxintegral, }) if err = this.Broadcast("gameover", &pb.DColorGameOverPush{ Winside: this.currside, diff --git a/pb/battle_struct.pb.go b/pb/battle_struct.pb.go index 6ce0aecf6..10e11b58f 100644 --- a/pb/battle_struct.pb.go +++ b/pb/battle_struct.pb.go @@ -41,7 +41,6 @@ const ( EffectTipsType_Bleed EffectTipsType = 15 //流血 EffectTipsType_Recovery EffectTipsType = 16 //复苏 EffectTipsType_BeatBack EffectTipsType = 17 //反击 - EffectTipsType_Diseased EffectTipsType = 18 //禁疗 ) // Enum value maps for EffectTipsType. @@ -65,7 +64,6 @@ var ( 15: "Bleed", 16: "Recovery", 17: "BeatBack", - 18: "Diseased", } EffectTipsType_value = map[string]int32{ "Eff_Success": 0, @@ -86,7 +84,6 @@ var ( "Bleed": 15, "Recovery": 16, "BeatBack": 17, - "Diseased": 18, } ) @@ -1951,7 +1948,7 @@ var file_battle_battle_struct_proto_rawDesc = []byte{ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x75, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x26, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x65, 0x6e, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x2a, 0xaa, 0x02, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x2a, 0x9c, 0x02, 0x0a, 0x0e, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x54, 0x69, 0x70, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x66, 0x66, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, @@ -1969,9 +1966,8 @@ var file_battle_battle_struct_proto_rawDesc = []byte{ 0x6e, 0x64, 0x65, 0x61, 0x64, 0x10, 0x0d, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x6f, 0x69, 0x73, 0x6f, 0x6e, 0x65, 0x64, 0x10, 0x0e, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x6c, 0x65, 0x65, 0x64, 0x10, 0x0f, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x10, 0x10, 0x12, 0x0c, - 0x0a, 0x08, 0x42, 0x65, 0x61, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x10, 0x11, 0x12, 0x0c, 0x0a, 0x08, - 0x44, 0x69, 0x73, 0x65, 0x61, 0x73, 0x65, 0x64, 0x10, 0x12, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x08, 0x42, 0x65, 0x61, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x10, 0x11, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/dcolor_db.pb.go b/pb/dcolor_db.pb.go index 9df1b2e55..ade504939 100644 --- a/pb/dcolor_db.pb.go +++ b/pb/dcolor_db.pb.go @@ -338,12 +338,13 @@ type DBDColorRoomPlayer struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Info *BaseUserInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` //发起者信息 - Isai bool `protobuf:"varint,2,opt,name=isai,proto3" json:"isai"` - Ready bool `protobuf:"varint,3,opt,name=ready,proto3" json:"ready"` - Score int32 `protobuf:"varint,4,opt,name=score,proto3" json:"score"` - Integral int32 `protobuf:"varint,5,opt,name=integral,proto3" json:"integral"` - Maxintegral int32 `protobuf:"varint,6,opt,name=maxintegral,proto3" json:"maxintegral"` + Info *BaseUserInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` //发起者信息 + Isai bool `protobuf:"varint,2,opt,name=isai,proto3" json:"isai"` + Ready bool `protobuf:"varint,3,opt,name=ready,proto3" json:"ready"` + Score int32 `protobuf:"varint,4,opt,name=score,proto3" json:"score"` + Integral int32 `protobuf:"varint,5,opt,name=integral,proto3" json:"integral"` + Maxintegral int32 `protobuf:"varint,6,opt,name=maxintegral,proto3" json:"maxintegral"` + Accruedintegral int32 `protobuf:"varint,7,opt,name=accruedintegral,proto3" json:"accruedintegral"` //累计积分 } func (x *DBDColorRoomPlayer) Reset() { @@ -420,6 +421,13 @@ func (x *DBDColorRoomPlayer) GetMaxintegral() int32 { return 0 } +func (x *DBDColorRoomPlayer) GetAccruedintegral() int32 { + if x != nil { + return x.Accruedintegral + } + return 0 +} + type DBDColorResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -646,7 +654,7 @@ var file_dcolor_dcolor_db_proto_rawDesc = []byte{ 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xb5, 0x01, 0x0a, 0x12, 0x44, 0x42, 0x44, + 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xdf, 0x01, 0x0a, 0x12, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, @@ -658,36 +666,39 @@ var file_dcolor_dcolor_db_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, - 0x22, 0x8a, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x6c, 0x72, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x72, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x61, 0x6c, 0x66, 0x70, 0x61, 0x69, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x08, 0x68, 0x61, 0x6c, 0x66, 0x70, 0x61, 0x69, 0x72, 0x22, 0x82, 0x02, - 0x0a, 0x0c, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x10, - 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, - 0x12, 0x33, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x44, - 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, - 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, - 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x27, - 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, - 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, - 0x6c, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x73, 0x2a, 0x3a, 0x0a, 0x12, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x44, 0x69, - 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x70, - 0x6c, 0x65, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, - 0x74, 0x79, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x65, 0x6c, 0x6c, 0x10, 0x02, 0x42, 0x06, - 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x72, 0x75, 0x65, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x72, 0x75, + 0x65, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x8a, 0x01, 0x0a, 0x0e, 0x44, + 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x6c, 0x72, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x72, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, + 0x61, 0x6c, 0x66, 0x70, 0x61, 0x69, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x68, + 0x61, 0x6c, 0x66, 0x70, 0x61, 0x69, 0x72, 0x22, 0x82, 0x02, 0x0a, 0x0c, 0x44, 0x42, 0x44, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x0a, 0x64, 0x69, + 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, + 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, + 0x6c, 0x74, 0x79, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, + 0x16, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x12, 0x25, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x04, 0x62, 0x6c, 0x75, + 0x65, 0x12, 0x29, 0x0a, 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2a, 0x3a, 0x0a, 0x12, + 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x79, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x0e, + 0x0a, 0x0a, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x10, 0x01, 0x12, 0x08, + 0x0a, 0x04, 0x48, 0x65, 0x6c, 0x6c, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var (