diff --git a/modules/items/modelitems.go b/modules/items/modelitems.go index f9680c669..dc13e7309 100644 --- a/modules/items/modelitems.go +++ b/modules/items/modelitems.go @@ -610,7 +610,6 @@ func (this *ModelItemsComp) useitem(session comm.IUserSession, gid string, amoun var ( item *pb.DB_UserItemData itemcf *cfg.GameItemData - prop []*cfg.GameDropData err error ) if item, err = this.module.modelItems.QueryUserPackByGridId(session.GetUserId(), gid); err != nil { @@ -717,11 +716,14 @@ func (this *ModelItemsComp) useitem(session comm.IUserSession, gid string, amoun } } case itemuse_optionalbox: //自选宝箱 - if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil { + var ( + lottery *cfg.GameLotteryData + ) + if lottery, err = this.module.ModuleTools.GetGroupDataByLotteryId(slt); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_ConfigNoFound, Title: pb.ErrorCode_ConfigNoFound.ToString(), - Message: fmt.Sprintf("掉落组未找到:%d", itemcf.BoxId), + Message: fmt.Sprintf("掉落组未找到:%d", slt), } return } @@ -729,26 +731,11 @@ func (this *ModelItemsComp) useitem(session comm.IUserSession, gid string, amoun return } var sale []*cfg.Gameatn - for _, v := range prop { - if v.Id == slt { - for _, v1 := range v.Prize { - sale = append(sale, &cfg.Gameatn{ - A: v1.A, - T: v1.T, - N: v1.N * int32(amount), - }) - } - } - } - if sale == nil { - this.module.Errorf("no found target sale:%v", slt) - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - } - return - } - + sale = append(sale, &cfg.Gameatn{ + A: lottery.Itemid.A, + T: lottery.Itemid.T, + N: lottery.Itemid.N * int32(amount), + }) if errdata = this.module.DispenseRes(session, sale, true); errdata != nil { return } diff --git a/modules/worldtask/module.go b/modules/worldtask/module.go index f504a982e..a5bddc023 100644 --- a/modules/worldtask/module.go +++ b/modules/worldtask/module.go @@ -5,7 +5,6 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/event" "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" "go_dreamfactory/pb" @@ -37,7 +36,7 @@ func (this *Worldtask) Init(service core.IService, module core.IModule, options func (this *Worldtask) OnInstallComp() { this.ModuleBase.OnInstallComp() - event.Register(comm.EventBuriedComplete, this.TCondFinishNotify) + // event.Register(comm.EventBuriedComplete, this.TCondFinishNotify) this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.modelWorldtask = this.RegisterComp(new(ModelWorldtask)).(*ModelWorldtask) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) diff --git a/modules/wtask/api_chapterreward.go b/modules/wtask/api_chapterreward.go new file mode 100644 index 000000000..bac54cec1 --- /dev/null +++ b/modules/wtask/api_chapterreward.go @@ -0,0 +1,75 @@ +package wtask + +import ( + "fmt" + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" +) + +// 参数校验 +func (this *apiComp) ChapterRewardCheck(session comm.IUserSession, req *pb.WTaskChapterRewardReq) (errdata *pb.ErrorData) { + if req.Group == 0 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: "Group is 0", + } + } + return +} + +// /获取系统公告 +func (this *apiComp) ChapterReward(session comm.IUserSession, req *pb.WTaskChapterRewardReq) (errdata *pb.ErrorData) { + var ( + conf *cfg.GameWorldAllData + wtask *pb.DBWTask + ok bool + state int32 + award []*pb.UserAssets + err error + ) + if errdata = this.ChapterRewardCheck(session, req); errdata != nil { + return + } + if conf, err = this.module.configure.getGameWorldAll(req.Group); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + + if wtask, err = this.module.modelwtask.getUserWTasks(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + + if state, ok = wtask.Groups[req.Group]; !ok || state != 1 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: fmt.Sprintf("任务组 状态不对 %d:%d", req.Group, state), + } + return + } + + if errdata = this.module.DispenseRes(session, conf.Reword, true); errdata != nil { + return + } + award = make([]*pb.UserAssets, 0) + for _, v := range conf.Reword { + award = append(award, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + session.SendMsg(string(this.module.GetType()), "chapterreward", &pb.WTaskChapterRewardResp{Group: req.Group, Award: award}) + return +} diff --git a/modules/wtask/api_finish.go b/modules/wtask/api_finish.go index a6708689d..c1aa0ac4a 100644 --- a/modules/wtask/api_finish.go +++ b/modules/wtask/api_finish.go @@ -112,12 +112,9 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WTaskFinishReq) ( } wtask.Completes = append(wtask.Completes, req.Tid) session.SendMsg(string(this.module.GetType()), "finish", &pb.WTaskFinishResp{Tid: req.Tid, Award: award}) + this.module.checkgroupState(session, wtask, conf.Group) this.module.fishtask(session, wtask) - if err = this.module.modelwtask.Change(session.GetUserId(), map[string]interface{}{ - "activations": wtask.Activations, - "accepts": wtask.Accepts, - "completes": wtask.Completes, - }); err != nil { + if err = this.module.modelwtask.updateUserWTasks(session.GetUserId(), wtask); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, Title: pb.ErrorCode_DBError.ToString(), diff --git a/modules/wtask/api_info.go b/modules/wtask/api_info.go index 23c365a2f..e35835370 100644 --- a/modules/wtask/api_info.go +++ b/modules/wtask/api_info.go @@ -28,9 +28,15 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.WTaskInfoReq) (errd } return } - if errdata = this.module.pushtaskprogress(session, wtask); errdata != nil { + this.module.fishtask(session, wtask) + session.SendMsg(string(this.module.GetType()), "info", &pb.WTaskInfoResp{Info: wtask}) + if err = this.module.modelwtask.updateUserWTasks(session.GetUserId(), wtask); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } return } - session.SendMsg(string(this.module.GetType()), "info", &pb.WTaskInfoResp{Activations: wtask.Activations, Accepts: wtask.Accepts, Completes: wtask.Completes}) return } diff --git a/modules/wtask/configure.go b/modules/wtask/configure.go index 17afcef43..b08ba5a37 100644 --- a/modules/wtask/configure.go +++ b/modules/wtask/configure.go @@ -23,6 +23,7 @@ type configureComp struct { module *WTask lock sync.RWMutex condlTask map[int32][]*cfg.GameWorldTaskData //key 条件ID + groupTask map[int32][]*cfg.GameWorldTaskData //key 任务组 } func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { @@ -65,7 +66,13 @@ func (this *configureComp) updateconfigure() { return } worldtaskConf := make(map[int32][]*cfg.GameWorldTaskData) + groupaskConf := make(map[int32][]*cfg.GameWorldTaskData) for _, v := range gwt.GetDataList() { + if _, ok := groupaskConf[v.Group]; !ok { + groupaskConf[v.Group] = make([]*cfg.GameWorldTaskData, 0) + } + groupaskConf[v.Group] = append(groupaskConf[v.Group], v) + for _, condl := range v.Completetask { if _, ok := worldtaskConf[condl]; !ok { worldtaskConf[condl] = make([]*cfg.GameWorldTaskData, 0) @@ -76,6 +83,7 @@ func (this *configureComp) updateconfigure() { this.lock.Lock() this.condlTask = worldtaskConf + this.groupTask = groupaskConf this.lock.Unlock() } @@ -85,6 +93,12 @@ func (this *configureComp) getcondlTask() map[int32][]*cfg.GameWorldTaskData { return this.condlTask } +func (this *configureComp) getgroupTask() map[int32][]*cfg.GameWorldTaskData { + this.lock.RLock() + defer this.lock.RUnlock() + return this.groupTask +} + func (this *configureComp) gettaskconfconfigure(tid int32) (conf *cfg.GameWorldTaskData, err error) { var ( @@ -121,3 +135,20 @@ func (this *configureComp) getWorldtaskBattleById(confId int32) (conf *cfg.GameW } return } + +func (this *configureComp) getGameWorldAll(id int32) (conf *cfg.GameWorldAllData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(gameWorldAll); err != nil { + return + } else { + if conf, ok = v.(*cfg.GameWorldAll).GetDataMap()[id]; !ok { + err = comm.NewNotFoundConfErr(modulename, gameWorldTask, id) + this.module.Errorf("err:%v", err) + return + } + } + return +} diff --git a/modules/wtask/modelWTask.go b/modules/wtask/modelWTask.go index f2717ad8c..2b33dd1af 100644 --- a/modules/wtask/modelWTask.go +++ b/modules/wtask/modelWTask.go @@ -3,6 +3,7 @@ package wtask import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" @@ -39,11 +40,27 @@ func (this *ModelWTask) getUserWTasks(uid string) (results *pb.DBWTask, err erro results = &pb.DBWTask{ Id: primitive.NewObjectID().Hex(), Uid: uid, + Currchapter: 0, Activations: make([]int32, 0), Accepts: make([]int32, 0), Completes: make([]int32, 0), + Groups: make(map[int32]int32), } err = this.Add(uid, results) } return } + +func (this *ModelWTask) updateUserWTasks(uid string, data *pb.DBWTask) (err error) { + if err = this.module.modelwtask.Change(uid, map[string]interface{}{ + "currchapter": data.Currchapter, + "activations": data.Activations, + "accepts": data.Accepts, + "completes": data.Completes, + "groups": data.Groups, + }); err != nil { + this.module.Error("更新用户任务数据 错误!", log.Field{Key: "err", Value: err.Error()}) + return + } + return +} diff --git a/modules/wtask/module.go b/modules/wtask/module.go index bee918c4c..c4c599b4c 100644 --- a/modules/wtask/module.go +++ b/modules/wtask/module.go @@ -4,6 +4,7 @@ import ( "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/event" "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" "go_dreamfactory/pb" @@ -47,6 +48,7 @@ func (this *WTask) Start() (err error) { return } this.modelSys = module.(comm.ISys) + event.Register(comm.EventBuriedComplete, this.BuriedsNotify) return } @@ -76,6 +78,7 @@ func (this *WTask) BuriedsNotify(uid string, condis []*pb.ConIProgress) { err error ) + this.Debug("收到子任务进度变化推送", log.Field{Key: "uid", Value: uid}, log.Field{Key: "condis", Value: condis}) if utask, err = this.modelwtask.getUserWTasks(uid); err != nil { this.Error("读取玩家世界任务数据 失败", log.Field{Key: "err", Value: err.Error()}) return @@ -242,6 +245,25 @@ func (this *WTask) fishtask(session comm.IUserSession, wtask *pb.DBWTask) { this.inquireActivations(session, wtask, user.Lv, opencmd) } +// 校验组进度变化 +func (this *WTask) checkgroupState(session comm.IUserSession, wtask *pb.DBWTask, group int32) { + var ( + groupTask map[int32][]*cfg.GameWorldTaskData + completeMap map[int32]struct{} = make(map[int32]struct{}) + ok bool + ) + groupTask = this.configure.getgroupTask() + for _, v := range wtask.Completes { + completeMap[v] = struct{}{} + } + for _, v := range groupTask[group] { + if _, ok = completeMap[v.Key]; !ok { + break + } + } + wtask.Groups[group] = 1 +} + // 查询可接取任务列表 func (this *WTask) inquireActivations(session comm.IUserSession, wtask *pb.DBWTask, lv int32, opencmd []string) (err error) { var ( @@ -291,14 +313,21 @@ func (this *WTask) inquireActivations(session comm.IUserSession, wtask *pb.DBWTa if v.Des == 5 { //商队任务不主动触发 continue } + if v.AutoAccept == 0 { wtask.Activations = append(wtask.Activations, v.Key) changeActiva = true + } else if v.AutoAccept == 1 { //自动接取任务 wtask.Accepts = append(wtask.Accepts, v.Key) changeAccept = true } - + if v.Des == 2 { //主线任务 + wtask.Currchapter = v.Group + } + if _, ok = wtask.Groups[v.Group]; !ok { + wtask.Groups[v.Group] = 0 + } } //有新任务接取 diff --git a/pb/wtask_db.pb.go b/pb/wtask_db.pb.go index cf5c7591b..015c81092 100644 --- a/pb/wtask_db.pb.go +++ b/pb/wtask_db.pb.go @@ -26,11 +26,13 @@ type DBWTask 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 - Activations []int32 `protobuf:"varint,3,rep,packed,name=activations,proto3" json:"activations"` //可接取任务列表 - Accepts []int32 `protobuf:"varint,4,rep,packed,name=accepts,proto3" json:"accepts"` //已接取任务列表 - Completes []int32 `protobuf:"varint,5,rep,packed,name=completes,proto3" json:"completes"` //完成任务列表 + 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 + Currchapter int32 `protobuf:"varint,3,opt,name=currchapter,proto3" json:"currchapter"` //当前所在章节 + Activations []int32 `protobuf:"varint,4,rep,packed,name=activations,proto3" json:"activations"` //可接取任务列表 + Accepts []int32 `protobuf:"varint,5,rep,packed,name=accepts,proto3" json:"accepts"` //已接取任务列表 + Completes []int32 `protobuf:"varint,6,rep,packed,name=completes,proto3" json:"completes"` //完成任务列表 + Groups map[int32]int32 `protobuf:"bytes,7,rep,name=groups,proto3" json:"groups" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //任务组状态 key表示组id value:0 任务组未完成 1:任务组已完成 2:任务组奖励已领取 } func (x *DBWTask) Reset() { @@ -79,6 +81,13 @@ func (x *DBWTask) GetUid() string { return "" } +func (x *DBWTask) GetCurrchapter() int32 { + if x != nil { + return x.Currchapter + } + return 0 +} + func (x *DBWTask) GetActivations() []int32 { if x != nil { return x.Activations @@ -100,6 +109,13 @@ func (x *DBWTask) GetCompletes() []int32 { return nil } +func (x *DBWTask) GetGroups() map[int32]int32 { + if x != nil { + return x.Groups + } + return nil +} + //世界任务详情 type DBWTaskItem struct { state protoimpl.MessageState @@ -161,21 +177,30 @@ var File_wtask_wtask_db_proto protoreflect.FileDescriptor var file_wtask_wtask_db_proto_rawDesc = []byte{ 0x0a, 0x14, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x75, 0x72, 0x69, 0x65, 0x64, 0x2f, 0x62, - 0x75, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, - 0x01, 0x0a, 0x07, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x75, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, + 0x02, 0x0a, 0x07, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 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, 0x20, 0x0a, 0x0b, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, - 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x22, 0x46, 0x0a, 0x0b, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, - 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x6e, 0x49, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, 0x73, 0x42, 0x06, - 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x75, 0x72, 0x72, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x12, 0x20, + 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x05, 0x52, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, + 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, + 0x73, 0x6b, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, + 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, 0x46, 0x0a, 0x0b, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x74, 0x65, 0x6d, + 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, + 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x6e, 0x49, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -190,19 +215,21 @@ func file_wtask_wtask_db_proto_rawDescGZIP() []byte { return file_wtask_wtask_db_proto_rawDescData } -var file_wtask_wtask_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_wtask_wtask_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_wtask_wtask_db_proto_goTypes = []interface{}{ (*DBWTask)(nil), // 0: DBWTask (*DBWTaskItem)(nil), // 1: DBWTaskItem - (*ConIProgress)(nil), // 2: ConIProgress + nil, // 2: DBWTask.GroupsEntry + (*ConIProgress)(nil), // 3: ConIProgress } var file_wtask_wtask_db_proto_depIdxs = []int32{ - 2, // 0: DBWTaskItem.conlds:type_name -> ConIProgress - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 0: DBWTask.groups:type_name -> DBWTask.GroupsEntry + 3, // 1: DBWTaskItem.conlds:type_name -> ConIProgress + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_wtask_wtask_db_proto_init() } @@ -243,7 +270,7 @@ func file_wtask_wtask_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_wtask_wtask_db_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/wtask_msg.pb.go b/pb/wtask_msg.pb.go index ed8a3fc25..6e47a44a5 100644 --- a/pb/wtask_msg.pb.go +++ b/pb/wtask_msg.pb.go @@ -65,9 +65,7 @@ type WTaskInfoResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Activations []int32 `protobuf:"varint,1,rep,packed,name=activations,proto3" json:"activations"` //可接取任务列表 - Accepts []int32 `protobuf:"varint,2,rep,packed,name=accepts,proto3" json:"accepts"` //已接取任务列表 - Completes []int32 `protobuf:"varint,3,rep,packed,name=completes,proto3" json:"completes"` //完成任务列表 + Info *DBWTask `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` //可接取任务列表 } func (x *WTaskInfoResp) Reset() { @@ -102,23 +100,9 @@ func (*WTaskInfoResp) Descriptor() ([]byte, []int) { return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{1} } -func (x *WTaskInfoResp) GetActivations() []int32 { +func (x *WTaskInfoResp) GetInfo() *DBWTask { if x != nil { - return x.Activations - } - return nil -} - -func (x *WTaskInfoResp) GetAccepts() []int32 { - if x != nil { - return x.Accepts - } - return nil -} - -func (x *WTaskInfoResp) GetCompletes() []int32 { - if x != nil { - return x.Completes + return x.Info } return nil } @@ -547,6 +531,110 @@ func (x *WTaskFinishResp) GetAward() []*UserAssets { return nil } +// 完成任务 请求 +type WTaskChapterRewardReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Group int32 `protobuf:"varint,1,opt,name=group,proto3" json:"group"` +} + +func (x *WTaskChapterRewardReq) Reset() { + *x = WTaskChapterRewardReq{} + if protoimpl.UnsafeEnabled { + mi := &file_wtask_wtask_msg_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WTaskChapterRewardReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WTaskChapterRewardReq) ProtoMessage() {} + +func (x *WTaskChapterRewardReq) ProtoReflect() protoreflect.Message { + mi := &file_wtask_wtask_msg_proto_msgTypes[10] + 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 WTaskChapterRewardReq.ProtoReflect.Descriptor instead. +func (*WTaskChapterRewardReq) Descriptor() ([]byte, []int) { + return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{10} +} + +func (x *WTaskChapterRewardReq) GetGroup() int32 { + if x != nil { + return x.Group + } + return 0 +} + +// 完成任务 回应 +type WTaskChapterRewardResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Group int32 `protobuf:"varint,1,opt,name=group,proto3" json:"group"` + Award []*UserAssets `protobuf:"bytes,2,rep,name=award,proto3" json:"award"` //奖励 +} + +func (x *WTaskChapterRewardResp) Reset() { + *x = WTaskChapterRewardResp{} + if protoimpl.UnsafeEnabled { + mi := &file_wtask_wtask_msg_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WTaskChapterRewardResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WTaskChapterRewardResp) ProtoMessage() {} + +func (x *WTaskChapterRewardResp) ProtoReflect() protoreflect.Message { + mi := &file_wtask_wtask_msg_proto_msgTypes[11] + 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 WTaskChapterRewardResp.ProtoReflect.Descriptor instead. +func (*WTaskChapterRewardResp) Descriptor() ([]byte, []int) { + return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{11} +} + +func (x *WTaskChapterRewardResp) GetGroup() int32 { + if x != nil { + return x.Group + } + return 0 +} + +func (x *WTaskChapterRewardResp) GetAward() []*UserAssets { + if x != nil { + return x.Award + } + return nil +} + //可接入任务推送 type WTaskActivationsChangePush struct { state protoimpl.MessageState @@ -559,7 +647,7 @@ type WTaskActivationsChangePush struct { func (x *WTaskActivationsChangePush) Reset() { *x = WTaskActivationsChangePush{} if protoimpl.UnsafeEnabled { - mi := &file_wtask_wtask_msg_proto_msgTypes[10] + mi := &file_wtask_wtask_msg_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -572,7 +660,7 @@ func (x *WTaskActivationsChangePush) String() string { func (*WTaskActivationsChangePush) ProtoMessage() {} func (x *WTaskActivationsChangePush) ProtoReflect() protoreflect.Message { - mi := &file_wtask_wtask_msg_proto_msgTypes[10] + mi := &file_wtask_wtask_msg_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -585,7 +673,7 @@ func (x *WTaskActivationsChangePush) ProtoReflect() protoreflect.Message { // Deprecated: Use WTaskActivationsChangePush.ProtoReflect.Descriptor instead. func (*WTaskActivationsChangePush) Descriptor() ([]byte, []int) { - return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{10} + return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{12} } func (x *WTaskActivationsChangePush) GetActivations() []int32 { @@ -607,7 +695,7 @@ type WTaskAcceptChangePush struct { func (x *WTaskAcceptChangePush) Reset() { *x = WTaskAcceptChangePush{} if protoimpl.UnsafeEnabled { - mi := &file_wtask_wtask_msg_proto_msgTypes[11] + mi := &file_wtask_wtask_msg_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -620,7 +708,7 @@ func (x *WTaskAcceptChangePush) String() string { func (*WTaskAcceptChangePush) ProtoMessage() {} func (x *WTaskAcceptChangePush) ProtoReflect() protoreflect.Message { - mi := &file_wtask_wtask_msg_proto_msgTypes[11] + mi := &file_wtask_wtask_msg_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -633,7 +721,7 @@ func (x *WTaskAcceptChangePush) ProtoReflect() protoreflect.Message { // Deprecated: Use WTaskAcceptChangePush.ProtoReflect.Descriptor instead. func (*WTaskAcceptChangePush) Descriptor() ([]byte, []int) { - return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{11} + return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{13} } func (x *WTaskAcceptChangePush) GetAccepts() []*DBWTaskItem { @@ -652,58 +740,63 @@ var file_wtask_wtask_msg_proto_rawDesc = []byte{ 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0e, 0x0a, 0x0c, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x22, 0x69, 0x0a, 0x0d, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x12, - 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x22, 0x22, 0x0a, - 0x0e, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x12, - 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, - 0x64, 0x22, 0x4d, 0x0a, 0x0f, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, - 0x22, 0x63, 0x0a, 0x13, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x5b, 0x0a, 0x14, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, - 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, - 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, - 0x66, 0x6f, 0x22, 0x61, 0x0a, 0x14, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x25, - 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x3b, 0x0a, 0x15, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, + 0x65, 0x71, 0x22, 0x2d, 0x0a, 0x0d, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x69, 0x6e, 0x66, + 0x6f, 0x22, 0x22, 0x0a, 0x0e, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, + 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x74, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x0f, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x61, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x73, 0x22, 0x63, 0x0a, 0x13, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, + 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x5b, 0x0a, 0x14, 0x57, 0x54, 0x61, + 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x61, 0x0a, 0x14, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x49, 0x64, 0x22, 0x22, 0x0a, 0x0e, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x0f, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x46, - 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x61, - 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x3e, - 0x0a, 0x1a, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3f, - 0x0a, 0x15, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, - 0x73, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x42, - 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x3b, 0x0a, 0x15, 0x57, 0x54, 0x61, + 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x22, 0x22, 0x0a, 0x0e, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x46, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x0f, 0x57, 0x54, + 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, + 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, + 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, + 0x72, 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x22, 0x51, 0x0a, 0x16, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, + 0x77, 0x61, 0x72, 0x64, 0x22, 0x3e, 0x0a, 0x1a, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, + 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3f, 0x0a, 0x15, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, + 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x61, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -718,7 +811,7 @@ func file_wtask_wtask_msg_proto_rawDescGZIP() []byte { return file_wtask_wtask_msg_proto_rawDescData } -var file_wtask_wtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_wtask_wtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_wtask_wtask_msg_proto_goTypes = []interface{}{ (*WTaskInfoReq)(nil), // 0: WTaskInfoReq (*WTaskInfoResp)(nil), // 1: WTaskInfoResp @@ -730,25 +823,30 @@ var file_wtask_wtask_msg_proto_goTypes = []interface{}{ (*WTaskBattleFinishResp)(nil), // 7: WTaskBattleFinishResp (*WTaskFinishReq)(nil), // 8: WTaskFinishReq (*WTaskFinishResp)(nil), // 9: WTaskFinishResp - (*WTaskActivationsChangePush)(nil), // 10: WTaskActivationsChangePush - (*WTaskAcceptChangePush)(nil), // 11: WTaskAcceptChangePush - (*BattleFormation)(nil), // 12: BattleFormation - (*BattleInfo)(nil), // 13: BattleInfo - (*BattleReport)(nil), // 14: BattleReport - (*UserAssets)(nil), // 15: UserAssets - (*DBWTaskItem)(nil), // 16: DBWTaskItem + (*WTaskChapterRewardReq)(nil), // 10: WTaskChapterRewardReq + (*WTaskChapterRewardResp)(nil), // 11: WTaskChapterRewardResp + (*WTaskActivationsChangePush)(nil), // 12: WTaskActivationsChangePush + (*WTaskAcceptChangePush)(nil), // 13: WTaskAcceptChangePush + (*DBWTask)(nil), // 14: DBWTask + (*BattleFormation)(nil), // 15: BattleFormation + (*BattleInfo)(nil), // 16: BattleInfo + (*BattleReport)(nil), // 17: BattleReport + (*UserAssets)(nil), // 18: UserAssets + (*DBWTaskItem)(nil), // 19: DBWTaskItem } var file_wtask_wtask_msg_proto_depIdxs = []int32{ - 12, // 0: WTaskBattleStartReq.battle:type_name -> BattleFormation - 13, // 1: WTaskBattleStartResp.info:type_name -> BattleInfo - 14, // 2: WTaskBattleFinishReq.report:type_name -> BattleReport - 15, // 3: WTaskFinishResp.award:type_name -> UserAssets - 16, // 4: WTaskAcceptChangePush.accepts:type_name -> DBWTaskItem - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 14, // 0: WTaskInfoResp.info:type_name -> DBWTask + 15, // 1: WTaskBattleStartReq.battle:type_name -> BattleFormation + 16, // 2: WTaskBattleStartResp.info:type_name -> BattleInfo + 17, // 3: WTaskBattleFinishReq.report:type_name -> BattleReport + 18, // 4: WTaskFinishResp.award:type_name -> UserAssets + 18, // 5: WTaskChapterRewardResp.award:type_name -> UserAssets + 19, // 6: WTaskAcceptChangePush.accepts:type_name -> DBWTaskItem + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_wtask_wtask_msg_proto_init() } @@ -881,7 +979,7 @@ func file_wtask_wtask_msg_proto_init() { } } file_wtask_wtask_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WTaskActivationsChangePush); i { + switch v := v.(*WTaskChapterRewardReq); i { case 0: return &v.state case 1: @@ -893,6 +991,30 @@ func file_wtask_wtask_msg_proto_init() { } } file_wtask_wtask_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WTaskChapterRewardResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wtask_wtask_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WTaskActivationsChangePush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wtask_wtask_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WTaskAcceptChangePush); i { case 0: return &v.state @@ -911,7 +1033,7 @@ func file_wtask_wtask_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_wtask_wtask_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 0, },