diff --git a/bin/json/game_consumetask.json b/bin/json/game_consumetask.json index 7190ad544..821ccab66 100644 --- a/bin/json/game_consumetask.json +++ b/bin/json/game_consumetask.json @@ -1,11 +1,7 @@ [ { "key": 1, - "task_integral": { - "a": "attr", - "t": "consumeexp", - "n": 100 - }, + "task_integral": 100, "reward": [ { "a": "attr", @@ -16,11 +12,7 @@ }, { "key": 2, - "task_integral": { - "a": "attr", - "t": "consumeexp", - "n": 200 - }, + "task_integral": 200, "reward": [ { "a": "attr", @@ -31,11 +23,7 @@ }, { "key": 3, - "task_integral": { - "a": "attr", - "t": "consumeexp", - "n": 300 - }, + "task_integral": 300, "reward": [ { "a": "attr", @@ -46,11 +34,7 @@ }, { "key": 4, - "task_integral": { - "a": "attr", - "t": "consumeexp", - "n": 400 - }, + "task_integral": 400, "reward": [ { "a": "attr", @@ -61,11 +45,7 @@ }, { "key": 5, - "task_integral": { - "a": "attr", - "t": "consumeexp", - "n": 500 - }, + "task_integral": 500, "reward": [ { "a": "attr", @@ -76,11 +56,7 @@ }, { "key": 6, - "task_integral": { - "a": "attr", - "t": "consumeexp", - "n": 600 - }, + "task_integral": 600, "reward": [ { "a": "attr", @@ -91,11 +67,7 @@ }, { "key": 7, - "task_integral": { - "a": "attr", - "t": "consumeexp", - "n": 700 - }, + "task_integral": 700, "reward": [ { "a": "attr", diff --git a/modules/entertainment/api_taskreward.go b/modules/entertainment/api_taskreward.go new file mode 100644 index 000000000..6d3194269 --- /dev/null +++ b/modules/entertainment/api_taskreward.go @@ -0,0 +1,62 @@ +package entertainment + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" +) + +//参数校验 +func (this *apiComp) TaskRewardCheck(session comm.IUserSession, req *pb.EntertainTaskRewardReq) (errdata *pb.ErrorData) { + if req.Score == 0 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + } + } + return +} + +// 限时任务 +func (this *apiComp) TaskReward(session comm.IUserSession, req *pb.EntertainTaskRewardReq) (errdata *pb.ErrorData) { + var ( + list *pb.DBXXLData + err error + atno []*pb.UserAtno + awards []*cfg.Gameatn + confs []*cfg.GameConsumeTaskData + ) + list, err = this.module.model.getEntertainmList(session.GetUserId()) + if err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + + confs = this.module.configure.GetConsumeTaskData() + + awards = make([]*cfg.Gameatn, 0) + for _, v := range confs { + if v.TaskIntegral <= req.Score { + if list.Taskprogess < v.TaskIntegral { + awards = append(awards, v.Reward...) + } + } + } + list.Taskprogess = req.Score + this.module.model.Change(session.GetUserId(), map[string]interface{}{ + "taskprogess": list.Taskprogess, + }) + session.SendMsg(string(this.module.GetType()), "taskreward", &pb.EntertainTaskRewardResp{ + Taskprogess: req.Score, + Award: atno, + }) + + go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { + this.module.WriteUserLog(session.GetUserId(), req, 0, "EntertainTaskRewardReq", atno) + }) + return +} diff --git a/modules/entertainment/configure.go b/modules/entertainment/configure.go index acedabbde..01297326c 100644 --- a/modules/entertainment/configure.go +++ b/modules/entertainment/configure.go @@ -20,6 +20,7 @@ const ( consume_box = "game_consumebox.json" game_playerskill = "game_playerskill.json" game_passcheck = "game_passcheck.json" + game_consumetask = "game_consumetask.json" ) // /配置管理组件 @@ -43,6 +44,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp game_playingmethod: cfg.NewGamePlayingMethod, consume_box: cfg.NewGameConsumeBox, game_playerskill: cfg.NewGamePlayerSkill, + game_consumetask: cfg.NewGameConsumeTask, }) configure.RegisterConfigure(game_block, cfg.NewGameBlock, this.LoadGameBlock) configure.RegisterConfigure(game_passcheck, cfg.NewGamePassCheck, this.updatePassCheck) @@ -350,6 +352,16 @@ func (this *configureComp) GetInitGameConsumeSkill() (skill []int32) { } } } + return +} + +// 获取任务 +func (this *configureComp) GetConsumeTaskData() (conf []*cfg.GameConsumeTaskData) { + if v, err := this.GetConfigure(game_consumetask); err == nil { + if configure, ok := v.(*cfg.GameConsumeTask); ok { + conf = configure.GetDataList() + } + } return } diff --git a/modules/robot/modulerobot_caravan.go b/modules/robot/modulerobot_caravan.go index 87a88c0e2..4f8879911 100644 --- a/modules/robot/modulerobot_caravan.go +++ b/modules/robot/modulerobot_caravan.go @@ -84,7 +84,7 @@ func (this *ModuleRobot_Caravan) DoPipeline(robot IRobot) (err error) { item: 2, }, IsBuy: true, - }); errdata != nil { //💕 + }); errdata != nil { err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message)) return } diff --git a/pb/entertain_db.pb.go b/pb/entertain_db.pb.go index f7ef3ccc2..6a114716a 100644 --- a/pb/entertain_db.pb.go +++ b/pb/entertain_db.pb.go @@ -459,6 +459,7 @@ type DBXXLData struct { Consumeexp int32 `protobuf:"varint,18,opt,name=consumeexp,proto3" json:"consumeexp"` //赛季积分 Maxsocre int32 `protobuf:"varint,19,opt,name=maxsocre,proto3" json:"maxsocre"` // 单局最大得分 Uinfo *BaseUserInfo `protobuf:"bytes,20,opt,name=uinfo,proto3" json:"uinfo"` //用户基础 + Taskprogess int32 `protobuf:"varint,21,opt,name=taskprogess,proto3" json:"taskprogess"` // 任务奖励进度 } func (x *DBXXLData) Reset() { @@ -633,6 +634,13 @@ func (x *DBXXLData) GetUinfo() *BaseUserInfo { return nil } +func (x *DBXXLData) GetTaskprogess() int32 { + if x != nil { + return x.Taskprogess + } + return 0 +} + // 三消游戏规则 type DBXxlRules struct { state protoimpl.MessageState @@ -850,7 +858,7 @@ var file_entertain_entertain_db_proto_rawDesc = []byte{ 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x6f, 0x78, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x70, 0x65, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x99, 0x06, 0x0a, 0x09, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x44, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xbb, 0x06, 0x0a, 0x09, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, @@ -889,48 +897,50 @@ var file_entertain_entertain_db_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x73, 0x6f, 0x63, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x14, 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, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 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, 0x37, - 0x0a, 0x09, 0x43, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x6b, 0x69, 0x6c, 0x6c, - 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, 0xac, 0x02, 0x0a, 0x0a, 0x44, 0x42, 0x58, 0x78, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x61, 0x72, 0x64, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x61, 0x72, - 0x64, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x72, 0x64, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x63, 0x61, 0x72, 0x64, 0x32, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x6b, 0x69, 0x6c, - 0x6c, 0x31, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x58, 0x78, 0x6c, - 0x52, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x31, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x31, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x6b, 0x69, - 0x6c, 0x6c, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x58, 0x78, - 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x32, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x32, 0x1a, 0x39, 0x0a, 0x0b, 0x53, 0x6b, - 0x69, 0x6c, 0x6c, 0x31, 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, 0x39, 0x0a, 0x0b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x32, 0x45, + 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x70, 0x72, 0x6f, 0x67, 0x65, + 0x73, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x70, 0x72, + 0x6f, 0x67, 0x65, 0x73, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 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, 0xa6, 0x01, 0x0a, 0x09, 0x58, 0x78, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x23, - 0x0a, 0x05, 0x75, 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, 0x05, 0x75, 0x69, - 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, - 0x6d, 0x61, 0x78, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, 0x70, 0x12, 0x1e, 0x0a, - 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, 0x70, 0x12, 0x1a, 0x0a, - 0x08, 0x6d, 0x61, 0x78, 0x73, 0x6f, 0x63, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x6d, 0x61, 0x78, 0x73, 0x6f, 0x63, 0x72, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1a, 0x37, 0x0a, 0x09, 0x43, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x6b, 0x69, + 0x6c, 0x6c, 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, 0xac, 0x02, 0x0a, 0x0a, 0x44, 0x42, 0x58, 0x78, 0x6c, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x61, 0x72, 0x64, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, + 0x61, 0x72, 0x64, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x72, 0x64, 0x32, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x61, 0x72, 0x64, 0x32, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x6b, + 0x69, 0x6c, 0x6c, 0x31, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x58, + 0x78, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x31, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x31, 0x12, 0x2f, 0x0a, 0x06, 0x73, + 0x6b, 0x69, 0x6c, 0x6c, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, + 0x58, 0x78, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x32, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x32, 0x1a, 0x39, 0x0a, 0x0b, + 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x31, 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, 0x39, 0x0a, 0x0b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, + 0x32, 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, 0xa6, 0x01, 0x0a, 0x09, 0x58, 0x78, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x12, 0x23, 0x0a, 0x05, 0x75, 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, 0x05, + 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x78, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, 0x70, 0x12, + 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, 0x70, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, 0x70, 0x12, + 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x73, 0x6f, 0x63, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x73, 0x6f, 0x63, 0x72, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/entertain_msg.pb.go b/pb/entertain_msg.pb.go index d9e06589c..bcb1fa522 100644 --- a/pb/entertain_msg.pb.go +++ b/pb/entertain_msg.pb.go @@ -2305,7 +2305,7 @@ type EntertainReceiveResp struct { unknownFields protoimpl.UnknownFields Info *DBXXLData `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` - Award []*UserAtno `protobuf:"bytes,4,rep,name=award,proto3" json:"award"` //奖励 + Award []*UserAtno `protobuf:"bytes,2,rep,name=award,proto3" json:"award"` //奖励 } func (x *EntertainReceiveResp) Reset() { @@ -2441,6 +2441,109 @@ func (x *EntertainRankResp) GetPlayers() []*XxlPlayer { return nil } +// 任务领奖 +type EntertainTaskRewardReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Score int32 `protobuf:"varint,1,opt,name=score,proto3" json:"score"` +} + +func (x *EntertainTaskRewardReq) Reset() { + *x = EntertainTaskRewardReq{} + if protoimpl.UnsafeEnabled { + mi := &file_entertain_entertain_msg_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EntertainTaskRewardReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntertainTaskRewardReq) ProtoMessage() {} + +func (x *EntertainTaskRewardReq) ProtoReflect() protoreflect.Message { + mi := &file_entertain_entertain_msg_proto_msgTypes[44] + 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 EntertainTaskRewardReq.ProtoReflect.Descriptor instead. +func (*EntertainTaskRewardReq) Descriptor() ([]byte, []int) { + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{44} +} + +func (x *EntertainTaskRewardReq) GetScore() int32 { + if x != nil { + return x.Score + } + return 0 +} + +type EntertainTaskRewardResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Taskprogess int32 `protobuf:"varint,1,opt,name=taskprogess,proto3" json:"taskprogess"` // 任务奖励进度 + Award []*UserAtno `protobuf:"bytes,4,rep,name=award,proto3" json:"award"` //奖励 +} + +func (x *EntertainTaskRewardResp) Reset() { + *x = EntertainTaskRewardResp{} + if protoimpl.UnsafeEnabled { + mi := &file_entertain_entertain_msg_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EntertainTaskRewardResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntertainTaskRewardResp) ProtoMessage() {} + +func (x *EntertainTaskRewardResp) ProtoReflect() protoreflect.Message { + mi := &file_entertain_entertain_msg_proto_msgTypes[45] + 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 EntertainTaskRewardResp.ProtoReflect.Descriptor instead. +func (*EntertainTaskRewardResp) Descriptor() ([]byte, []int) { + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{45} +} + +func (x *EntertainTaskRewardResp) GetTaskprogess() int32 { + if x != nil { + return x.Taskprogess + } + return 0 +} + +func (x *EntertainTaskRewardResp) GetAward() []*UserAtno { + if x != nil { + return x.Award + } + return nil +} + var File_entertain_entertain_msg_proto protoreflect.FileDescriptor var file_entertain_entertain_msg_proto_rawDesc = []byte{ @@ -2668,14 +2771,23 @@ var file_entertain_entertain_msg_proto_rawDesc = []byte{ 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x0a, 0x05, - 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, + 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, 0x22, 0x12, 0x0a, 0x10, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x22, 0x39, 0x0a, 0x11, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x58, 0x78, 0x6c, 0x50, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x65, 0x72, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x2e, 0x0a, 0x16, + 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x5c, 0x0a, 0x17, + 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x70, + 0x72, 0x6f, 0x67, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x61, + 0x73, 0x6b, 0x70, 0x72, 0x6f, 0x67, 0x65, 0x73, 0x73, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2690,7 +2802,7 @@ func file_entertain_entertain_msg_proto_rawDescGZIP() []byte { return file_entertain_entertain_msg_proto_rawDescData } -var file_entertain_entertain_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 46) +var file_entertain_entertain_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 48) var file_entertain_entertain_msg_proto_goTypes = []interface{}{ (*EntertainMatchReq)(nil), // 0: EntertainMatchReq (*EntertainMatchResp)(nil), // 1: EntertainMatchResp @@ -2736,51 +2848,54 @@ var file_entertain_entertain_msg_proto_goTypes = []interface{}{ (*EntertainReceiveResp)(nil), // 41: EntertainReceiveResp (*EntertainRankReq)(nil), // 42: EntertainRankReq (*EntertainRankResp)(nil), // 43: EntertainRankResp - nil, // 44: EntertainChangePush.CardEntry - nil, // 45: EntertainChangePush.SkillEntry - (*PlayerData)(nil), // 46: PlayerData - (*MapData)(nil), // 47: MapData - (*UserAtno)(nil), // 48: UserAtno - (*BoxData)(nil), // 49: BoxData - (*DBXXLData)(nil), // 50: DBXXLData - (*XxlPlayer)(nil), // 51: XxlPlayer + (*EntertainTaskRewardReq)(nil), // 44: EntertainTaskRewardReq + (*EntertainTaskRewardResp)(nil), // 45: EntertainTaskRewardResp + nil, // 46: EntertainChangePush.CardEntry + nil, // 47: EntertainChangePush.SkillEntry + (*PlayerData)(nil), // 48: PlayerData + (*MapData)(nil), // 49: MapData + (*UserAtno)(nil), // 50: UserAtno + (*BoxData)(nil), // 51: BoxData + (*DBXXLData)(nil), // 52: DBXXLData + (*XxlPlayer)(nil), // 53: XxlPlayer } var file_entertain_entertain_msg_proto_depIdxs = []int32{ - 46, // 0: EntertainStartGamePush.user1:type_name -> PlayerData - 46, // 1: EntertainStartGamePush.user2:type_name -> PlayerData - 47, // 2: EntertainStartGamePush.mpadata:type_name -> MapData - 47, // 3: EntertainOperatorRstPush.mpadata:type_name -> MapData - 46, // 4: EntertainOperatorRstPush.user1:type_name -> PlayerData - 46, // 5: EntertainOperatorRstPush.user2:type_name -> PlayerData - 46, // 6: EntertainGameOverPush.user1:type_name -> PlayerData - 46, // 7: EntertainGameOverPush.user2:type_name -> PlayerData - 47, // 8: EntertainGameOverPush.mpadata:type_name -> MapData - 48, // 9: EntertainGameOverPush.reward:type_name -> UserAtno - 49, // 10: EntertainGameOverPush.box:type_name -> BoxData - 46, // 11: EntertainEnterRoomPush.user1:type_name -> PlayerData - 46, // 12: EntertainEnterRoomPush.user2:type_name -> PlayerData - 47, // 13: EntertainReconnectResp.mpadata:type_name -> MapData - 46, // 14: EntertainReconnectResp.user1:type_name -> PlayerData - 46, // 15: EntertainReconnectResp.user2:type_name -> PlayerData - 47, // 16: EntertainRefreshPlatResp.mpadata:type_name -> MapData - 47, // 17: EntertainRefreshPush.mpadata:type_name -> MapData - 50, // 18: EntertainGetListResp.data:type_name -> DBXXLData - 50, // 19: EntertainRewardResp.data:type_name -> DBXXLData - 48, // 20: EntertainRewardResp.reward:type_name -> UserAtno - 44, // 21: EntertainChangePush.card:type_name -> EntertainChangePush.CardEntry - 45, // 22: EntertainChangePush.skill:type_name -> EntertainChangePush.SkillEntry - 46, // 23: EntertainJoinCreateRoomPush.user1:type_name -> PlayerData - 46, // 24: EntertainJoinCreateRoomPush.user2:type_name -> PlayerData - 49, // 25: EntertainBoxRewardResp.box:type_name -> BoxData - 48, // 26: EntertainBoxRewardResp.reward:type_name -> UserAtno - 50, // 27: EntertainReceiveResp.info:type_name -> DBXXLData - 48, // 28: EntertainReceiveResp.award:type_name -> UserAtno - 51, // 29: EntertainRankResp.players:type_name -> XxlPlayer - 30, // [30:30] is the sub-list for method output_type - 30, // [30:30] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name + 48, // 0: EntertainStartGamePush.user1:type_name -> PlayerData + 48, // 1: EntertainStartGamePush.user2:type_name -> PlayerData + 49, // 2: EntertainStartGamePush.mpadata:type_name -> MapData + 49, // 3: EntertainOperatorRstPush.mpadata:type_name -> MapData + 48, // 4: EntertainOperatorRstPush.user1:type_name -> PlayerData + 48, // 5: EntertainOperatorRstPush.user2:type_name -> PlayerData + 48, // 6: EntertainGameOverPush.user1:type_name -> PlayerData + 48, // 7: EntertainGameOverPush.user2:type_name -> PlayerData + 49, // 8: EntertainGameOverPush.mpadata:type_name -> MapData + 50, // 9: EntertainGameOverPush.reward:type_name -> UserAtno + 51, // 10: EntertainGameOverPush.box:type_name -> BoxData + 48, // 11: EntertainEnterRoomPush.user1:type_name -> PlayerData + 48, // 12: EntertainEnterRoomPush.user2:type_name -> PlayerData + 49, // 13: EntertainReconnectResp.mpadata:type_name -> MapData + 48, // 14: EntertainReconnectResp.user1:type_name -> PlayerData + 48, // 15: EntertainReconnectResp.user2:type_name -> PlayerData + 49, // 16: EntertainRefreshPlatResp.mpadata:type_name -> MapData + 49, // 17: EntertainRefreshPush.mpadata:type_name -> MapData + 52, // 18: EntertainGetListResp.data:type_name -> DBXXLData + 52, // 19: EntertainRewardResp.data:type_name -> DBXXLData + 50, // 20: EntertainRewardResp.reward:type_name -> UserAtno + 46, // 21: EntertainChangePush.card:type_name -> EntertainChangePush.CardEntry + 47, // 22: EntertainChangePush.skill:type_name -> EntertainChangePush.SkillEntry + 48, // 23: EntertainJoinCreateRoomPush.user1:type_name -> PlayerData + 48, // 24: EntertainJoinCreateRoomPush.user2:type_name -> PlayerData + 51, // 25: EntertainBoxRewardResp.box:type_name -> BoxData + 50, // 26: EntertainBoxRewardResp.reward:type_name -> UserAtno + 52, // 27: EntertainReceiveResp.info:type_name -> DBXXLData + 50, // 28: EntertainReceiveResp.award:type_name -> UserAtno + 53, // 29: EntertainRankResp.players:type_name -> XxlPlayer + 50, // 30: EntertainTaskRewardResp.award:type_name -> UserAtno + 31, // [31:31] is the sub-list for method output_type + 31, // [31:31] is the sub-list for method input_type + 31, // [31:31] is the sub-list for extension type_name + 31, // [31:31] is the sub-list for extension extendee + 0, // [0:31] is the sub-list for field type_name } func init() { file_entertain_entertain_msg_proto_init() } @@ -3319,6 +3434,30 @@ func file_entertain_entertain_msg_proto_init() { return nil } } + file_entertain_entertain_msg_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntertainTaskRewardReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entertain_entertain_msg_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntertainTaskRewardResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3326,7 +3465,7 @@ func file_entertain_entertain_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_entertain_entertain_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 46, + NumMessages: 48, NumExtensions: 0, NumServices: 0, }, diff --git a/sys/configure/structs/Game.ConsumeTaskData.go b/sys/configure/structs/Game.ConsumeTaskData.go index 690e2b993..8023318e7 100644 --- a/sys/configure/structs/Game.ConsumeTaskData.go +++ b/sys/configure/structs/Game.ConsumeTaskData.go @@ -12,7 +12,7 @@ import "errors" type GameConsumeTaskData struct { Key int32 - TaskIntegral *Gameatn + TaskIntegral int32 Reward []*Gameatn } @@ -24,7 +24,7 @@ func (*GameConsumeTaskData) GetTypeId() int32 { func (_v *GameConsumeTaskData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) } - { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["task_integral"].(map[string]interface{}); !_ok_ { err = errors.New("task_integral error"); return }; if _v.TaskIntegral, err = DeserializeGameatn(_x_); err != nil { return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["task_integral"].(float64); !_ok_ { err = errors.New("task_integral error"); return }; _v.TaskIntegral = int32(_tempNum_) } { var _arr_ []interface{} var _ok_ bool