章节领奖

This commit is contained in:
wh_zcy 2023-03-31 10:57:33 +08:00
parent e211f75c32
commit 82974abfb1
10 changed files with 186 additions and 60 deletions

View File

@ -663,6 +663,7 @@
], ],
"game_make_TunkNum": 5, "game_make_TunkNum": 5,
"pandamas_tiguandiaoxiang_cd": 10, "pandamas_tiguandiaoxiang_cd": 10,
"Max_breakingbad_recipe": 15 "Max_breakingbad_recipe": 15,
"puzzlePromptNum": 5
} }
] ]

View File

@ -125,7 +125,7 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
widget.NewFormItem("任务ID", taskIdEntry), widget.NewFormItem("任务ID", taskIdEntry),
) )
dconf := dialog.NewCustom("接取任务", "关闭", form, this.w) dconf := dialog.NewCustom("交付任务", "关闭", form, this.w)
form.OnSubmit = func() { form.OnSubmit = func() {
if err := service.GetPttService().SendToClient( if err := service.GetPttService().SendToClient(
@ -156,7 +156,7 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
widget.NewFormItem("任务ID", taskIdEntry), widget.NewFormItem("任务ID", taskIdEntry),
) )
dconf := dialog.NewCustom("接取任务", "关闭", form, this.w) dconf := dialog.NewCustom("战斗完成", "关闭", form, this.w)
form.OnSubmit = func() { form.OnSubmit = func() {
if err := service.GetPttService().SendToClient( if err := service.GetPttService().SendToClient(
@ -176,7 +176,33 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
dconf.Resize(fyne.NewSize(400, 200)) dconf.Resize(fyne.NewSize(400, 200))
dconf.Show() dconf.Show()
}) })
barBtn := container.NewHBox(refreshBtn, acceptBtn, completeBtn, this.juqingBtn, battleBtn)
// 章节奖励
chapterBtn := widget.NewButton("章节奖励", func() {
groupId := widget.NewEntry()
groupId.PlaceHolder = "章节ID"
form := widget.NewForm(
widget.NewFormItem("章节ID", groupId),
)
dconf := dialog.NewCustom("章节奖励", "关闭", form, this.w)
form.OnSubmit = func() {
if err := service.GetPttService().SendToClient(
t.MainType,
"chapterreward",
&pb.WorldtaskChapterawardReq{
GroupId: cast.ToInt32(groupId.Text),
}); err != nil {
logrus.Error(err)
}
dconf.Hide()
}
form.SubmitText = "确定"
dconf.Resize(fyne.NewSize(400, 200))
dconf.Show()
})
barBtn := container.NewHBox(refreshBtn, acceptBtn, completeBtn, this.juqingBtn, battleBtn, chapterBtn)
c := container.NewBorder(barBtn, nil, nil, nil, this.itemList.ItemList) c := container.NewBorder(barBtn, nil, nil, nil, this.itemList.ItemList)
this.mineData() this.mineData()

View File

@ -63,7 +63,7 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
len(curTaskConf.Completetask) == 0) && curTaskConf.DeliverNpc == 0 { len(curTaskConf.Completetask) == 0) && curTaskConf.DeliverNpc == 0 {
//结束任务 //结束任务
a.module.modelWorldtask.taskFinish(session, req.GroupId, req.TaskId, myWorldtask, curTaskConf) a.module.modelWorldtask.taskFinish(session, req.GroupId, req.TaskId, myWorldtask, curTaskConf)
a.module.modelWorldtask.taskFinishPush(session, myWorldtask, curTaskConf) a.module.modelWorldtask.taskFinishPush(session, req.GroupId, myWorldtask, curTaskConf)
} }
return return
} }

View File

@ -0,0 +1,58 @@
package worldtask
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
func (this *apiComp) ChapterrewardCheck(session comm.IUserSession, req *pb.WorldtaskChapterawardReq) (code pb.ErrorCode) {
if req.GroupId <= 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
func (this *apiComp) Chapterreward(session comm.IUserSession, req *pb.WorldtaskChapterawardReq) (code pb.ErrorCode, data proto.Message) {
if code = this.ChapterrewardCheck(session, req); code != pb.ErrorCode_Success {
return
}
uid := session.GetUserId()
rsp := &pb.WorldtaskChapterawardResp{}
myWorldtask, err := this.module.modelWorldtask.getWorldtask(uid)
if err != nil {
this.module.Error("获取玩家世界任务失败", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()})
code = pb.ErrorCode_DBError
return
}
if stats, ok := myWorldtask.Chapters[req.GroupId]; !ok {
code = pb.ErrorCode_WorldtaskChapterUnFinished
return
} else {
if stats == 2 {
code = pb.ErrorCode_WorldtaskChapterReceived
return
}
}
gwa, err := this.module.configure.getWorldAllCfg()
if err != nil || gwa == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
rewardCnf := gwa.GetDataMap()[req.GroupId]
if rewardCnf == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
this.module.DispenseRes(session, rewardCnf.Reword, true)
session.SendMsg(this.service.GetType(), "chapterreward", rsp)
return
}

View File

@ -78,7 +78,7 @@ func (this *apiComp) CompleteCondi(session comm.IUserSession, req *pb.WorldtaskC
if curTaskConf.DeliverNpc == 0 { if curTaskConf.DeliverNpc == 0 {
//结束任务 //结束任务
this.module.modelWorldtask.taskFinish(session, req.GroupId, req.TaskId, myWorldtask, curTaskConf) this.module.modelWorldtask.taskFinish(session, req.GroupId, req.TaskId, myWorldtask, curTaskConf)
this.module.modelWorldtask.taskFinishPush(session, myWorldtask, curTaskConf) this.module.modelWorldtask.taskFinishPush(session, req.GroupId, myWorldtask, curTaskConf)
} }
return return
} }

View File

@ -5,7 +5,6 @@ import (
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"go_dreamfactory/utils"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
) )
@ -178,13 +177,17 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
} }
} else { } else {
// 章节完成 // 章节完成
if _, ok := utils.Findx(userTask.Chapters, req.GroupId); !ok { if _, ok := userTask.Chapters[req.GroupId]; !ok {
userTask.Chapters = append(userTask.Chapters, req.GroupId) if userTask.Chapters == nil {
update := map[string]interface{}{ userTask.Chapters = make(map[int32]int32)
"chapters": userTask.Chapters, userTask.Chapters[req.GroupId] = 1 //已解锁待领取
update := map[string]interface{}{
"chapters": userTask.Chapters,
}
this.module.modelWorldtask.Change(uid, update)
} }
this.module.modelWorldtask.Change(uid, update)
} }
} }
} }

View File

