From bf98281c0afed41ff15d334d9ace6e1552bf3de9 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 23 Mar 2023 10:22:06 +0800 Subject: [PATCH] update --- bin/json/game_worldtask.json | 525 ++++----------- cmd/v2/ui/views/worldtask_mine.go | 33 +- modules/gateway/agent.go | 3 +- modules/worldtask/api_accept.go | 61 ++ modules/worldtask/api_battlefinish.go | 11 +- modules/worldtask/api_completetask.go | 62 ++ modules/worldtask/api_finish.go | 63 +- modules/worldtask/api_mine.go | 2 +- modules/worldtask/model_worldtask.go | 1 + modules/worldtask/module.go | 6 +- pb/worldtask_db.pb.go | 98 ++- pb/worldtask_msg.pb.go | 689 +++++++++++++------- sys/configure/structs/Game.WorldTaskData.go | 46 +- 13 files changed, 848 insertions(+), 752 deletions(-) create mode 100644 modules/worldtask/api_accept.go create mode 100644 modules/worldtask/api_completetask.go diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index ddf35bce7..cb473f838 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -19,23 +19,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" + "npc": 1, + "completetask": [ + 20001 ], - "getafter_event": [ - 2, - 401 - ], - "receivenpc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" - ], - "completetask": 0, + "deliver_npc": 1, "auto_accept": 1, - "overtips": 1, "reword": [], "module": [ "practice" @@ -61,23 +50,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" + "npc": 1, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 402 - ], - "receivenpc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 1, + "auto_accept": 1, "reword": [], "module": [ "practice" @@ -103,23 +81,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "1.新手引导-花朵-中轴城", - "901" + "npc": 1, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 403 - ], - "receivenpc": [ - "bossfight_pt_02", - "1.新手引导-花朵-中轴城", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 3, + "auto_accept": 1, "reword": [], "module": [ "practice" @@ -145,23 +112,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "1.新手引导-花朵-中轴城", - "901" + "npc": 4, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 404 - ], - "receivenpc": [ - "bossfight_pt_02", - "1.新手引导-花朵-中轴城", - "901" - ], - "completetask": 0, + "deliver_npc": 4, "auto_accept": 1, - "overtips": 1, "reword": [], "module": [] }, @@ -185,23 +141,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" + "npc": 5, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 406 - ], - "receivenpc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 5, + "auto_accept": 1, "reword": [], "module": [] }, @@ -225,23 +170,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "3新手引导-波比-正常待机-中轴城", - "901" + "npc": 6, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 407 - ], - "receivenpc": [ - "bossfight_pt_02", - "3新手引导-波比-正常待机-中轴城", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 6, + "auto_accept": 1, "reword": [], "module": [] }, @@ -265,30 +199,13 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "2新手引导-邦尼兔-正常待机-中轴城", - "901" - ], - "getafter_event": [ - 2, - 408 - ], - "receivenpc": [ - "bossfight_pt_02", - "2新手引导-邦尼兔-正常待机-中轴城", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, - "reword": [ - { - "a": "hero", - "t": "14003", - "n": 1 - } + "npc": 7, + "completetask": [ + 0 ], + "deliver_npc": 7, + "auto_accept": 1, + "reword": [], "module": [] }, { @@ -311,23 +228,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "3新手引导-波比-正常待机-中轴城", - "901" + "npc": 8, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 410 - ], - "receivenpc": [ - "bossfight_pt_02", - "新手引导-波比-右屏圣树1", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 8, + "auto_accept": 1, "reword": [], "module": [] }, @@ -351,23 +257,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "3新手引导-波比-正常待机-中轴城", - "901" + "npc": 9, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 411 - ], - "receivenpc": [ - "bossfight_pt_02", - "新手引导-波比-右屏圣树2", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 9, + "auto_accept": 1, "reword": [], "module": [] }, @@ -391,23 +286,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "新手引导-豺狼人-右屏圣树", - "901" + "npc": 10, + "completetask": [ + 174 ], - "getafter_event": [ - 2, - 412 - ], - "receivenpc": [ - "bossfight_pt_02", - "新手引导-豺狼人-右屏圣树", - "901" - ], - "completetask": 174, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 10, + "auto_accept": 1, "reword": [ { "a": "hero", @@ -437,23 +321,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "新手引导-豺狼人-右屏圣树", - "901" + "npc": 11, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 413 - ], - "receivenpc": [ - "bossfight_pt_02", - "新手引导-豺狼人-右屏圣树", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 11, + "auto_accept": 1, "reword": [], "module": [] }, @@ -477,23 +350,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "新手引导-圣树下的黑洞", - "901" + "npc": 12, + "completetask": [ + 301 ], - "getafter_event": [ - 4, - 166 - ], - "receivenpc": [ - "bossfight_pt_02", - "新手引导-波比-犀牛守卫", - "901" - ], - "completetask": 301, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 12, + "auto_accept": 1, "reword": [ { "a": "item", @@ -523,23 +385,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "新手引导-波比-犀牛守卫", - "901" + "npc": 13, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 416 - ], - "receivenpc": [ - "bossfight_pt_02", - "新手引导-波比-犀牛守卫", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 13, + "auto_accept": 1, "reword": [], "module": [] }, @@ -563,23 +414,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "3新手引导-波比-正常待机-中轴城", - "901" + "npc": 14, + "completetask": [ + 0 ], - "getafter_event": [ - 9, - 1 - ], - "receivenpc": [ - "bossfight_pt_02", - "新手引导-波比-右屏圣树3", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 0, + "deliver_npc": 14, + "auto_accept": 1, "reword": [], "module": [] }, @@ -603,23 +443,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "3新手引导-波比-正常待机-中轴城", - "901" + "npc": 15, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 420 - ], - "receivenpc": [ - "bossfight_pt_02", - "新手引导-波比-右屏圣树3", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 15, + "auto_accept": 1, "reword": [], "module": [] }, @@ -643,23 +472,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" + "npc": 16, + "completetask": [ + 161 ], - "getafter_event": [ - 2, - 422 - ], - "receivenpc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" - ], - "completetask": 161, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 16, + "auto_accept": 1, "reword": [], "module": [] }, @@ -683,23 +501,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" + "npc": 17, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 423 - ], - "receivenpc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" - ], - "completetask": 0, + "deliver_npc": 17, "auto_accept": 1, - "overtips": 1, "reword": [], "module": [] }, @@ -723,23 +530,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" + "npc": 18, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 425 - ], - "receivenpc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 18, + "auto_accept": 1, "reword": [], "module": [] }, @@ -763,23 +559,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" + "npc": 19, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 426 - ], - "receivenpc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" - ], - "completetask": 0, + "deliver_npc": 19, "auto_accept": 1, - "overtips": 1, "reword": [ { "a": "item", @@ -809,23 +594,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "scenes_smithy_01", - "暴夫纳特铁匠铺", - "139" + "npc": 20, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 427 - ], - "receivenpc": [ - "scenes_smithy_01", - "暴夫纳特铁匠铺", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 20, + "auto_accept": 1, "reword": [], "module": [] }, @@ -849,23 +623,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "scenes_smithy_01", - "暴夫纳特铁匠铺", - "139" + "npc": 21, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 428 - ], - "receivenpc": [ - "scenes_smithy_01", - "暴夫纳特铁匠铺", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 21, + "auto_accept": 1, "reword": [], "module": [] }, @@ -889,23 +652,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" + "npc": 22, + "completetask": [ + 0 ], - "getafter_event": [ - 2, - 429 - ], - "receivenpc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" - ], - "completetask": 0, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 22, + "auto_accept": 1, "reword": [], "module": [] }, @@ -929,23 +681,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" + "npc": 23, + "completetask": [ + 302 ], - "getafter_event": [ - 2, - 430 - ], - "receivenpc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" - ], - "completetask": 302, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 23, + "auto_accept": 1, "reword": [], "module": [] }, @@ -969,23 +710,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" + "npc": 24, + "completetask": [ + 303 ], - "getafter_event": [ - 2, - 431 - ], - "receivenpc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" - ], - "completetask": 303, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 24, + "auto_accept": 1, "reword": [], "module": [] }, @@ -1009,23 +739,12 @@ "key": "story_80", "text": "新手引导" }, - "npc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" + "npc": 25, + "completetask": [ + 114 ], - "getafter_event": [ - 2, - 432 - ], - "receivenpc": [ - "bossfight_pt_02", - "0新手引导-杰克-中轴城常驻待机", - "901" - ], - "completetask": 114, - "auto_accept": 0, - "overtips": 1, + "deliver_npc": 25, + "auto_accept": 1, "reword": [], "module": [] } diff --git a/cmd/v2/ui/views/worldtask_mine.go b/cmd/v2/ui/views/worldtask_mine.go index ffc20cd81..c15462620 100644 --- a/cmd/v2/ui/views/worldtask_mine.go +++ b/cmd/v2/ui/views/worldtask_mine.go @@ -48,6 +48,37 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject { this.mineReq() }) + //接取 + acceptBtn := widget.NewButton("接取", func() { + groupId := widget.NewEntry() + groupId.PlaceHolder = "分组ID" + taskIdEntry := widget.NewEntry() + taskIdEntry.PlaceHolder = "任务ID" + form := widget.NewForm( + widget.NewFormItem("组ID", groupId), + widget.NewFormItem("任务ID", taskIdEntry), + ) + + dconf := dialog.NewCustom("接取任务", "关闭", form, this.w) + + form.OnSubmit = func() { + if err := service.GetPttService().SendToClient( + t.MainType, + "accept", + &pb.WorldtaskAcceptReq{ + GroupId: cast.ToInt32(groupId.Text), + TaskId: cast.ToInt32(taskIdEntry.Text), + }); err != nil { + logrus.Error(err) + } + dconf.Hide() + this.mineReq() + } + form.SubmitText = "确定" + dconf.Resize(fyne.NewSize(400, 200)) + dconf.Show() + }) + // 完成任务 this.juqingBtn = widget.NewButton("完成任务", func() { groupId := widget.NewEntry() @@ -110,7 +141,7 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject { dconf.Resize(fyne.NewSize(400, 200)) dconf.Show() }) - barBtn := container.NewHBox(refreshBtn, this.juqingBtn, battleBtn) + barBtn := container.NewHBox(refreshBtn, acceptBtn, this.juqingBtn, battleBtn) c := container.NewBorder(barBtn, nil, nil, nil, this.itemList.ItemList) this.mineData() diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index 430b8c0d1..8fff94efc 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -330,7 +330,8 @@ func (this *Agent) messageDistribution(msg *pb.UserMessage) (err error) { } stime := time.Now() // this.gateway.Debugf("----------3 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) - ctx, _ := context.WithTimeout(context.Background(), time.Second*5) + // ctx, _ := context.WithTimeout(context.Background(), time.Second*5) + ctx:=context.Background() if len(serviceTag) == 0 { // this.gateway.Debugf("----------4 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) if err = this.gateway.Service().RpcCall(ctx, servicePath, string(comm.Rpc_GatewayRoute), req, reply); err != nil { diff --git a/modules/worldtask/api_accept.go b/modules/worldtask/api_accept.go new file mode 100644 index 000000000..f13c2ad31 --- /dev/null +++ b/modules/worldtask/api_accept.go @@ -0,0 +1,61 @@ +package worldtask + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/log" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +func (a *apiComp) AcceptCheck(session comm.IUserSession, req *pb.WorldtaskAcceptReq) (code pb.ErrorCode) { + if req.TaskId <= 0 || req.GroupId <= 0 { + code = *pb.ErrorCode_ReqParameterError.Enum() + } + return +} + +func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq) (code pb.ErrorCode, data proto.Message) { + if code = a.AcceptCheck(session, req); code != pb.ErrorCode_Success { + return + } + uid := session.GetUserId() + myWorldtask, err := a.module.modelWorldtask.getWorldtask(uid) + if err != nil { + a.module.Error("获取玩家世界任务失败", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()}) + code = pb.ErrorCode_DBError + return + } + + // 当前任务配置 + curTaskConf, err := a.module.configure.getWorldtaskById(req.TaskId) + if err != nil || curTaskConf == nil { + code = pb.ErrorCode_ConfigNoFound + return + } + + if myWorldtask.CurrentTaskIds == nil { + myWorldtask.CurrentTaskIds = make(map[int32]*pb.Worldtask) + } + myWorldtask.CurrentTaskIds[curTaskConf.Group] = &pb.Worldtask{ + TaskId: req.TaskId, + TaskType: 2, + } + + update := map[string]interface{}{ + "currentTaskIds": myWorldtask.CurrentTaskIds, + "npcStatus": 1, + } + if err := a.module.modelWorldtask.Change(uid, update); err != nil { + code = pb.ErrorCode_DBError + return + } + + rsp := &pb.WorldtaskAcceptResp{ + GroupId: req.GroupId, + TaskId: req.TaskId, + } + + session.SendMsg(string(a.module.GetType()), "accept", rsp) + return +} diff --git a/modules/worldtask/api_battlefinish.go b/modules/worldtask/api_battlefinish.go index 7a3f39140..b83cf8cb7 100644 --- a/modules/worldtask/api_battlefinish.go +++ b/modules/worldtask/api_battlefinish.go @@ -23,9 +23,6 @@ func (this *apiComp) BattlefinishCheck(session comm.IUserSession, req *pb.Worldt } func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBattleFinishReq) (code pb.ErrorCode, data proto.Message) { - var ( - user *pb.DBUser - ) if code = this.BattlefinishCheck(session, req); code != pb.ErrorCode_Success { return @@ -44,14 +41,12 @@ func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBa code = pb.ErrorCode_DBError return } - user = this.module.ModuleUser.GetUser(session.GetUserId()) + rsp := &pb.WorldtaskBattleFinishResp{ - TaskId: req.TaskId, - Newheros: make([]string, 0), - Olv: user.Lv, + TaskId: req.TaskId, } - if taskConf.Completetask == 0 { + if len(taskConf.Completetask) == 0 { if err := this.module.modelWorldtask.finishTask(taskConf.Group, req.TaskId, userTask); err != nil { code = pb.ErrorCode_DBError this.module.Error("世界任务战斗结果", diff --git a/modules/worldtask/api_completetask.go b/modules/worldtask/api_completetask.go new file mode 100644 index 000000000..75b199cd7 --- /dev/null +++ b/modules/worldtask/api_completetask.go @@ -0,0 +1,62 @@ +package worldtask + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/log" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +// 任务完成条件 +func (this *apiComp) CompleteCondiCheck(session comm.IUserSession, req *pb.WorldtaskCompleteCondiReq) (code pb.ErrorCode) { + if req.GroupId != 2 || req.TaskId <= 0 || req.CondiId <= 0 { + code = *pb.ErrorCode_ReqParameterError.Enum() + } + return +} + +func (this *apiComp) CompleteCondi(session comm.IUserSession, req *pb.WorldtaskCompleteCondiReq) (code pb.ErrorCode, data proto.Message) { + if code = this.CompleteCondiCheck(session, req); code != pb.ErrorCode_Success { + return + } + uid := session.GetUserId() + 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 req.CondiId == 2000120003 { + myWorldtask.CondiIds = append(myWorldtask.CondiIds, 20001) + } else { + if m, err := this.module.service.GetModule(comm.ModuleWorldtask); err == nil { + iwt, ok := m.(comm.IRtask) + if ok { + if code = iwt.CheckCondi(uid, req.CondiId); code == pb.ErrorCode_Success { + myWorldtask.CondiIds = append(myWorldtask.CondiIds, req.CondiId) + } else { + return + } + } + } + } + + update := map[string]interface{}{ + "condiIds": myWorldtask.CondiIds, + } + if err := this.module.modelWorldtask.Change(uid, update); err != nil { + code = pb.ErrorCode_DBError + return + } + + rsp := &pb.WorldtaskCompleteCondiResp{ + GroupId: req.GroupId, + TaskId: req.TaskId, + CondiId: req.CondiId, + } + + session.SendMsg(string(this.module.GetType()), "completecondi", rsp) + return +} diff --git a/modules/worldtask/api_finish.go b/modules/worldtask/api_finish.go index 4a8404864..b39c47e78 100644 --- a/modules/worldtask/api_finish.go +++ b/modules/worldtask/api_finish.go @@ -37,7 +37,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe code = pb.ErrorCode_UserSessionNobeing return } - rsp.Olv = user.Lv + // 当前任务配置 curTaskConf, err := this.module.configure.getWorldtaskById(req.TaskId) if err != nil || curTaskConf == nil { @@ -75,11 +75,9 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe } } var ( - hero []string - newhero []string + hero []string ) hero = make([]string, 0) - newhero = make([]string, 0) var nextTaskId int32 finishRsp := func() { @@ -96,6 +94,19 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe code = pb.ErrorCode_SystemError return } + + userTask.CurrentTaskIds[curTaskConf.Group] = &pb.Worldtask{ + TaskId: nextTaskId, + TaskType: 2, + } + + update := map[string]interface{}{ + "currentTaskIds": userTask.CurrentTaskIds, + } + if err := this.module.modelWorldtask.Change(uid, update); err != nil { + code = pb.ErrorCode_DBError + return + } } } @@ -114,15 +125,6 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe hero = append(hero, v.T) } } - if len(hero) > 0 { - ishave := this.module.ModuleUser.CheckTujianHero(session, hero) - for i, v := range ishave { - if !v { - newhero = append(newhero, hero[i]) - } - } - } - rsp.Newheros = newhero // 完成任务 if err := this.module.modelWorldtask.finishTask(req.GroupId, req.TaskId, userTask); err != nil { @@ -175,24 +177,23 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe } } - if curTaskConf.Completetask != 0 { - if c := this.module.ModuleRtask.CheckCondi(uid, curTaskConf.Completetask); c == pb.ErrorCode_Success { - finishCall() - } else { - this.module.Debug("任务完成条件未通过", - log.Field{Key: "uid", Value: uid}, - log.Field{Key: "condiId", Value: curTaskConf.Completetask}, - ) - code = pb.ErrorCode_TaskNoFinished - // if err := session.SendMsg(string(this.module.GetType()), WorldtaskSubtypeFinish, rsp); err != nil { - // code = pb.ErrorCode_SystemError - // return - // } - return - } - } else { - finishCall() - } + // if len(curTaskConf.Completetask) != 0 { + // for _, v := range curTaskConf.Completetask { + // if c := this.module.ModuleRtask.CheckCondi(uid, v); c == pb.ErrorCode_Success { + // finishCall() + // } else { + // this.module.Debug("任务完成条件未通过", + // log.Field{Key: "uid", Value: uid}, + // log.Field{Key: "condiId", Value: curTaskConf.Completetask}, + // ) + // code = pb.ErrorCode_TaskNoFinished + // return + // } + // } + + // } else { + finishCall() + // } finishRsp() diff --git a/modules/worldtask/api_mine.go b/modules/worldtask/api_mine.go index 7a62c3c33..9159ff1ff 100644 --- a/modules/worldtask/api_mine.go +++ b/modules/worldtask/api_mine.go @@ -35,7 +35,7 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.WorldtaskMineReq) ( } } myWorldtask.LastTaskIds = wtMp - myWorldtask.TaskList = list + myWorldtask.TaskList = list rsp := &pb.WorldtaskMineResp{ Task: myWorldtask, } diff --git a/modules/worldtask/model_worldtask.go b/modules/worldtask/model_worldtask.go index 98d0a8e37..d119ef013 100644 --- a/modules/worldtask/model_worldtask.go +++ b/modules/worldtask/model_worldtask.go @@ -95,6 +95,7 @@ func (this *ModelWorldtask) finishTask(groupId, taskId int32, task *pb.DBWorldta update["taskList"] = task.TaskList update["lastTaskIds"] = task.LastTaskIds + update["deliverNpc"] = 1 if err := this.Change(task.Uid, update); err != nil { return err } diff --git a/modules/worldtask/module.go b/modules/worldtask/module.go index d825c681c..3a098bc8b 100644 --- a/modules/worldtask/module.go +++ b/modules/worldtask/module.go @@ -60,8 +60,10 @@ func (this *Worldtask) TaskcondNotify(session comm.IUserSession, condId int32) e finishedTaskIds := make(map[int32]int32) //达成的任务条件 for _, c := range this.worldtaskConf.GetDataList() { - if c.Completetask != 0 && c.Completetask == condId { - finishedTaskIds[c.Group] = c.Key + for _, v := range c.Completetask { + if v == condId { + finishedTaskIds[c.Group] = c.Key + } } } diff --git a/pb/worldtask_db.pb.go b/pb/worldtask_db.pb.go index 00b5df048..725b92508 100644 --- a/pb/worldtask_db.pb.go +++ b/pb/worldtask_db.pb.go @@ -25,9 +25,13 @@ type DBWorldtask struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID - LastTaskIds map[int32]*Worldtask `protobuf:"bytes,2,rep,name=lastTaskIds,proto3" json:"lastTaskIds" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"lastTaskIds"` //上一次完成的任务 key:groupId val:任务ID - TaskList []*Worldtask `protobuf:"bytes,3,rep,name=taskList,proto3" json:"taskList" bson:"taskList"` // 任务列表 + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID + LastTaskIds map[int32]*Worldtask `protobuf:"bytes,2,rep,name=lastTaskIds,proto3" json:"lastTaskIds" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"lastTaskIds"` //上一次完成的任务 key:groupId val:任务ID + TaskList []*Worldtask `protobuf:"bytes,3,rep,name=taskList,proto3" json:"taskList" bson:"taskList"` // 任务列表 + CurrentTaskIds map[int32]*Worldtask `protobuf:"bytes,4,rep,name=currentTaskIds,proto3" json:"currentTaskIds" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"currentTaskIds"` //正在进行的任务 + NpcStatus int32 `protobuf:"varint,5,opt,name=npcStatus,proto3" json:"npcStatus" bson:"npcStatus"` //NPC任务完成状态0未完成 1完成 + CondiIds []int32 `protobuf:"varint,6,rep,packed,name=condiIds,proto3" json:"condiIds" bson:"condiIds"` //任务完成条件 + DeliverNpc int32 `protobuf:"varint,7,opt,name=deliverNpc,proto3" json:"deliverNpc" bson:"deliverNpc"` //交付NPC完成状态0未完成 1完成 } func (x *DBWorldtask) Reset() { @@ -83,6 +87,34 @@ func (x *DBWorldtask) GetTaskList() []*Worldtask { return nil } +func (x *DBWorldtask) GetCurrentTaskIds() map[int32]*Worldtask { + if x != nil { + return x.CurrentTaskIds + } + return nil +} + +func (x *DBWorldtask) GetNpcStatus() int32 { + if x != nil { + return x.NpcStatus + } + return 0 +} + +func (x *DBWorldtask) GetCondiIds() []int32 { + if x != nil { + return x.CondiIds + } + return nil +} + +func (x *DBWorldtask) GetDeliverNpc() int32 { + if x != nil { + return x.DeliverNpc + } + return 0 +} + type Worldtask struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -142,8 +174,8 @@ var File_worldtask_worldtask_db_proto protoreflect.FileDescriptor var file_worldtask_worldtask_db_proto_rawDesc = []byte{ 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, 0xd4, - 0x01, 0x0a, 0x0b, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x10, + 0x64, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc7, + 0x03, 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, 0x12, 0x3f, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, @@ -151,17 +183,32 @@ var file_worldtask_worldtask_db_proto_rawDesc = []byte{ 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, - 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x4a, 0x0a, 0x10, 0x4c, 0x61, 0x73, - 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 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, - 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, - 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3f, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, - 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, - 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, - 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x0e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x2e, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, + 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x05, 0x20, 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, 0x1a, 0x4a, 0x0a, + 0x10, 0x4c, 0x61, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 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, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4d, 0x0a, 0x13, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 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, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3f, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6c, + 0x64, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -176,21 +223,24 @@ func file_worldtask_worldtask_db_proto_rawDescGZIP() []byte { 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{}{ (*DBWorldtask)(nil), // 0: DBWorldtask (*Worldtask)(nil), // 1: Worldtask nil, // 2: DBWorldtask.LastTaskIdsEntry + nil, // 3: DBWorldtask.CurrentTaskIdsEntry } var file_worldtask_worldtask_db_proto_depIdxs = []int32{ 2, // 0: DBWorldtask.lastTaskIds:type_name -> DBWorldtask.LastTaskIdsEntry 1, // 1: DBWorldtask.taskList:type_name -> Worldtask - 1, // 2: DBWorldtask.LastTaskIdsEntry.value:type_name -> Worldtask - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 3, // 2: DBWorldtask.currentTaskIds:type_name -> DBWorldtask.CurrentTaskIdsEntry + 1, // 3: DBWorldtask.LastTaskIdsEntry.value:type_name -> Worldtask + 1, // 4: DBWorldtask.CurrentTaskIdsEntry.value:type_name -> Worldtask + 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 } func init() { file_worldtask_worldtask_db_proto_init() } @@ -230,7 +280,7 @@ func file_worldtask_worldtask_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_worldtask_worldtask_db_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/worldtask_msg.pb.go b/pb/worldtask_msg.pb.go index 5e42c8e30..ad4ecbe5e 100644 --- a/pb/worldtask_msg.pb.go +++ b/pb/worldtask_msg.pb.go @@ -106,6 +106,292 @@ func (x *WorldtaskMineResp) GetTask() *DBWorldtask { return nil } +//接受任务 +type WorldtaskAcceptReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupId int32 `protobuf:"varint,1,opt,name=groupId,proto3" json:"groupId"` + TaskId int32 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId"` +} + +func (x *WorldtaskAcceptReq) Reset() { + *x = WorldtaskAcceptReq{} + if protoimpl.UnsafeEnabled { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorldtaskAcceptReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldtaskAcceptReq) ProtoMessage() {} + +func (x *WorldtaskAcceptReq) ProtoReflect() protoreflect.Message { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[2] + 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 WorldtaskAcceptReq.ProtoReflect.Descriptor instead. +func (*WorldtaskAcceptReq) Descriptor() ([]byte, []int) { + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{2} +} + +func (x *WorldtaskAcceptReq) GetGroupId() int32 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *WorldtaskAcceptReq) GetTaskId() int32 { + if x != nil { + return x.TaskId + } + return 0 +} + +type WorldtaskAcceptResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupId int32 `protobuf:"varint,1,opt,name=groupId,proto3" json:"groupId"` + TaskId int32 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId"` +} + +func (x *WorldtaskAcceptResp) Reset() { + *x = WorldtaskAcceptResp{} + if protoimpl.UnsafeEnabled { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorldtaskAcceptResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldtaskAcceptResp) ProtoMessage() {} + +func (x *WorldtaskAcceptResp) ProtoReflect() protoreflect.Message { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[3] + 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 WorldtaskAcceptResp.ProtoReflect.Descriptor instead. +func (*WorldtaskAcceptResp) Descriptor() ([]byte, []int) { + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{3} +} + +func (x *WorldtaskAcceptResp) GetGroupId() int32 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *WorldtaskAcceptResp) GetTaskId() int32 { + if x != nil { + return x.TaskId + } + return 0 +} + +//任务完成条件推送 +type WorldtaskCompletetaskPush struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CondiIds []int32 `protobuf:"varint,1,rep,packed,name=condiIds,proto3" json:"condiIds"` +} + +func (x *WorldtaskCompletetaskPush) Reset() { + *x = WorldtaskCompletetaskPush{} + if protoimpl.UnsafeEnabled { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorldtaskCompletetaskPush) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldtaskCompletetaskPush) ProtoMessage() {} + +func (x *WorldtaskCompletetaskPush) ProtoReflect() protoreflect.Message { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[4] + 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 WorldtaskCompletetaskPush.ProtoReflect.Descriptor instead. +func (*WorldtaskCompletetaskPush) Descriptor() ([]byte, []int) { + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{4} +} + +func (x *WorldtaskCompletetaskPush) GetCondiIds() []int32 { + if x != nil { + return x.CondiIds + } + return nil +} + +//校验任务完成条件 +type WorldtaskCompleteCondiReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupId int32 `protobuf:"varint,1,opt,name=groupId,proto3" json:"groupId"` + TaskId int32 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId"` + CondiId int32 `protobuf:"varint,3,opt,name=condiId,proto3" json:"condiId"` +} + +func (x *WorldtaskCompleteCondiReq) Reset() { + *x = WorldtaskCompleteCondiReq{} + if protoimpl.UnsafeEnabled { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorldtaskCompleteCondiReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldtaskCompleteCondiReq) ProtoMessage() {} + +func (x *WorldtaskCompleteCondiReq) ProtoReflect() protoreflect.Message { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[5] + 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 WorldtaskCompleteCondiReq.ProtoReflect.Descriptor instead. +func (*WorldtaskCompleteCondiReq) Descriptor() ([]byte, []int) { + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{5} +} + +func (x *WorldtaskCompleteCondiReq) GetGroupId() int32 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *WorldtaskCompleteCondiReq) GetTaskId() int32 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *WorldtaskCompleteCondiReq) GetCondiId() int32 { + if x != nil { + return x.CondiId + } + return 0 +} + +type WorldtaskCompleteCondiResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupId int32 `protobuf:"varint,1,opt,name=groupId,proto3" json:"groupId"` + TaskId int32 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId"` + CondiId int32 `protobuf:"varint,3,opt,name=condiId,proto3" json:"condiId"` +} + +func (x *WorldtaskCompleteCondiResp) Reset() { + *x = WorldtaskCompleteCondiResp{} + if protoimpl.UnsafeEnabled { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorldtaskCompleteCondiResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldtaskCompleteCondiResp) ProtoMessage() {} + +func (x *WorldtaskCompleteCondiResp) ProtoReflect() protoreflect.Message { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[6] + 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 WorldtaskCompleteCondiResp.ProtoReflect.Descriptor instead. +func (*WorldtaskCompleteCondiResp) Descriptor() ([]byte, []int) { + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{6} +} + +func (x *WorldtaskCompleteCondiResp) GetGroupId() int32 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *WorldtaskCompleteCondiResp) GetTaskId() int32 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *WorldtaskCompleteCondiResp) GetCondiId() int32 { + if x != nil { + return x.CondiId + } + return 0 +} + // 完成任务 type WorldtaskFinishReq struct { state protoimpl.MessageState @@ -119,7 +405,7 @@ type WorldtaskFinishReq struct { func (x *WorldtaskFinishReq) Reset() { *x = WorldtaskFinishReq{} if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[2] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -132,7 +418,7 @@ func (x *WorldtaskFinishReq) String() string { func (*WorldtaskFinishReq) ProtoMessage() {} func (x *WorldtaskFinishReq) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[2] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -145,7 +431,7 @@ func (x *WorldtaskFinishReq) ProtoReflect() protoreflect.Message { // Deprecated: Use WorldtaskFinishReq.ProtoReflect.Descriptor instead. func (*WorldtaskFinishReq) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{2} + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{7} } func (x *WorldtaskFinishReq) GetGroupId() int32 { @@ -167,16 +453,14 @@ type WorldtaskFinishResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - GroupId int32 `protobuf:"varint,1,opt,name=groupId,proto3" json:"groupId"` - TaskId int32 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId"` - Newheros []string `protobuf:"bytes,3,rep,name=newheros,proto3" json:"newheros"` //获得的新英雄 - Olv int32 `protobuf:"varint,4,opt,name=olv,proto3" json:"olv"` //以前的等级 + GroupId int32 `protobuf:"varint,1,opt,name=groupId,proto3" json:"groupId"` + TaskId int32 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId"` } func (x *WorldtaskFinishResp) Reset() { *x = WorldtaskFinishResp{} if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[3] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -189,7 +473,7 @@ func (x *WorldtaskFinishResp) String() string { func (*WorldtaskFinishResp) ProtoMessage() {} func (x *WorldtaskFinishResp) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[3] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -202,7 +486,7 @@ func (x *WorldtaskFinishResp) ProtoReflect() protoreflect.Message { // Deprecated: Use WorldtaskFinishResp.ProtoReflect.Descriptor instead. func (*WorldtaskFinishResp) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{3} + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{8} } func (x *WorldtaskFinishResp) GetGroupId() int32 { @@ -219,20 +503,6 @@ func (x *WorldtaskFinishResp) GetTaskId() int32 { return 0 } -func (x *WorldtaskFinishResp) GetNewheros() []string { - if x != nil { - return x.Newheros - } - return nil -} - -func (x *WorldtaskFinishResp) GetOlv() int32 { - if x != nil { - return x.Olv - } - return 0 -} - //任务完成条件达成的推送 type WorldtaskNexttaskPush struct { state protoimpl.MessageState @@ -245,7 +515,7 @@ type WorldtaskNexttaskPush struct { func (x *WorldtaskNexttaskPush) Reset() { *x = WorldtaskNexttaskPush{} if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[4] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -258,7 +528,7 @@ func (x *WorldtaskNexttaskPush) String() string { func (*WorldtaskNexttaskPush) ProtoMessage() {} func (x *WorldtaskNexttaskPush) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[4] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -271,7 +541,7 @@ func (x *WorldtaskNexttaskPush) ProtoReflect() protoreflect.Message { // Deprecated: Use WorldtaskNexttaskPush.ProtoReflect.Descriptor instead. func (*WorldtaskNexttaskPush) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{4} + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{9} } func (x *WorldtaskNexttaskPush) GetNextTaskId() int32 { @@ -294,7 +564,7 @@ type WorldtaskBattleStartReq struct { func (x *WorldtaskBattleStartReq) Reset() { *x = WorldtaskBattleStartReq{} if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[5] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -307,7 +577,7 @@ func (x *WorldtaskBattleStartReq) String() string { func (*WorldtaskBattleStartReq) ProtoMessage() {} func (x *WorldtaskBattleStartReq) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[5] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -320,7 +590,7 @@ func (x *WorldtaskBattleStartReq) ProtoReflect() protoreflect.Message { // Deprecated: Use WorldtaskBattleStartReq.ProtoReflect.Descriptor instead. func (*WorldtaskBattleStartReq) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{5} + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{10} } func (x *WorldtaskBattleStartReq) GetBattleConfId() int32 { @@ -348,7 +618,7 @@ type WorldtaskBattleStartResp struct { func (x *WorldtaskBattleStartResp) Reset() { *x = WorldtaskBattleStartResp{} if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[6] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -361,7 +631,7 @@ func (x *WorldtaskBattleStartResp) String() string { func (*WorldtaskBattleStartResp) ProtoMessage() {} func (x *WorldtaskBattleStartResp) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[6] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -374,7 +644,7 @@ func (x *WorldtaskBattleStartResp) ProtoReflect() protoreflect.Message { // Deprecated: Use WorldtaskBattleStartResp.ProtoReflect.Descriptor instead. func (*WorldtaskBattleStartResp) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{6} + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{11} } func (x *WorldtaskBattleStartResp) GetInfo() *BattleInfo { @@ -398,7 +668,7 @@ type WorldtaskBattleFinishReq struct { func (x *WorldtaskBattleFinishReq) Reset() { *x = WorldtaskBattleFinishReq{} if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[7] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -411,7 +681,7 @@ func (x *WorldtaskBattleFinishReq) String() string { func (*WorldtaskBattleFinishReq) ProtoMessage() {} func (x *WorldtaskBattleFinishReq) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[7] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -424,7 +694,7 @@ func (x *WorldtaskBattleFinishReq) ProtoReflect() protoreflect.Message { // Deprecated: Use WorldtaskBattleFinishReq.ProtoReflect.Descriptor instead. func (*WorldtaskBattleFinishReq) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{7} + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{12} } func (x *WorldtaskBattleFinishReq) GetTaskId() int32 { @@ -453,15 +723,13 @@ type WorldtaskBattleFinishResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"` //任务ID - Newheros []string `protobuf:"bytes,2,rep,name=newheros,proto3" json:"newheros"` //获得的新英雄 - Olv int32 `protobuf:"varint,3,opt,name=olv,proto3" json:"olv"` //以前的等级 + TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"` //任务ID } func (x *WorldtaskBattleFinishResp) Reset() { *x = WorldtaskBattleFinishResp{} if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[8] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -474,7 +742,7 @@ func (x *WorldtaskBattleFinishResp) String() string { func (*WorldtaskBattleFinishResp) ProtoMessage() {} func (x *WorldtaskBattleFinishResp) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[8] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -487,7 +755,7 @@ func (x *WorldtaskBattleFinishResp) ProtoReflect() protoreflect.Message { // Deprecated: Use WorldtaskBattleFinishResp.ProtoReflect.Descriptor instead. func (*WorldtaskBattleFinishResp) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{8} + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{13} } func (x *WorldtaskBattleFinishResp) GetTaskId() int32 { @@ -497,20 +765,6 @@ func (x *WorldtaskBattleFinishResp) GetTaskId() int32 { return 0 } -func (x *WorldtaskBattleFinishResp) GetNewheros() []string { - if x != nil { - return x.Newheros - } - return nil -} - -func (x *WorldtaskBattleFinishResp) GetOlv() int32 { - if x != nil { - return x.Olv - } - return 0 -} - // 当前完成的任务列表推送 type WorldtaskFinishIdsPush struct { state protoimpl.MessageState @@ -523,7 +777,7 @@ type WorldtaskFinishIdsPush struct { func (x *WorldtaskFinishIdsPush) Reset() { *x = WorldtaskFinishIdsPush{} if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[9] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -536,7 +790,7 @@ func (x *WorldtaskFinishIdsPush) String() string { func (*WorldtaskFinishIdsPush) ProtoMessage() {} func (x *WorldtaskFinishIdsPush) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[9] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -549,7 +803,7 @@ func (x *WorldtaskFinishIdsPush) ProtoReflect() protoreflect.Message { // Deprecated: Use WorldtaskFinishIdsPush.ProtoReflect.Descriptor instead. func (*WorldtaskFinishIdsPush) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{9} + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{14} } func (x *WorldtaskFinishIdsPush) GetTaskList() []*Worldtask { @@ -559,109 +813,6 @@ func (x *WorldtaskFinishIdsPush) GetTaskList() []*Worldtask { return nil } -// 前置任务是否完成 -type WorldtaskPreReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupId int32 `protobuf:"varint,1,opt,name=groupId,proto3" json:"groupId"` //分组ID - TaskId int32 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId"` //任务ID -} - -func (x *WorldtaskPreReq) Reset() { - *x = WorldtaskPreReq{} - if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorldtaskPreReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorldtaskPreReq) ProtoMessage() {} - -func (x *WorldtaskPreReq) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_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 WorldtaskPreReq.ProtoReflect.Descriptor instead. -func (*WorldtaskPreReq) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{10} -} - -func (x *WorldtaskPreReq) GetGroupId() int32 { - if x != nil { - return x.GroupId - } - return 0 -} - -func (x *WorldtaskPreReq) GetTaskId() int32 { - if x != nil { - return x.TaskId - } - return 0 -} - -type WorldtaskPreResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IsSucc bool `protobuf:"varint,1,opt,name=isSucc,proto3" json:"isSucc"` // 前置是否完成 -} - -func (x *WorldtaskPreResp) Reset() { - *x = WorldtaskPreResp{} - if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorldtaskPreResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorldtaskPreResp) ProtoMessage() {} - -func (x *WorldtaskPreResp) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_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 WorldtaskPreResp.ProtoReflect.Descriptor instead. -func (*WorldtaskPreResp) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{11} -} - -func (x *WorldtaskPreResp) GetIsSucc() bool { - if x != nil { - return x.IsSucc - } - return false -} - var File_worldtask_worldtask_msg_proto protoreflect.FileDescriptor var file_worldtask_worldtask_msg_proto_rawDesc = []byte{ @@ -675,58 +826,71 @@ var file_worldtask_worldtask_msg_proto_rawDesc = []byte{ 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, - 0x6b, 0x22, 0x46, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, - 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x6b, 0x22, 0x46, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x75, 0x0a, 0x13, 0x57, 0x6f, 0x72, - 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x13, 0x57, 0x6f, 0x72, + 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, - 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x12, 0x10, - 0x0a, 0x03, 0x6f, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6f, 0x6c, 0x76, - 0x22, 0x37, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x65, 0x78, - 0x74, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x65, 0x78, - 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, - 0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x17, 0x57, 0x6f, 0x72, - 0x6c, 0x64, 0x74, 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, 0x3b, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, - 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, - 0x7d, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, - 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, - 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, - 0x6b, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x49, 0x64, 0x18, 0x02, 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, 0x03, 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, 0x61, - 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, - 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, - 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x12, - 0x10, 0x0a, 0x03, 0x6f, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6f, 0x6c, - 0x76, 0x22, 0x40, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, - 0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x08, 0x74, - 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, - 0x69, 0x73, 0x74, 0x22, 0x43, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, - 0x50, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, - 0x64, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, - 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, - 0x53, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x49, 0x64, 0x22, 0x37, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x12, + 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x05, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x22, 0x67, 0x0a, 0x19, 0x57, + 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x64, 0x69, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x49, 0x64, 0x22, 0x68, 0x0a, 0x1a, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, + 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, + 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x22, 0x46, + 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, + 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, + 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, + 0x37, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x65, 0x78, 0x74, + 0x74, 0x61, 0x73, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x65, + 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6c, + 0x64, 0x74, 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, 0x3b, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x7d, + 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, + 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, + 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x49, 0x64, 0x18, 0x02, 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, 0x03, 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, 0x33, 0x0a, + 0x19, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, + 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, + 0x49, 0x64, 0x22, 0x40, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x08, + 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -742,32 +906,35 @@ func file_worldtask_worldtask_msg_proto_rawDescGZIP() []byte { return file_worldtask_worldtask_msg_proto_rawDescData } -var file_worldtask_worldtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_worldtask_worldtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_worldtask_worldtask_msg_proto_goTypes = []interface{}{ - (*WorldtaskMineReq)(nil), // 0: WorldtaskMineReq - (*WorldtaskMineResp)(nil), // 1: WorldtaskMineResp - (*WorldtaskFinishReq)(nil), // 2: WorldtaskFinishReq - (*WorldtaskFinishResp)(nil), // 3: WorldtaskFinishResp - (*WorldtaskNexttaskPush)(nil), // 4: WorldtaskNexttaskPush - (*WorldtaskBattleStartReq)(nil), // 5: WorldtaskBattleStartReq - (*WorldtaskBattleStartResp)(nil), // 6: WorldtaskBattleStartResp - (*WorldtaskBattleFinishReq)(nil), // 7: WorldtaskBattleFinishReq - (*WorldtaskBattleFinishResp)(nil), // 8: WorldtaskBattleFinishResp - (*WorldtaskFinishIdsPush)(nil), // 9: WorldtaskFinishIdsPush - (*WorldtaskPreReq)(nil), // 10: WorldtaskPreReq - (*WorldtaskPreResp)(nil), // 11: WorldtaskPreResp - (*DBWorldtask)(nil), // 12: DBWorldtask - (*BattleFormation)(nil), // 13: BattleFormation - (*BattleInfo)(nil), // 14: BattleInfo - (*BattleReport)(nil), // 15: BattleReport - (*Worldtask)(nil), // 16: Worldtask + (*WorldtaskMineReq)(nil), // 0: WorldtaskMineReq + (*WorldtaskMineResp)(nil), // 1: WorldtaskMineResp + (*WorldtaskAcceptReq)(nil), // 2: WorldtaskAcceptReq + (*WorldtaskAcceptResp)(nil), // 3: WorldtaskAcceptResp + (*WorldtaskCompletetaskPush)(nil), // 4: WorldtaskCompletetaskPush + (*WorldtaskCompleteCondiReq)(nil), // 5: WorldtaskCompleteCondiReq + (*WorldtaskCompleteCondiResp)(nil), // 6: WorldtaskCompleteCondiResp + (*WorldtaskFinishReq)(nil), // 7: WorldtaskFinishReq + (*WorldtaskFinishResp)(nil), // 8: WorldtaskFinishResp + (*WorldtaskNexttaskPush)(nil), // 9: WorldtaskNexttaskPush + (*WorldtaskBattleStartReq)(nil), // 10: WorldtaskBattleStartReq + (*WorldtaskBattleStartResp)(nil), // 11: WorldtaskBattleStartResp + (*WorldtaskBattleFinishReq)(nil), // 12: WorldtaskBattleFinishReq + (*WorldtaskBattleFinishResp)(nil), // 13: WorldtaskBattleFinishResp + (*WorldtaskFinishIdsPush)(nil), // 14: WorldtaskFinishIdsPush + (*DBWorldtask)(nil), // 15: DBWorldtask + (*BattleFormation)(nil), // 16: BattleFormation + (*BattleInfo)(nil), // 17: BattleInfo + (*BattleReport)(nil), // 18: BattleReport + (*Worldtask)(nil), // 19: Worldtask } var file_worldtask_worldtask_msg_proto_depIdxs = []int32{ - 12, // 0: WorldtaskMineResp.task:type_name -> DBWorldtask - 13, // 1: WorldtaskBattleStartReq.battle:type_name -> BattleFormation - 14, // 2: WorldtaskBattleStartResp.info:type_name -> BattleInfo - 15, // 3: WorldtaskBattleFinishReq.report:type_name -> BattleReport - 16, // 4: WorldtaskFinishIdsPush.taskList:type_name -> Worldtask + 15, // 0: WorldtaskMineResp.task:type_name -> DBWorldtask + 16, // 1: WorldtaskBattleStartReq.battle:type_name -> BattleFormation + 17, // 2: WorldtaskBattleStartResp.info:type_name -> BattleInfo + 18, // 3: WorldtaskBattleFinishReq.report:type_name -> BattleReport + 19, // 4: WorldtaskFinishIdsPush.taskList:type_name -> Worldtask 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 @@ -808,7 +975,7 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskFinishReq); i { + switch v := v.(*WorldtaskAcceptReq); i { case 0: return &v.state case 1: @@ -820,7 +987,7 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskFinishResp); i { + switch v := v.(*WorldtaskAcceptResp); i { case 0: return &v.state case 1: @@ -832,7 +999,7 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskNexttaskPush); i { + switch v := v.(*WorldtaskCompletetaskPush); i { case 0: return &v.state case 1: @@ -844,7 +1011,7 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskBattleStartReq); i { + switch v := v.(*WorldtaskCompleteCondiReq); i { case 0: return &v.state case 1: @@ -856,7 +1023,7 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskBattleStartResp); i { + switch v := v.(*WorldtaskCompleteCondiResp); i { case 0: return &v.state case 1: @@ -868,7 +1035,7 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskBattleFinishReq); i { + switch v := v.(*WorldtaskFinishReq); i { case 0: return &v.state case 1: @@ -880,7 +1047,7 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskBattleFinishResp); i { + switch v := v.(*WorldtaskFinishResp); i { case 0: return &v.state case 1: @@ -892,7 +1059,7 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskFinishIdsPush); i { + switch v := v.(*WorldtaskNexttaskPush); i { case 0: return &v.state case 1: @@ -904,7 +1071,7 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskPreReq); i { + switch v := v.(*WorldtaskBattleStartReq); i { case 0: return &v.state case 1: @@ -916,7 +1083,43 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskPreResp); i { + switch v := v.(*WorldtaskBattleStartResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worldtask_worldtask_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorldtaskBattleFinishReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worldtask_worldtask_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorldtaskBattleFinishResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worldtask_worldtask_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorldtaskFinishIdsPush); i { case 0: return &v.state case 1: @@ -934,7 +1137,7 @@ func file_worldtask_worldtask_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_worldtask_worldtask_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 15, NumExtensions: 0, NumServices: 0, }, diff --git a/sys/configure/structs/Game.WorldTaskData.go b/sys/configure/structs/Game.WorldTaskData.go index 92f0daca6..7c1c9ba28 100644 --- a/sys/configure/structs/Game.WorldTaskData.go +++ b/sys/configure/structs/Game.WorldTaskData.go @@ -21,12 +21,10 @@ type GameWorldTaskData struct { TaskTname string TaskName string TaskDisplay string - Npc []string - GetafterEvent []int32 - Receivenpc []string - Completetask int32 + Npc int32 + Completetask []int32 + DeliverNpc int32 AutoAccept int32 - Overtips int32 Reword []*Gameatn Module []string } @@ -48,51 +46,23 @@ func (_v *GameWorldTaskData)Deserialize(_buf map[string]interface{}) (err error) {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_Tname"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskTname error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskTname, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_display"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskDisplay error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskDisplay, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["npc"].(float64); !_ok_ { err = errors.New("npc error"); return }; _v.Npc = int32(_tempNum_) } { var _arr_ []interface{} var _ok_ bool - if _arr_, _ok_ = _buf["npc"].([]interface{}); !_ok_ { err = errors.New("npc error"); return } + if _arr_, _ok_ = _buf["completetask"].([]interface{}); !_ok_ { err = errors.New("completetask error"); return } - _v.Npc = make([]string, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ string - { if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } } - _v.Npc = append(_v.Npc, _list_v_) - } - } - - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["getafter_event"].([]interface{}); !_ok_ { err = errors.New("getafter_event error"); return } - - _v.GetafterEvent = make([]int32, 0, len(_arr_)) + _v.Completetask = make([]int32, 0, len(_arr_)) for _, _e_ := range _arr_ { var _list_v_ int32 { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } - _v.GetafterEvent = append(_v.GetafterEvent, _list_v_) + _v.Completetask = append(_v.Completetask, _list_v_) } } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["receivenpc"].([]interface{}); !_ok_ { err = errors.New("receivenpc error"); return } - - _v.Receivenpc = make([]string, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ string - { if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } } - _v.Receivenpc = append(_v.Receivenpc, _list_v_) - } - } - - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["completetask"].(float64); !_ok_ { err = errors.New("completetask error"); return }; _v.Completetask = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["deliver_npc"].(float64); !_ok_ { err = errors.New("deliver_npc error"); return }; _v.DeliverNpc = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["auto_accept"].(float64); !_ok_ { err = errors.New("auto_accept error"); return }; _v.AutoAccept = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["overtips"].(float64); !_ok_ { err = errors.New("overtips error"); return }; _v.Overtips = int32(_tempNum_) } { var _arr_ []interface{} var _ok_ bool