From 49c99c2843676b4ac1d163f06c8bcdc8100d5534 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 20 Apr 2023 17:12:35 +0800 Subject: [PATCH 1/4] update --- comm/imodule.go | 2 +- modules/gm/module.go | 15 +-- modules/worldtask/api_completetask.go | 6 ++ modules/worldtask/module.go | 129 ++++++++++++-------------- 4 files changed, 68 insertions(+), 84 deletions(-) diff --git a/comm/imodule.go b/comm/imodule.go index b054a7607..fcc0270c0 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -379,7 +379,7 @@ type ( // TaskcondNotify(session IUserSession, condId int32) error TaskCondFinishNotify(session IUserSession, condId int32) error // bingo所有任务 - BingoAllTask(session IUserSession) error + // BingoAllTask(session IUserSession) error // bingo任务 BingoJumpTask(session IUserSession, groupId, rtaskId int32) error // 查询我的世界任务 diff --git a/modules/gm/module.go b/modules/gm/module.go index 0430ae0a0..9db98e660 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -285,20 +285,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "0", Value: datas[1]}, ) - } else if len(datas) == 1 && (datas[0] == "alltask") { // 完成所有世界任务 - module, err := this.service.GetModule(comm.ModuleWorldtask) - if err != nil { - return - } - if wt, ok := module.(comm.IWorldtask); ok { - if err = wt.BingoAllTask(session); err != nil { - this.Error("bingo 世界任务", - log.Field{Key: "param", Value: datas}, - log.Field{Key: "err", Value: err.Error()}) - } - } - - } else if len(datas) == 1 && (datas[0] == "allgrowtask") { // 完成所有成长任务 + } else if len(datas) == 1 && (datas[0] == "allgrowtask") { // 完成所有成长任务 module, err := this.service.GetModule(comm.ModuleGrowtask) if err != nil { return diff --git a/modules/worldtask/api_completetask.go b/modules/worldtask/api_completetask.go index b4ab3fdff..dd339c9b0 100644 --- a/modules/worldtask/api_completetask.go +++ b/modules/worldtask/api_completetask.go @@ -41,6 +41,7 @@ func (this *apiComp) CompleteCondi(session comm.IUserSession, req *pb.WorldtaskC return } + myWorldtask.Uid = uid wt := myWorldtask.CurrentTask[req.GroupId] if m, err := this.module.service.GetModule(comm.ModuleRtask); err == nil { iwt, ok := m.(comm.IRtask) @@ -77,5 +78,10 @@ func (this *apiComp) CompleteCondi(session comm.IUserSession, req *pb.WorldtaskC session.SendMsg(string(this.module.GetType()), "completecondi", rsp) + //结束任务 + if curTaskConf.DeliverNpc == 0 { + this.module.modelWorldtask.taskFinish(session, req.GroupId, req.TaskId, myWorldtask, curTaskConf) + this.module.modelWorldtask.taskFinishPush(session, req.GroupId, myWorldtask, curTaskConf) + } return } diff --git a/modules/worldtask/module.go b/modules/worldtask/module.go index f88021989..c03c7b002 100644 --- a/modules/worldtask/module.go +++ b/modules/worldtask/module.go @@ -72,7 +72,7 @@ func (this *Worldtask) TaskCondFinishNotify(session comm.IUserSession, condId in if v == condId { //校验任务是否是当前任务 if task, ok := userTask.CurrentTask[c.Group]; ok { - if task.NpcStatus == 1 && c.Key == task.TaskId{ + if task.NpcStatus == 1 && c.Key == task.TaskId { finishedTaskIds[c.Group] = c.Key groupId = c.Group taskId = c.Key @@ -141,81 +141,72 @@ func (this *Worldtask) GetMyWorldtask(uid string) *pb.DBWorldtask { return wt } -func (this *Worldtask) BingoAllTask(session comm.IUserSession) error { - // uid := session.GetUserId() - // mytask := &pb.DBWorldtask{Uid: uid} - - // tasklist := this.worldtaskConf.GetDataList() - - // for _, conf := range tasklist { - // //世界任务配置 - // wt := &pb.Worldtask{ - // TaskId: conf.Key, - // TaskType: conf.Des, - // } - // mytask.TaskList = append(mytask.TaskList, wt) - // } - - // if err := this.modelWorldtask.Add(uid, mytask); err != nil { - // return err - // } - - // rsp := &pb.WorldtaskFinishIdsPush{ - // TaskList: mytask.TaskList, - // } - - return nil //session.SendMsg(string(this.GetType()), "finishids", rsp) -} - // bingo世界任务跳跃 支持回退 func (this *Worldtask) BingoJumpTask(session comm.IUserSession, groupId, taskId int32) error { - // uid := session.GetUserId() - // mytask, err := this.modelWorldtask.getWorldtask(uid) - // if err != nil { - // return err - // } - // mytask.Uid = uid - // // 更新数据 - // update := map[string]interface{}{} + uid := session.GetUserId() + // 更新数据 + update := make(map[string]interface{}) - // taskConf := this.worldtaskConf.GetDataMap()[taskId] - // if taskConf == nil { - // return fmt.Errorf("taskId: %v config is nil", taskId) - // } + mytask, err := this.modelWorldtask.getWorldtask(uid) + if err != nil { + return err + } - // //重置taskList - // mytask.TaskList = []*pb.Worldtask{} + if mytask == nil { + mytask = &pb.DBWorldtask{} + mytask.Uid = uid + if err := this.modelWorldtask.Add(uid, mytask); err != nil { + this.Error("添加世界任务失败", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err}) + return err + } + } - // //遍历 - // if taskConf.Ontxe != 0 && taskConf.IdAfter != 0 { - // for _, v := range this.worldtaskConf.GetDataList() { - // if v.Group == groupId && v.Key <= taskId { - // wt := &pb.Worldtask{ - // TaskId: v.Key, - // TaskType: v.Des, - // } - // mytask.TaskList = append(mytask.TaskList, wt) - // } + if _, ok := utils.Findx(mytask.TaskList, taskId); ok { + this.Error("GM 任务已完成", log.Field{Key: "taskId", Value: taskId}) + return comm.NewCustomError(pb.ErrorCode_WorldtaskFinihed) + } - // } - // } else { - // wt := &pb.Worldtask{ - // TaskId: taskId, - // TaskType: taskConf.Des, - // } - // mytask.TaskList = append(mytask.TaskList, wt) - // } - // update = map[string]interface{}{ - // "taskList": mytask.TaskList, - // } + taskConf := this.worldtaskConf.GetDataMap()[taskId] + if taskConf == nil { + return comm.NewCustomError(pb.ErrorCode_ConfigNoFound) + } - // if err := this.modelWorldtask.Change(uid, update); err != nil { - // return err - // } + //重置taskList + mytask.TaskList = []int32{} - // rsp := &pb.WorldtaskFinishIdsPush{ - // TaskList: mytask.TaskList, - // } + //遍历 + if taskConf.Ontxe != 0 && taskConf.IdAfter != 0 { + for _, v := range this.worldtaskConf.GetDataList() { + if v.Group == groupId && v.Key <= taskId && v.Des == 2 { //只做主线的des=2 + mytask.TaskList = append(mytask.TaskList, v.Key) + } + } + } else { + mytask.TaskList = append(mytask.TaskList, taskId) + } - return nil //session.SendMsg(string(this.GetType()), "finishids", rsp) + update = map[string]interface{}{ + "taskList": mytask.TaskList, + } + + //当前任务 + nextTaskIds := this.modelWorldtask.findNextTasks(taskId) + + if mytask.CurrentTask == nil { + mytask.CurrentTask = make(map[int32]*pb.Worldtask) + } + + if len(nextTaskIds) == 1 { + mytask.CurrentTask[groupId] = &pb.Worldtask{ + TaskId: nextTaskIds[0], + } + } + + if err := this.modelWorldtask.Change(uid, update); err != nil { + return err + } + + rsp := &pb.WorldtaskFinishIdsPush{} + + return session.SendMsg(string(this.GetType()), "finishids", rsp) } From 631c9245144fddf1dedd28e230f4b3a59f0bc17c Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 20 Apr 2023 18:24:10 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=B8=96=E7=95=8C=E4=BB=BB=E5=8A=A1GM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/v2/ui/views/reputation.go | 18 ++++- modules/worldtask/module.go | 5 +- pb/reputation_msg.pb.go | 134 ++++++++++++++++++++++++++++++---- 3 files changed, 138 insertions(+), 19 deletions(-) diff --git a/cmd/v2/ui/views/reputation.go b/cmd/v2/ui/views/reputation.go index 704eece40..ca3d13f44 100644 --- a/cmd/v2/ui/views/reputation.go +++ b/cmd/v2/ui/views/reputation.go @@ -37,7 +37,17 @@ func (d *ReputationView) CreateView(t *model.TestCase) fyne.CanvasObject { ) form.OnSubmit = func() { - + if err := service.GetPttService().SendToClient( + t.MainType, + "talenttest", + &pb.ReputationTalenttestReq{ + RaceType: cast.ToInt32(zy), + FriendValue: cast.ToInt32(fv), + }, + ); err != nil { + logrus.Error(err) + return + } } paiWin := dialog.NewCustom("升级", "关闭", form, d.w) @@ -69,7 +79,11 @@ func (d *ReputationView) CreateView(t *model.TestCase) fyne.CanvasObject { paiWin.Show() }) - topBtns := container.NewHBox(swBtn, upgradeBtn) + resetBtn := widget.NewButton("重置", func() { + + }) + + topBtns := container.NewHBox(swBtn, upgradeBtn, resetBtn) c := container.NewBorder(topBtns, nil, nil, nil, d.itemList.ItemList) return c } diff --git a/modules/worldtask/module.go b/modules/worldtask/module.go index c03c7b002..8d4af8e66 100644 --- a/modules/worldtask/module.go +++ b/modules/worldtask/module.go @@ -144,8 +144,6 @@ func (this *Worldtask) GetMyWorldtask(uid string) *pb.DBWorldtask { // bingo世界任务跳跃 支持回退 func (this *Worldtask) BingoJumpTask(session comm.IUserSession, groupId, taskId int32) error { uid := session.GetUserId() - // 更新数据 - update := make(map[string]interface{}) mytask, err := this.modelWorldtask.getWorldtask(uid) if err != nil { @@ -185,7 +183,7 @@ func (this *Worldtask) BingoJumpTask(session comm.IUserSession, groupId, taskId mytask.TaskList = append(mytask.TaskList, taskId) } - update = map[string]interface{}{ + update := map[string]interface{}{ "taskList": mytask.TaskList, } @@ -200,6 +198,7 @@ func (this *Worldtask) BingoJumpTask(session comm.IUserSession, groupId, taskId mytask.CurrentTask[groupId] = &pb.Worldtask{ TaskId: nextTaskIds[0], } + update["currentTask"] = mytask.CurrentTask } if err := this.modelWorldtask.Change(uid, update); err != nil { diff --git a/pb/reputation_msg.pb.go b/pb/reputation_msg.pb.go index 5bb87a135..39fd18db4 100644 --- a/pb/reputation_msg.pb.go +++ b/pb/reputation_msg.pb.go @@ -294,6 +294,83 @@ func (x *ReputationTalentResp) GetCamp() *Camp { return nil } +// 天赋树重置 +type ReputationTalentresetReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReputationTalentresetReq) Reset() { + *x = ReputationTalentresetReq{} + if protoimpl.UnsafeEnabled { + mi := &file_reputation_reputation_msg_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReputationTalentresetReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReputationTalentresetReq) ProtoMessage() {} + +func (x *ReputationTalentresetReq) ProtoReflect() protoreflect.Message { + mi := &file_reputation_reputation_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 ReputationTalentresetReq.ProtoReflect.Descriptor instead. +func (*ReputationTalentresetReq) Descriptor() ([]byte, []int) { + return file_reputation_reputation_msg_proto_rawDescGZIP(), []int{6} +} + +type ReputationTalentresetResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReputationTalentresetResp) Reset() { + *x = ReputationTalentresetResp{} + if protoimpl.UnsafeEnabled { + mi := &file_reputation_reputation_msg_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReputationTalentresetResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReputationTalentresetResp) ProtoMessage() {} + +func (x *ReputationTalentresetResp) ProtoReflect() protoreflect.Message { + mi := &file_reputation_reputation_msg_proto_msgTypes[7] + 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 ReputationTalentresetResp.ProtoReflect.Descriptor instead. +func (*ReputationTalentresetResp) Descriptor() ([]byte, []int) { + return file_reputation_reputation_msg_proto_rawDescGZIP(), []int{7} +} + var File_reputation_reputation_msg_proto protoreflect.FileDescriptor var file_reputation_reputation_msg_proto_rawDesc = []byte{ @@ -320,8 +397,11 @@ var file_reputation_reputation_msg_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x43, 0x61, 0x6d, 0x70, 0x41, 0x74, 0x74, 0x72, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x12, 0x19, 0x0a, 0x04, 0x63, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x43, 0x61, 0x6d, 0x70, 0x52, 0x04, - 0x63, 0x61, 0x6d, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x61, 0x6d, 0x70, 0x22, 0x1a, 0x0a, 0x18, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x22, 0x1b, 0x0a, 0x19, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, + 0x6c, 0x65, 0x6e, 0x74, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -336,20 +416,22 @@ func file_reputation_reputation_msg_proto_rawDescGZIP() []byte { return file_reputation_reputation_msg_proto_rawDescData } -var file_reputation_reputation_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_reputation_reputation_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_reputation_reputation_msg_proto_goTypes = []interface{}{ - (*ReputationTalenttestReq)(nil), // 0: reputationTalenttestReq - (*ReputationTalenttestResp)(nil), // 1: reputationTalenttestResp - (*ReputationUpgradeReq)(nil), // 2: reputationUpgradeReq - (*ReputationUpgradeResp)(nil), // 3: reputationUpgradeResp - (*ReputationTalentReq)(nil), // 4: reputationTalentReq - (*ReputationTalentResp)(nil), // 5: reputationTalentResp - (*CampAttr)(nil), // 6: CampAttr - (*Camp)(nil), // 7: Camp + (*ReputationTalenttestReq)(nil), // 0: reputationTalenttestReq + (*ReputationTalenttestResp)(nil), // 1: reputationTalenttestResp + (*ReputationUpgradeReq)(nil), // 2: reputationUpgradeReq + (*ReputationUpgradeResp)(nil), // 3: reputationUpgradeResp + (*ReputationTalentReq)(nil), // 4: reputationTalentReq + (*ReputationTalentResp)(nil), // 5: reputationTalentResp + (*ReputationTalentresetReq)(nil), // 6: reputationTalentresetReq + (*ReputationTalentresetResp)(nil), // 7: reputationTalentresetResp + (*CampAttr)(nil), // 8: CampAttr + (*Camp)(nil), // 9: Camp } var file_reputation_reputation_msg_proto_depIdxs = []int32{ - 6, // 0: reputationTalentResp.attrGlobal:type_name -> CampAttr - 7, // 1: reputationTalentResp.camp:type_name -> Camp + 8, // 0: reputationTalentResp.attrGlobal:type_name -> CampAttr + 9, // 1: reputationTalentResp.camp:type_name -> Camp 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -436,6 +518,30 @@ func file_reputation_reputation_msg_proto_init() { return nil } } + file_reputation_reputation_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReputationTalentresetReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_reputation_reputation_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReputationTalentresetResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -443,7 +549,7 @@ func file_reputation_reputation_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_reputation_reputation_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, From 52e08a5c7aa80d9c76fea1511827611de881cb9a Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 20 Apr 2023 18:42:24 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=A4=A9=E8=B5=8B=E6=A0=91=E9=87=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/reputation/api_reset.go | 40 +++++++++++++++++++++++++++++++++ pb/reputation_msg.pb.go | 21 ++++++++++++----- 2 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 modules/reputation/api_reset.go diff --git a/modules/reputation/api_reset.go b/modules/reputation/api_reset.go new file mode 100644 index 000000000..695ae2ba8 --- /dev/null +++ b/modules/reputation/api_reset.go @@ -0,0 +1,40 @@ +package reputation + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +func (this *apiComp) ResetCheck(session comm.IUserSession, req *pb.ReputationTalentresetReq) (code pb.ErrorCode) { + if req.RaceType < 1 && req.RaceType > 4 { + code = pb.ErrorCode_ReqParameterError + } + return +} + +func (this *apiComp) Reset(session comm.IUserSession, req *pb.ReputationTalentresetReq) (code pb.ErrorCode, data *pb.ErrorData) { + uid := session.GetUserId() + reputation := this.module.modelReputation.getDBReputation(uid) + if reputation == nil { + code = pb.ErrorCode_DataNotFound + return + } + + if v, ok := reputation.Camps[req.RaceType]; ok { + v.Nodes = []*pb.TalentNode{} + } + + update := map[string]interface{}{ + "camps": reputation.Camps, + } + + if err := this.module.modelReputation.Change(uid, update); err != nil { + code = pb.ErrorCode_DBError + return + } + + rsp := &pb.ReputationTalentresetResp{} + + session.SendMsg(string(this.module.GetType()), "reset", rsp) + return +} diff --git a/pb/reputation_msg.pb.go b/pb/reputation_msg.pb.go index 39fd18db4..91ecf57e0 100644 --- a/pb/reputation_msg.pb.go +++ b/pb/reputation_msg.pb.go @@ -294,11 +294,13 @@ func (x *ReputationTalentResp) GetCamp() *Camp { return nil } -// 天赋树重置 +// 阵营天赋树重置 type ReputationTalentresetReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + RaceType int32 `protobuf:"varint,1,opt,name=raceType,proto3" json:"raceType"` } func (x *ReputationTalentresetReq) Reset() { @@ -333,6 +335,13 @@ func (*ReputationTalentresetReq) Descriptor() ([]byte, []int) { return file_reputation_reputation_msg_proto_rawDescGZIP(), []int{6} } +func (x *ReputationTalentresetReq) GetRaceType() int32 { + if x != nil { + return x.RaceType + } + return 0 +} + type ReputationTalentresetResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -397,11 +406,13 @@ var file_reputation_reputation_msg_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x43, 0x61, 0x6d, 0x70, 0x41, 0x74, 0x74, 0x72, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x12, 0x19, 0x0a, 0x04, 0x63, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x43, 0x61, 0x6d, 0x70, 0x52, 0x04, - 0x63, 0x61, 0x6d, 0x70, 0x22, 0x1a, 0x0a, 0x18, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x61, 0x6d, 0x70, 0x22, 0x36, 0x0a, 0x18, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x22, 0x1b, 0x0a, 0x19, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, - 0x6c, 0x65, 0x6e, 0x74, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x72, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x1b, 0x0a, 0x19, + 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, + 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From 4ec983d257d314037de47c6b22db51a6b5f58094 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 20 Apr 2023 19:06:48 +0800 Subject: [PATCH 4/4] update --- modules/worldtask/module.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/worldtask/module.go b/modules/worldtask/module.go index 8d4af8e66..811293ce2 100644 --- a/modules/worldtask/module.go +++ b/modules/worldtask/module.go @@ -196,7 +196,8 @@ func (this *Worldtask) BingoJumpTask(session comm.IUserSession, groupId, taskId if len(nextTaskIds) == 1 { mytask.CurrentTask[groupId] = &pb.Worldtask{ - TaskId: nextTaskIds[0], + TaskId: nextTaskIds[0], + TaskType: 2, //设置主线类型 } update["currentTask"] = mytask.CurrentTask }