@ -10,6 +10,7 @@ import (
const ( const (
gameWorldTask = "game_worldtask.json" gameWorldTask = "game_worldtask.json"
gameWorldtaskBattle = "game_worldbattle.json" gameWorldtaskBattle = "game_worldbattle.json"
gameWorldAll = "game_worldall.json"
) )
type configureComp struct { type configureComp struct {
@ -21,6 +22,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
err = this.LoadMultiConfigure(map[string]interface{}{ err = this.LoadMultiConfigure(map[string]interface{}{
gameWorldTask: cfg.NewGameWorldTask, gameWorldTask: cfg.NewGameWorldTask,
gameWorldtaskBattle: cfg.NewGameWorldBattle, gameWorldtaskBattle: cfg.NewGameWorldBattle,
gameWorldAll: cfg.NewGameWorldAll,
}) })
return return
} }
@ -41,6 +43,22 @@ func (this *configureComp) getWorldtaskCfg() (data *cfg.GameWorldTask, err error
return return
} }
func (this *configureComp) getWorldAllCfg() (data *cfg.GameWorldAll, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(gameWorldAll); err != nil {
return
} else {
if data, ok = v.(*cfg.GameWorldAll); !ok {
err = fmt.Errorf("%T is *cfg.GameWorldAll", v)
return
}
}
return
}
func (this *configureComp) getWorldtaskById(taskId int32) (*cfg.GameWorldTaskData, error) { func (this *configureComp) getWorldtaskById(taskId int32) (*cfg.GameWorldTaskData, error) {
gwt, err := this.getWorldtaskCfg() gwt, err := this.getWorldtaskCfg()
if err != nil { if err != nil {

View File

@ -222,7 +222,7 @@ func (this *ModelWorldtask) updateCheckCond(uid string, userTask *pb.DBWorldtask
return userTask return userTask
} }
func (this *ModelWorldtask) taskFinishPush(session comm.IUserSession, userTask *pb.DBWorldtask, curTaskConf *cfg.GameWorldTaskData) { func (this *ModelWorldtask) taskFinishPush(session comm.IUserSession, groupId int32, userTask *pb.DBWorldtask, curTaskConf *cfg.GameWorldTaskData) {
nextTaskIds := this.findNextTasks(curTaskConf.Key) nextTaskIds := this.findNextTasks(curTaskConf.Key)
this.moduleWorldtask.Debug("nextTaskIds", log.Field{Key: "nextTaskIds", Value: nextTaskIds}) this.moduleWorldtask.Debug("nextTaskIds", log.Field{Key: "nextTaskIds", Value: nextTaskIds})
@ -245,13 +245,16 @@ func (this *ModelWorldtask) taskFinishPush(session comm.IUserSession, userTask *
}) })
} else { } else {
// 章节完成 // 章节完成
// if _, ok := utils.Findx(userTask.Chapters, req.GroupId); !ok { if _, ok := userTask.Chapters[groupId]; !ok {
// userTask.Chapters = append(userTask.Chapters, req.GroupId) if userTask.Chapters == nil {
// update := map[string]interface{}{ userTask.Chapters = make(map[int32]int32)
// "chapters": userTask.Chapters, userTask.Chapters[groupId] = 1 //已解锁待领取
// } update := map[string]interface{}{
// this.module.modelWorldtask.Change(uid, update) "chapters": userTask.Chapters,
// } }
this.Change(session.GetUserId(), update)
}
}
} }
} }

View File

@ -312,13 +312,15 @@ const (
ErrorCode_PayRenewTimeErr ErrorCode = 3702 // 续费时间没达到要求 ErrorCode_PayRenewTimeErr ErrorCode = 3702 // 续费时间没达到要求
ErrorCode_PayOrderCompleted ErrorCode = 3703 // 订单已完成 ErrorCode_PayOrderCompleted ErrorCode = 3703 // 订单已完成
// worldtask // worldtask
ErrorCode_WorldtaskFinish ErrorCode = 3801 //任务完成失败 ErrorCode_WorldtaskFinish ErrorCode = 3801 //任务完成失败
ErrorCode_WorldtaskLvNotEnough ErrorCode = 3802 //等级不满足 ErrorCode_WorldtaskLvNotEnough ErrorCode = 3802 //等级不满足
ErrorCode_WorldtaskNoAccept ErrorCode = 3803 //不能接取 ErrorCode_WorldtaskNoAccept ErrorCode = 3803 //不能接取
ErrorCode_WorldtaskNoComplete ErrorCode = 3804 //任务条件未完成 ErrorCode_WorldtaskNoComplete ErrorCode = 3804 //任务条件未完成
ErrorCode_WorldtaskFinihed ErrorCode = 3805 //任务已完成 ErrorCode_WorldtaskFinihed ErrorCode = 3805 //任务已完成
ErrorCode_WorldtaskLastUnFinished ErrorCode = 3806 //上个任务未完成 ErrorCode_WorldtaskLastUnFinished ErrorCode = 3806 //上个任务未完成
ErrorCode_WorldtaskGroupIdNosame ErrorCode = 3807 //组ID不一致 ErrorCode_WorldtaskGroupIdNosame ErrorCode = 3807 //组ID不一致
ErrorCode_WorldtaskChapterUnFinished ErrorCode = 3808 //章节任务未完成
ErrorCode_WorldtaskChapterReceived ErrorCode = 3809 //章节奖励已领取
// academy // academy
ErrorCode_AcademyTaskNoCompleteTask ErrorCode = 3901 //未完成任务 ErrorCode_AcademyTaskNoCompleteTask ErrorCode = 3901 //未完成任务
// AutoBattle // AutoBattle
@ -627,6 +629,8 @@ var (
3805: "WorldtaskFinihed", 3805: "WorldtaskFinihed",
3806: "WorldtaskLastUnFinished", 3806: "WorldtaskLastUnFinished",
3807: "WorldtaskGroupIdNosame", 3807: "WorldtaskGroupIdNosame",
3808: "WorldtaskChapterUnFinished",
3809: "WorldtaskChapterReceived",
3901: "AcademyTaskNoCompleteTask", 3901: "AcademyTaskNoCompleteTask",
4001: "AutoBattleNoData", 4001: "AutoBattleNoData",
4002: "AutoBattleStatesErr", 4002: "AutoBattleStatesErr",
@ -927,6 +931,8 @@ var (
"WorldtaskFinihed": 3805, "WorldtaskFinihed": 3805,
"WorldtaskLastUnFinished": 3806, "WorldtaskLastUnFinished": 3806,
"WorldtaskGroupIdNosame": 3807, "WorldtaskGroupIdNosame": 3807,
"WorldtaskChapterUnFinished": 3808,
"WorldtaskChapterReceived": 3809,
"AcademyTaskNoCompleteTask": 3901, "AcademyTaskNoCompleteTask": 3901,
"AutoBattleNoData": 4001, "AutoBattleNoData": 4001,
"AutoBattleStatesErr": 4002, "AutoBattleStatesErr": 4002,
@ -992,7 +998,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{ var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0x98, 0x36, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x6f, 0x2a, 0xd8, 0x36, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
@ -1376,7 +1382,11 @@ var file_errorcode_proto_rawDesc = []byte{
0x17, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x6e, 0x17, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x6e,
0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xde, 0x1d, 0x12, 0x1b, 0x0a, 0x16, 0x57, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xde, 0x1d, 0x12, 0x1b, 0x0a, 0x16, 0x57,
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x4e, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x4e,
0x6f, 0x73, 0x61, 0x6d, 0x65, 0x10, 0xdf, 0x1d, 0x12, 0x1e, 0x0a, 0x19, 0x41, 0x63, 0x61, 0x64, 0x6f, 0x73, 0x61, 0x6d, 0x65, 0x10, 0xdf, 0x1d, 0x12, 0x1f, 0x0a, 0x1a, 0x57, 0x6f, 0x72, 0x6c,
0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x55, 0x6e, 0x46, 0x69,
0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xe0, 0x1d, 0x12, 0x1d, 0x0a, 0x18, 0x57, 0x6f, 0x72,
0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x52, 0x65, 0x63,
0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xe1, 0x1d, 0x12, 0x1e, 0x0a, 0x19, 0x41, 0x63, 0x61, 0x64,
0x65, 0x6d, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x6d, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
0x65, 0x54, 0x61, 0x73, 0x6b, 0x10, 0xbd, 0x1e, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x6f, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x10, 0xbd, 0x1e, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x6f,
0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xa1, 0x1f, 0x12, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xa1, 0x1f, 0x12,

View File

@ -28,7 +28,7 @@ type DBWorldtask struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID
TaskList []int32 `protobuf:"varint,3,rep,packed,name=taskList,proto3" json:"taskList" bson:"taskList"` // 任务列表 TaskList []int32 `protobuf:"varint,3,rep,packed,name=taskList,proto3" json:"taskList" bson:"taskList"` // 任务列表
CurrentTask map[int32]*Worldtask `protobuf:"bytes,4,rep,name=currentTask,proto3" json:"currentTask" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"currentTask"` //正在进行的任务 CurrentTask map[int32]*Worldtask `protobuf:"bytes,4,rep,name=currentTask,proto3" json:"currentTask" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"currentTask"` //正在进行的任务
Chapters []int32 `protobuf:"varint,5,rep,packed,name=chapters,proto3" json:"chapters" bson:"chapters"` //章节ID Chapters map[int32]int32 `protobuf:"bytes,5,rep,name=chapters,proto3" json:"chapters" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"chapters"` //key章节ID v状态 1已解锁2已领取
} }
func (x *DBWorldtask) Reset() { func (x *DBWorldtask) Reset() {
@ -84,7 +84,7 @@ func (x *DBWorldtask) GetCurrentTask() map[int32]*Worldtask {
return nil return nil
} }
func (x *DBWorldtask) GetChapters() []int32 { func (x *DBWorldtask) GetChapters() map[int32]int32 {
if x != nil { if x != nil {
return x.Chapters return x.Chapters
} }
@ -174,33 +174,38 @@ var File_worldtask_worldtask_db_proto protoreflect.FileDescriptor
var file_worldtask_worldtask_db_proto_rawDesc = []byte{ var file_worldtask_worldtask_db_proto_rawDesc = []byte{
0x0a, 0x1c, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x77, 0x6f, 0x72, 0x6c, 0x0a, 0x1c, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x77, 0x6f, 0x72, 0x6c,
0x64, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd,
0x01, 0x0a, 0x0b, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x10, 0x02, 0x0a, 0x0b, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03,
0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0b, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0b,
0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x03, 0x28, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x0b, 0x32, 0x1d, 0x2e, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x2e,
0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x0a, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a,
0x08, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x08, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x4a, 0x0a, 0x10, 0x43, 0x75, 0x72, 0x1a, 0x2e, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x68,
0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x68, 0x61,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x70, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x4a, 0x0a, 0x10, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74,
0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, 0x01, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x57, 0x6f, 0x72,
0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74,
0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x70, 0x63, 0x53, 0x74, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6e, 0x70, 0x63, 0x53, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99,
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x01, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06,
0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61,
0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4e, 0x70, 0x63, 0x18, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65,
0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4e, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65,
0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20,
0x33, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6e, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a,
0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05,
0x52, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65,
0x6c, 0x69, 0x76, 0x65, 0x72, 0x4e, 0x70, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4e, 0x70, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -215,20 +220,22 @@ func file_worldtask_worldtask_db_proto_rawDescGZIP() []byte {
return file_worldtask_worldtask_db_proto_rawDescData return file_worldtask_worldtask_db_proto_rawDescData
} }
var file_worldtask_worldtask_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_worldtask_worldtask_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_worldtask_worldtask_db_proto_goTypes = []interface{}{ var file_worldtask_worldtask_db_proto_goTypes = []interface{}{
(*DBWorldtask)(nil), // 0: DBWorldtask (*DBWorldtask)(nil), // 0: DBWorldtask
(*Worldtask)(nil), // 1: Worldtask (*Worldtask)(nil), // 1: Worldtask
nil, // 2: DBWorldtask.CurrentTaskEntry nil, // 2: DBWorldtask.CurrentTaskEntry
nil, // 3: DBWorldtask.ChaptersEntry
} }
var file_worldtask_worldtask_db_proto_depIdxs = []int32{ var file_worldtask_worldtask_db_proto_depIdxs = []int32{
2, // 0: DBWorldtask.currentTask:type_name -> DBWorldtask.CurrentTaskEntry 2, // 0: DBWorldtask.currentTask:type_name -> DBWorldtask.CurrentTaskEntry
1, // 1: DBWorldtask.CurrentTaskEntry.value:type_name -> Worldtask 3, // 1: DBWorldtask.chapters:type_name -> DBWorldtask.ChaptersEntry
2, // [2:2] is the sub-list for method output_type 1, // 2: DBWorldtask.CurrentTaskEntry.value:type_name -> Worldtask
2, // [2:2] is the sub-list for method input_type 3, // [3:3] is the sub-list for method output_type
2, // [2:2] is the sub-list for extension type_name 3, // [3:3] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension extendee 3, // [3:3] is the sub-list for extension type_name
0, // [0:2] is the sub-list for field type_name 3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
} }
func init() { file_worldtask_worldtask_db_proto_init() } func init() { file_worldtask_worldtask_db_proto_init() }
@ -268,7 +275,7 @@ func file_worldtask_worldtask_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_worldtask_worldtask_db_proto_rawDesc, RawDescriptor: file_worldtask_worldtask_db_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 3, NumMessages: 4,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },