This commit is contained in:
meixiongfeng 2023-07-06 15:30:50 +08:00
commit d1cfe5f910
10 changed files with 445 additions and 155 deletions

View File

@ -610,7 +610,6 @@ func (this *ModelItemsComp) useitem(session comm.IUserSession, gid string, amoun
var ( var (
item *pb.DB_UserItemData item *pb.DB_UserItemData
itemcf *cfg.GameItemData itemcf *cfg.GameItemData
prop []*cfg.GameDropData
err error err error
) )
if item, err = this.module.modelItems.QueryUserPackByGridId(session.GetUserId(), gid); err != nil { 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: //自选宝箱 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{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(), Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: fmt.Sprintf("掉落组未找到:%d", itemcf.BoxId), Message: fmt.Sprintf("掉落组未找到:%d", slt),
} }
return return
} }
@ -729,26 +731,11 @@ func (this *ModelItemsComp) useitem(session comm.IUserSession, gid string, amoun
return return
} }
var sale []*cfg.Gameatn var sale []*cfg.Gameatn
for _, v := range prop {
if v.Id == slt {
for _, v1 := range v.Prize {
sale = append(sale, &cfg.Gameatn{ sale = append(sale, &cfg.Gameatn{
A: v1.A, A: lottery.Itemid.A,
T: v1.T, T: lottery.Itemid.T,
N: v1.N * int32(amount), N: lottery.Itemid.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
}
if errdata = this.module.DispenseRes(session, sale, true); errdata != nil { if errdata = this.module.DispenseRes(session, sale, true); errdata != nil {
return return
} }

View File

@ -5,7 +5,6 @@ import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/base" "go_dreamfactory/lego/base"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/event"
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
@ -37,7 +36,7 @@ func (this *Worldtask) Init(service core.IService, module core.IModule, options
func (this *Worldtask) OnInstallComp() { func (this *Worldtask) OnInstallComp() {
this.ModuleBase.OnInstallComp() this.ModuleBase.OnInstallComp()
event.Register(comm.EventBuriedComplete, this.TCondFinishNotify) // event.Register(comm.EventBuriedComplete, this.TCondFinishNotify)
this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelWorldtask = this.RegisterComp(new(ModelWorldtask)).(*ModelWorldtask) this.modelWorldtask = this.RegisterComp(new(ModelWorldtask)).(*ModelWorldtask)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp)

View File

@ -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
}

View File

@ -112,12 +112,9 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WTaskFinishReq) (
} }
wtask.Completes = append(wtask.Completes, req.Tid) wtask.Completes = append(wtask.Completes, req.Tid)
session.SendMsg(string(this.module.GetType()), "finish", &pb.WTaskFinishResp{Tid: req.Tid, Award: award}) 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) this.module.fishtask(session, wtask)
if err = this.module.modelwtask.Change(session.GetUserId(), map[string]interface{}{ if err = this.module.modelwtask.updateUserWTasks(session.GetUserId(), wtask); err != nil {
"activations": wtask.Activations,
"accepts": wtask.Accepts,
"completes": wtask.Completes,
}); err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError, Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(), Title: pb.ErrorCode_DBError.ToString(),

View File

@ -28,9 +28,15 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.WTaskInfoReq) (errd
} }
return 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 return
} }
session.SendMsg(string(this.module.GetType()), "info", &pb.WTaskInfoResp{Activations: wtask.Activations, Accepts: wtask.Accepts, Completes: wtask.Completes})
return return
} }

View File

@ -23,6 +23,7 @@ type configureComp struct {
module *WTask module *WTask
lock sync.RWMutex lock sync.RWMutex
condlTask map[int32][]*cfg.GameWorldTaskData //key 条件ID 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) { 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 return
} }
worldtaskConf := make(map[int32][]*cfg.GameWorldTaskData) worldtaskConf := make(map[int32][]*cfg.GameWorldTaskData)
groupaskConf := make(map[int32][]*cfg.GameWorldTaskData)
for _, v := range gwt.GetDataList() { 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 { for _, condl := range v.Completetask {
if _, ok := worldtaskConf[condl]; !ok { if _, ok := worldtaskConf[condl]; !ok {
worldtaskConf[condl] = make([]*cfg.GameWorldTaskData, 0) worldtaskConf[condl] = make([]*cfg.GameWorldTaskData, 0)
@ -76,6 +83,7 @@ func (this *configureComp) updateconfigure() {
this.lock.Lock() this.lock.Lock()
this.condlTask = worldtaskConf this.condlTask = worldtaskConf
this.groupTask = groupaskConf
this.lock.Unlock() this.lock.Unlock()
} }
@ -85,6 +93,12 @@ func (this *configureComp) getcondlTask() map[int32][]*cfg.GameWorldTaskData {
return this.condlTask 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) { func (this *configureComp) gettaskconfconfigure(tid int32) (conf *cfg.GameWorldTaskData, err error) {
var ( var (
@ -121,3 +135,20 @@ func (this *configureComp) getWorldtaskBattleById(confId int32) (conf *cfg.GameW
} }
return 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
}

View File

@ -3,6 +3,7 @@ package wtask
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/lego/sys/mgo" "go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
@ -39,11 +40,27 @@ func (this *ModelWTask) getUserWTasks(uid string) (results *pb.DBWTask, err erro
results = &pb.DBWTask{ results = &pb.DBWTask{
Id: primitive.NewObjectID().Hex(), Id: primitive.NewObjectID().Hex(),
Uid: uid, Uid: uid,
Currchapter: 0,
Activations: make([]int32, 0), Activations: make([]int32, 0),
Accepts: make([]int32, 0), Accepts: make([]int32, 0),
Completes: make([]int32, 0), Completes: make([]int32, 0),
Groups: make(map[int32]int32),
} }
err = this.Add(uid, results) err = this.Add(uid, results)
} }
return 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
}

View File

@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/event"
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
@ -47,6 +48,7 @@ func (this *WTask) Start() (err error) {
return return
} }
this.modelSys = module.(comm.ISys) this.modelSys = module.(comm.ISys)
event.Register(comm.EventBuriedComplete, this.BuriedsNotify)
return return
} }
@ -76,6 +78,7 @@ func (this *WTask) BuriedsNotify(uid string, condis []*pb.ConIProgress) {
err error 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 { if utask, err = this.modelwtask.getUserWTasks(uid); err != nil {
this.Error("读取玩家世界任务数据 失败", log.Field{Key: "err", Value: err.Error()}) this.Error("读取玩家世界任务数据 失败", log.Field{Key: "err", Value: err.Error()})
return return
@ -242,6 +245,25 @@ func (this *WTask) fishtask(session comm.IUserSession, wtask *pb.DBWTask) {
this.inquireActivations(session, wtask, user.Lv, opencmd) 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) { func (this *WTask) inquireActivations(session comm.IUserSession, wtask *pb.DBWTask, lv int32, opencmd []string) (err error) {
var ( var (
@ -291,14 +313,21 @@ func (this *WTask) inquireActivations(session comm.IUserSession, wtask *pb.DBWTa
if v.Des == 5 { //商队任务不主动触发 if v.Des == 5 { //商队任务不主动触发
continue continue
} }
if v.AutoAccept == 0 { if v.AutoAccept == 0 {
wtask.Activations = append(wtask.Activations, v.Key) wtask.Activations = append(wtask.Activations, v.Key)
changeActiva = true changeActiva = true
} else if v.AutoAccept == 1 { //自动接取任务 } else if v.AutoAccept == 1 { //自动接取任务
wtask.Accepts = append(wtask.Accepts, v.Key) wtask.Accepts = append(wtask.Accepts, v.Key)
changeAccept = true changeAccept = true
} }
if v.Des == 2 { //主线任务
wtask.Currchapter = v.Group
}
if _, ok = wtask.Groups[v.Group]; !ok {
wtask.Groups[v.Group] = 0
}
} }
//有新任务接取 //有新任务接取

View File

@ -28,9 +28,11 @@ type DBWTask struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //唯一ID Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //唯一ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID 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"` //可接取任务列表 Currchapter int32 `protobuf:"varint,3,opt,name=currchapter,proto3" json:"currchapter"` //当前所在章节
Accepts []int32 `protobuf:"varint,4,rep,packed,name=accepts,proto3" json:"accepts"` //已接取任务列表 Activations []int32 `protobuf:"varint,4,rep,packed,name=activations,proto3" json:"activations"` //可接取任务列表
Completes []int32 `protobuf:"varint,5,rep,packed,name=completes,proto3" json:"completes"` //完成任务列表 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() { func (x *DBWTask) Reset() {
@ -79,6 +81,13 @@ func (x *DBWTask) GetUid() string {
return "" return ""
} }
func (x *DBWTask) GetCurrchapter() int32 {
if x != nil {
return x.Currchapter
}
return 0
}
func (x *DBWTask) GetActivations() []int32 { func (x *DBWTask) GetActivations() []int32 {
if x != nil { if x != nil {
return x.Activations return x.Activations
@ -100,6 +109,13 @@ func (x *DBWTask) GetCompletes() []int32 {
return nil return nil
} }
func (x *DBWTask) GetGroups() map[int32]int32 {
if x != nil {
return x.Groups
}
return nil
}
//世界任务详情 //世界任务详情
type DBWTaskItem struct { type DBWTaskItem struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -161,21 +177,30 @@ var File_wtask_wtask_db_proto protoreflect.FileDescriptor
var file_wtask_wtask_db_proto_rawDesc = []byte{ var file_wtask_wtask_db_proto_rawDesc = []byte{
0x0a, 0x14, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62, 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, 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, 0x75, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90,
0x01, 0x0a, 0x07, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 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, 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, 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, 0x63, 0x75, 0x72, 0x72, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x05, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x12, 0x20,
0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20,
0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x6c, 0x65, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,
0x70, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x22, 0x46, 0x0a, 0x0b, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x05, 0x52, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f,
0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x63,
0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x6e, 0x49, 0x50, 0x72, 0x70, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61,
0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, 0x73, 0x42, 0x06, 0x73, 0x6b, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 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 ( var (
@ -190,19 +215,21 @@ func file_wtask_wtask_db_proto_rawDescGZIP() []byte {
return file_wtask_wtask_db_proto_rawDescData 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{}{ var file_wtask_wtask_db_proto_goTypes = []interface{}{
(*DBWTask)(nil), // 0: DBWTask (*DBWTask)(nil), // 0: DBWTask
(*DBWTaskItem)(nil), // 1: DBWTaskItem (*DBWTaskItem)(nil), // 1: DBWTaskItem
(*ConIProgress)(nil), // 2: ConIProgress nil, // 2: DBWTask.GroupsEntry
(*ConIProgress)(nil), // 3: ConIProgress
} }
var file_wtask_wtask_db_proto_depIdxs = []int32{ var file_wtask_wtask_db_proto_depIdxs = []int32{
2, // 0: DBWTaskItem.conlds:type_name -> ConIProgress 2, // 0: DBWTask.groups:type_name -> DBWTask.GroupsEntry
1, // [1:1] is the sub-list for method output_type 3, // 1: DBWTaskItem.conlds:type_name -> ConIProgress
1, // [1:1] is the sub-list for method input_type 2, // [2:2] is the sub-list for method output_type
1, // [1:1] is the sub-list for extension type_name 2, // [2:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension extendee 2, // [2:2] is the sub-list for extension type_name
0, // [0:1] is the sub-list for field 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() } func init() { file_wtask_wtask_db_proto_init() }
@ -243,7 +270,7 @@ func file_wtask_wtask_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_wtask_wtask_db_proto_rawDesc, RawDescriptor: file_wtask_wtask_db_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 2, NumMessages: 3,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -65,9 +65,7 @@ type WTaskInfoResp struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Activations []int32 `protobuf:"varint,1,rep,packed,name=activations,proto3" json:"activations"` //可接取任务列表 Info *DBWTask `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` //可接取任务列表
Accepts []int32 `protobuf:"varint,2,rep,packed,name=accepts,proto3" json:"accepts"` //已接取任务列表
Completes []int32 `protobuf:"varint,3,rep,packed,name=completes,proto3" json:"completes"` //完成任务列表
} }
func (x *WTaskInfoResp) Reset() { func (x *WTaskInfoResp) Reset() {
@ -102,23 +100,9 @@ func (*WTaskInfoResp) Descriptor() ([]byte, []int) {
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{1} return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{1}
} }
func (x *WTaskInfoResp) GetActivations() []int32 { func (x *WTaskInfoResp) GetInfo() *DBWTask {
if x != nil { if x != nil {
return x.Activations return x.Info
}
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 nil return nil
} }
@ -547,6 +531,110 @@ func (x *WTaskFinishResp) GetAward() []*UserAssets {
return nil 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 { type WTaskActivationsChangePush struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -559,7 +647,7 @@ type WTaskActivationsChangePush struct {
func (x *WTaskActivationsChangePush) Reset() { func (x *WTaskActivationsChangePush) Reset() {
*x = WTaskActivationsChangePush{} *x = WTaskActivationsChangePush{}
if protoimpl.UnsafeEnabled { 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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -572,7 +660,7 @@ func (x *WTaskActivationsChangePush) String() string {
func (*WTaskActivationsChangePush) ProtoMessage() {} func (*WTaskActivationsChangePush) ProtoMessage() {}
func (x *WTaskActivationsChangePush) ProtoReflect() protoreflect.Message { 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 { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -585,7 +673,7 @@ func (x *WTaskActivationsChangePush) ProtoReflect() protoreflect.Message {
// Deprecated: Use WTaskActivationsChangePush.ProtoReflect.Descriptor instead. // Deprecated: Use WTaskActivationsChangePush.ProtoReflect.Descriptor instead.
func (*WTaskActivationsChangePush) Descriptor() ([]byte, []int) { 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 { func (x *WTaskActivationsChangePush) GetActivations() []int32 {
@ -607,7 +695,7 @@ type WTaskAcceptChangePush struct {
func (x *WTaskAcceptChangePush) Reset() { func (x *WTaskAcceptChangePush) Reset() {
*x = WTaskAcceptChangePush{} *x = WTaskAcceptChangePush{}
if protoimpl.UnsafeEnabled { 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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -620,7 +708,7 @@ func (x *WTaskAcceptChangePush) String() string {
func (*WTaskAcceptChangePush) ProtoMessage() {} func (*WTaskAcceptChangePush) ProtoMessage() {}
func (x *WTaskAcceptChangePush) ProtoReflect() protoreflect.Message { 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 { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -633,7 +721,7 @@ func (x *WTaskAcceptChangePush) ProtoReflect() protoreflect.Message {
// Deprecated: Use WTaskAcceptChangePush.ProtoReflect.Descriptor instead. // Deprecated: Use WTaskAcceptChangePush.ProtoReflect.Descriptor instead.
func (*WTaskAcceptChangePush) Descriptor() ([]byte, []int) { 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 { 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, 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, 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, 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, 0x71, 0x22, 0x2d, 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, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x69, 0x6e, 0x66,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x6f, 0x22, 0x22, 0x0a, 0x0e, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74,
0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x12, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x52, 0x03, 0x74, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x0f, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63,
0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x22, 0x22, 0x0a, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69,
0x0e, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x12, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x61,
0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63,
0x64, 0x22, 0x4d, 0x0a, 0x0f, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x63, 0x65, 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x61, 0x63, 0x63,
0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x65, 0x70, 0x74, 0x73, 0x22, 0x63, 0x0a, 0x13, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74,
0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12,
0x22, 0x63, 0x0a, 0x13, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x5b, 0x0a, 0x14, 0x57, 0x54, 0x61,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49,
0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x5b, 0x0a, 0x14, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20,
0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x61, 0x0a, 0x14, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42,
0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x22,
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,
0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 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, 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, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01,
0x68, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72,
0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x0f, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x3b, 0x0a, 0x15, 0x57, 0x54, 0x61,
0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66,
0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x22, 0x22, 0x0a, 0x0e, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x46,
0x0a, 0x1a, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18,
0x6e, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x0f, 0x57, 0x54,
0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a,
0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3f, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12,
0x0a, 0x15, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x43, 0x68, 0x61, 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b,
0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61,
0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x72, 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74,
0x73, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x42, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x67,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 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 ( var (
@ -718,7 +811,7 @@ func file_wtask_wtask_msg_proto_rawDescGZIP() []byte {
return file_wtask_wtask_msg_proto_rawDescData 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{}{ var file_wtask_wtask_msg_proto_goTypes = []interface{}{
(*WTaskInfoReq)(nil), // 0: WTaskInfoReq (*WTaskInfoReq)(nil), // 0: WTaskInfoReq
(*WTaskInfoResp)(nil), // 1: WTaskInfoResp (*WTaskInfoResp)(nil), // 1: WTaskInfoResp
@ -730,25 +823,30 @@ var file_wtask_wtask_msg_proto_goTypes = []interface{}{
(*WTaskBattleFinishResp)(nil), // 7: WTaskBattleFinishResp (*WTaskBattleFinishResp)(nil), // 7: WTaskBattleFinishResp
(*WTaskFinishReq)(nil), // 8: WTaskFinishReq (*WTaskFinishReq)(nil), // 8: WTaskFinishReq
(*WTaskFinishResp)(nil), // 9: WTaskFinishResp (*WTaskFinishResp)(nil), // 9: WTaskFinishResp
(*WTaskActivationsChangePush)(nil), // 10: WTaskActivationsChangePush (*WTaskChapterRewardReq)(nil), // 10: WTaskChapterRewardReq
(*WTaskAcceptChangePush)(nil), // 11: WTaskAcceptChangePush (*WTaskChapterRewardResp)(nil), // 11: WTaskChapterRewardResp
(*BattleFormation)(nil), // 12: BattleFormation (*WTaskActivationsChangePush)(nil), // 12: WTaskActivationsChangePush
(*BattleInfo)(nil), // 13: BattleInfo (*WTaskAcceptChangePush)(nil), // 13: WTaskAcceptChangePush
(*BattleReport)(nil), // 14: BattleReport (*DBWTask)(nil), // 14: DBWTask
(*UserAssets)(nil), // 15: UserAssets (*BattleFormation)(nil), // 15: BattleFormation
(*DBWTaskItem)(nil), // 16: DBWTaskItem (*BattleInfo)(nil), // 16: BattleInfo
(*BattleReport)(nil), // 17: BattleReport
(*UserAssets)(nil), // 18: UserAssets
(*DBWTaskItem)(nil), // 19: DBWTaskItem
} }
var file_wtask_wtask_msg_proto_depIdxs = []int32{ var file_wtask_wtask_msg_proto_depIdxs = []int32{
12, // 0: WTaskBattleStartReq.battle:type_name -> BattleFormation 14, // 0: WTaskInfoResp.info:type_name -> DBWTask
13, // 1: WTaskBattleStartResp.info:type_name -> BattleInfo 15, // 1: WTaskBattleStartReq.battle:type_name -> BattleFormation
14, // 2: WTaskBattleFinishReq.report:type_name -> BattleReport 16, // 2: WTaskBattleStartResp.info:type_name -> BattleInfo
15, // 3: WTaskFinishResp.award:type_name -> UserAssets 17, // 3: WTaskBattleFinishReq.report:type_name -> BattleReport
16, // 4: WTaskAcceptChangePush.accepts:type_name -> DBWTaskItem 18, // 4: WTaskFinishResp.award:type_name -> UserAssets
5, // [5:5] is the sub-list for method output_type 18, // 5: WTaskChapterRewardResp.award:type_name -> UserAssets
5, // [5:5] is the sub-list for method input_type 19, // 6: WTaskAcceptChangePush.accepts:type_name -> DBWTaskItem
5, // [5:5] is the sub-list for extension type_name 7, // [7:7] is the sub-list for method output_type
5, // [5:5] is the sub-list for extension extendee 7, // [7:7] is the sub-list for method input_type
0, // [0:5] is the sub-list for field type_name 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() } 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{} { 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: case 0:
return &v.state return &v.state
case 1: 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{} { 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 { switch v := v.(*WTaskAcceptChangePush); i {
case 0: case 0:
return &v.state return &v.state
@ -911,7 +1033,7 @@ func file_wtask_wtask_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_wtask_wtask_msg_proto_rawDesc, RawDescriptor: file_wtask_wtask_msg_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 12, NumMessages: 14,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },