diff --git a/modules/buried/module.go b/modules/buried/module.go index 6440fddd0..8371d5fd5 100644 --- a/modules/buried/module.go +++ b/modules/buried/module.go @@ -155,19 +155,17 @@ func (this *Buried) CheckCondition(uid string, condiIds ...int32) (condis []*pb. if v1.Conid == v { ok = true //状态等于休眠 - if v1.State == pb.BuriedItemState_Sleep { - if conf.Ctype == ctype_daily { //日常 - if !utils.IsToday(v1.Timestamp) { //不是同一天 可以重置数据 - v1.State = pb.BuriedItemState_Activated - v1.Value = 0 - v1.Finish = pb.BuriedItemFinishState_buried_unfinish - } - } else if conf.Ctype == ctype_weekly { //周常 - if !utils.IsSameWeek(v1.Timestamp) { //不是同一周 - v1.State = pb.BuriedItemState_Activated - v1.Value = 0 - v1.Finish = pb.BuriedItemFinishState_buried_unfinish - } + if conf.Ctype == ctype_daily { //日常 + if !utils.IsToday(v1.Timestamp) { //不是同一天 可以重置数据 + v1.State = pb.BuriedItemState_Activated + v1.Value = 0 + v1.Finish = pb.BuriedItemFinishState_buried_unfinish + } + } else if conf.Ctype == ctype_weekly { //周常 + if !utils.IsSameWeek(v1.Timestamp) { //不是同一周 + v1.State = pb.BuriedItemState_Activated + v1.Value = 0 + v1.Finish = pb.BuriedItemFinishState_buried_unfinish } } condis = append(condis, &pb.ConIProgress{ @@ -282,19 +280,17 @@ func (this *Buried) FinishConditionAndCheck(uid string, finishcondiIds []int32, if v1.Conid == v { ok = true //状态等于休眠 - if v1.State == pb.BuriedItemState_Sleep { - if conf.Ctype == ctype_daily { //日常 - if !utils.IsToday(v1.Timestamp) { //不是同一天 可以重置数据 - v1.State = pb.BuriedItemState_Activated - v1.Value = 0 - v1.Finish = pb.BuriedItemFinishState_buried_unfinish - } - } else if conf.Ctype == ctype_weekly { //周常 - if !utils.IsSameWeek(v1.Timestamp) { //不是同一周 - v1.State = pb.BuriedItemState_Activated - v1.Value = 0 - v1.Finish = pb.BuriedItemFinishState_buried_unfinish - } + if conf.Ctype == ctype_daily { //日常 + if !utils.IsToday(v1.Timestamp) { //不是同一天 可以重置数据 + v1.State = pb.BuriedItemState_Activated + v1.Value = 0 + v1.Finish = pb.BuriedItemFinishState_buried_unfinish + } + } else if conf.Ctype == ctype_weekly { //周常 + if !utils.IsSameWeek(v1.Timestamp) { //不是同一周 + v1.State = pb.BuriedItemState_Activated + v1.Value = 0 + v1.Finish = pb.BuriedItemFinishState_buried_unfinish } } condis = append(condis, &pb.ConIProgress{ @@ -523,24 +519,23 @@ func (this *Buried) updateAndCheckBuried(bconf *cfg.GameBuriedTypeData, bdata *p return } - //状态等于休眠 - if bitem.State == pb.BuriedItemState_Sleep { - if cond.Ctype == ctype_repeat { //完成后自动锁定 + if bitem.State == pb.BuriedItemState_Sleep && cond.Ctype == ctype_repeat { //完成后自动锁定 + bitem.State = pb.BuriedItemState_Activated + bitem.Value = 0 + bitem.Finish = pb.BuriedItemFinishState_buried_unfinish + } + + if cond.Ctype == ctype_daily { //日常 + if !utils.IsToday(bitem.Timestamp) { //不是同一天 可以重置数据 + bitem.State = pb.BuriedItemState_Activated + bitem.Value = 0 + bitem.Finish = pb.BuriedItemFinishState_buried_unfinish + } + } else if cond.Ctype == ctype_weekly { //周常 + if !utils.IsSameWeek(bitem.Timestamp) { //不是同一周 bitem.State = pb.BuriedItemState_Activated bitem.Value = 0 bitem.Finish = pb.BuriedItemFinishState_buried_unfinish - } else if cond.Ctype == ctype_daily { //日常 - if !utils.IsToday(bitem.Timestamp) { //不是同一天 可以重置数据 - bitem.State = pb.BuriedItemState_Activated - bitem.Value = 0 - bitem.Finish = pb.BuriedItemFinishState_buried_unfinish - } - } else if cond.Ctype == ctype_weekly { //周常 - if !utils.IsSameWeek(bitem.Timestamp) { //不是同一周 - bitem.State = pb.BuriedItemState_Activated - bitem.Value = 0 - bitem.Finish = pb.BuriedItemFinishState_buried_unfinish - } } } @@ -575,8 +570,8 @@ func (this *Buried) updateAndCheckBuried(bconf *cfg.GameBuriedTypeData, bdata *p this.Error("未知的埋点数据处理类型!", log.Field{Key: "Insert", Value: bconf.Insert}) return } - - if bitem.Value >= cond.Value { //完成进度 + bitem.Timestamp = configure.Now().Unix() //记录最后一次操作时间 + if bitem.Value >= cond.Value { //完成进度 bitem.Finish = pb.BuriedItemFinishState_buried_finish if cond.Ctype == ctype_once { //完成后自动锁定 bitem.State = pb.BuriedItemState_Freeze @@ -587,7 +582,6 @@ func (this *Buried) updateAndCheckBuried(bconf *cfg.GameBuriedTypeData, bdata *p } else if cond.Ctype == ctype_weekly { bitem.State = pb.BuriedItemState_Sleep } - bitem.Timestamp = configure.Now().Unix() //记录最后一次操作时间 } else { this.Debug("完成条件未达成!", log.Field{Key: "埋点Id", Value: bdata.Btype}, log.Field{Key: "条件Id", Value: bitem.Conid}, log.Field{Key: "当前进度", Value: bitem.Value}, log.Field{Key: "目标进度", Value: cond.Value}) } diff --git a/modules/equipment/api_equip.go b/modules/equipment/api_equip.go index 57a2a8247..3fa7fb5a6 100644 --- a/modules/equipment/api_equip.go +++ b/modules/equipment/api_equip.go @@ -181,6 +181,8 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) return } hero.EquipID[i] = v.Id + } else { + hero.EquipID[i] = "" } } //重置套装数据 diff --git a/modules/equipment/api_upgrade.go b/modules/equipment/api_upgrade.go index dfdf31153..3caef6ba1 100644 --- a/modules/equipment/api_upgrade.go +++ b/modules/equipment/api_upgrade.go @@ -65,11 +65,13 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade } //找到下一个等级的相关配置 if intensify, err = this.module.configure.GetEquipmentIntensifyConfigureById(conf.EquipId, conf.InitLv, equipment.Lv); err != nil || intensify.Need == nil || len(intensify.Need) == 0 { - this.module.Errorf("Equip_Check err:%v", err) errdata = &pb.ErrorData{ Code: pb.ErrorCode_EquipmentLvlimitReached, Title: pb.ErrorCode_EquipmentLvlimitReached.ToString(), - Message: err.Error(), + Message: fmt.Sprintf("Lv:%d", equipment.Lv), + } + if err != nil { + this.module.Errorf("Equip_Check err:%v", err) } return } @@ -218,6 +220,13 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade } else { equipments[i] = equipment confs[i] = conf + if suitconfs[i], err = this.module.configure.getEquipSuit(confs[i].Suittype); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + } } suit = nil for _, suit = range suits { diff --git a/modules/equipment/modelEquipment.go b/modules/equipment/modelEquipment.go index c63ae0003..3f2fbd0d9 100644 --- a/modules/equipment/modelEquipment.go +++ b/modules/equipment/modelEquipment.go @@ -419,27 +419,27 @@ func (this *modelEquipmentComp) upgradeEquipment(equipment *pb.DB_Equipment, equ return } } + return } - return - } - if equip.EquipId == 1 { - if len(equipment.AdverbEntry) <= 0 { - return + if equip.EquipId == 1 { + if len(equipment.AdverbEntry) <= 0 { + return + } + var attrlibrary *cfg.GameEquipAttrlibrarySData + index := comm.RandShuffle(len(equipment.AdverbEntry))[0] + if attrlibrary, err = this.module.configure.GetEquipmentAttrlibraryConfigureByKey(equipment.AdverbEntry[index].Id); err != nil { + return + } + value := equipment.AdverbEntry[index].BaseValue + int32(float64(attrlibrary.Addition[equipment.AdverbEntry[index].Lv-1])/1000.0*float64(equipment.AdverbEntry[index].BaseValue)) + if equipment.AdverbEntry[index].Value < value { + equipment.AdverbEntry[index].Value = value + } + equipment.AdverbEntry[index].Lv++ + } else { + index := comm.RandShuffle(len(equipment.Adverbskill))[0] + equipment.Adverbskill[index].Lv++ } - var attrlibrary *cfg.GameEquipAttrlibrarySData - index := comm.RandShuffle(len(equipment.AdverbEntry))[0] - if attrlibrary, err = this.module.configure.GetEquipmentAttrlibraryConfigureByKey(equipment.AdverbEntry[index].Id); err != nil { - return - } - value := equipment.AdverbEntry[index].BaseValue + int32(float64(attrlibrary.Addition[equipment.AdverbEntry[index].Lv-1])/1000.0*float64(equipment.AdverbEntry[index].BaseValue)) - if equipment.AdverbEntry[index].Value < value { - equipment.AdverbEntry[index].Value = value - } - equipment.AdverbEntry[index].Lv++ - } else { - index := comm.RandShuffle(len(equipment.Adverbskill))[0] - equipment.Adverbskill[index].Lv++ } return } diff --git a/modules/smithy/api_tasklist.go b/modules/smithy/api_tasklist.go index 7be61f1bc..6977d1907 100644 --- a/modules/smithy/api_tasklist.go +++ b/modules/smithy/api_tasklist.go @@ -20,7 +20,9 @@ func (a *apiComp) Tasklist(session comm.IUserSession, req *pb.SmithyTasklistReq) dt, err := a.module.modelTask.getTaskRecord(session.GetUserId()) if err != nil { if err == mongo.ErrNoDocuments { + //遍历配置列表 resp.Tasks = []*pb.TujianTask{} + } else { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, @@ -30,31 +32,8 @@ func (a *apiComp) Tasklist(session comm.IUserSession, req *pb.SmithyTasklistReq) return } } else { - for _, t := range dt.Tasks { - conf, err := a.module.configure.GetSmithyTask(t.TaskId) - if err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ConfigNoFound, - Title: pb.ErrorCode_ConfigNoFound.ToString(), - Message: err.Error(), - } - return - } - - conds, err := a.module.ModuleBuried.CheckCondition(session.GetUserId(), conf.TypeId) - if err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ExternalModule, - Title: pb.ErrorCode_ExternalModule.ToString(), - Message: err.Error(), - } - return - } - if len(conds) > 0 { - t.Cond = conds[0] - } - } resp.Tasks = dt.Tasks + } session.SendMsg(string(a.module.GetType()), "tasklist", resp) diff --git a/modules/smithy/comp_configure.go b/modules/smithy/comp_configure.go index 35d4c1d81..f64a5f66c 100644 --- a/modules/smithy/comp_configure.go +++ b/modules/smithy/comp_configure.go @@ -303,6 +303,20 @@ func (this *configureComp) GetSmithyTask(taskId int32) (data *cfg.GameSmithyTask return } +func (this *configureComp) GetSmithyTasks() (data []*cfg.GameSmithyTaskData, err error) { + var ( + v interface{} + ) + if v, err = this.GetConfigure(game_smithytask); err == nil { + if configure, ok := v.(*cfg.GameSmithyTask); ok { + if data = configure.GetDataList(); data != nil { + return + } + } + } + return +} + func (this *configureComp) GetSmithyMake(cid int32) (data *cfg.GameSmithyMakeData, err error) { var ( v interface{} diff --git a/modules/smithy/model_task.go b/modules/smithy/model_task.go index 71390084b..ecf08bf93 100644 --- a/modules/smithy/model_task.go +++ b/modules/smithy/model_task.go @@ -3,6 +3,8 @@ package smithy import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/event" + "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" "go_dreamfactory/pb" @@ -22,66 +24,160 @@ func (this *modelTask) Init(service core.IService, module core.IModule, comp cor this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, }) + event.Register(comm.EventBuriedComplete, this.TCondFinishNotify) return } func (this *modelTask) getTaskRecord(uid string) (*pb.DBTujianTask, error) { - tt := &pb.DBTujianTask{} + tt := &pb.DBTujianTask{Uid: uid} if err := this.Get(uid, tt); err != nil { return tt, err } return tt, nil } -func (this *modelTask) updateTaskRecord(uid string, taskId int32) error { - if !this.checkTaskStatus(uid, taskId) { - return comm.NewCustomError(pb.ErrorCode_SmithyTaskNoFinished) +func (this *modelTask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) { + this.module.Debug("铁匠铺任务通知", log.Field{Key: "uid", Value: uid}, log.Field{Key: "conds", Value: conds}) + confList, err := this.module.configure.GetSmithyTasks() + if err != nil { + this.module.Error(err.Error()) + return } + condMap := make(map[int32]*pb.ConIProgress) + for _, conf := range confList { + for _, cond := range conds { + if cond.Conid == conf.TypeId { + condMap[conf.Key] = cond + } + } + } + update := make(map[string]interface{}) dt, err := this.getTaskRecord(uid) if err != nil { if err == mongo.ErrNoDocuments { - tj := &pb.DBTujianTask{Uid: uid} - tj.Tasks = append(tj.Tasks, &pb.TujianTask{TaskId: taskId, Received: 2}) - return this.Add(uid, tj) + for k, v := range condMap { + tt := &pb.TujianTask{ + TaskId: k, + Cond: v, + } + if v.State == pb.BuriedItemFinishState_buried_finish { + tt.Received = 1 + } + dt.Tasks = append(dt.Tasks, tt) + if err := this.Add(uid, dt); err != nil { + this.module.Error(err.Error()) + return + } + return + } + } else { + this.module.Error(err.Error()) + return + } + } + + if dt.Tasks == nil { + for k, v := range condMap { + tt := &pb.TujianTask{ + TaskId: k, + Cond: v, + } + if v.State == pb.BuriedItemFinishState_buried_finish { + tt.Received = 1 + } + dt.Tasks = append(dt.Tasks, tt) + update["tasks"] = dt.Tasks + if err := this.Change(uid, update); err != nil { + this.module.Error(err.Error()) + return + } + return + } + } + + for _, t := range dt.Tasks { + for k, v := range condMap { + // update + if t.TaskId == k { + t.Cond = v + } else { + //add + dt.Tasks = append(dt.Tasks, &pb.TujianTask{ + TaskId: k, + Cond: v, + }) + } + } + } + update["tasks"] = dt.Tasks + + if len(update) > 0 { + if err := this.Change(uid, update); err != nil { + this.module.Error(err.Error()) + return + } + } +} + +func (this *modelTask) updateTaskRecord(uid string, taskId int32) error { + // if !this.checkTaskStatus(uid, taskId) { + // return comm.NewCustomError(pb.ErrorCode_SmithyTaskNoFinished) + // } + dt, err := this.getTaskRecord(uid) + if err != nil { + if err == mongo.ErrNoDocuments { + // tj := &pb.DBTujianTask{Uid: uid} + // tj.Tasks = append(tj.Tasks, &pb.TujianTask{TaskId: taskId, Received: 2}) + // return this.Add(uid, tj) + return comm.NewCustomError(pb.ErrorCode_SmithyTaskNoFinished) } return err } - taskMap := make(map[int32]int32) + // taskMap := make(map[int32]int32) update := make(map[string]interface{}) if dt.Uid != "" { for _, v := range dt.Tasks { - taskMap[v.TaskId] = v.Received + if v.TaskId == taskId { + if v.Cond != nil && v.Cond.State == pb.BuriedItemFinishState_buried_finish { + v.Received = 2 + } + } else { + return comm.NewCustomError(pb.ErrorCode_SmithyTaskNoFinished) + } + // taskMap[v.TaskId] = v.Received + // } } - } - if t, ok := taskMap[taskId]; ok { - if t == 2 { - return comm.NewCustomError(pb.ErrorCode_SmithyTaskReceived) - } else { - update["received"] = 2 - } - } else { - dt.Tasks = append(dt.Tasks, &pb.TujianTask{TaskId: taskId, Received: 2}) + // if t, ok := taskMap[taskId]; ok { + // if t == 2 { + // return comm.NewCustomError(pb.ErrorCode_SmithyTaskReceived) + // } else { + // update["received"] = 2 + // } + // } else { + // dt.Tasks = append(dt.Tasks, &pb.TujianTask{TaskId: taskId, Received: 2}) update["tasks"] = dt.Tasks } - if err := this.Change(uid, update); err != nil { - return err + if len(update) > 0 { + if err := this.Change(uid, update); err != nil { + return err + } } return nil } // 检查任务状态 -func (this *modelTask) checkTaskStatus(uid string, taskId int32) bool { - conf, _ := this.module.configure.GetSmithyTask(taskId) - if conf == nil { - return false - } - // if ec := this.module.ModuleRtask.CheckCondi(uid, conf.TypeId); ec != nil { - // return false - // } - return true -} +// func (this *modelTask) checkTaskStatus(uid string, taskId int32) bool { +// conf, _ := this.module.configure.GetSmithyTask(taskId) +// if conf == nil { +// return false +// } +// // if ec := this.module.ModuleRtask.CheckCondi(uid, conf.TypeId); ec != nil { +// // return false +// // } +// return true +// } diff --git a/modules/sociaty/api_cross_setting.go b/modules/sociaty/api_cross_setting.go index e6cbfa944..070bf7042 100644 --- a/modules/sociaty/api_cross_setting.go +++ b/modules/sociaty/api_cross_setting.go @@ -9,7 +9,12 @@ import ( // 公会设置 func (this *apiComp) SettingCheck(session comm.IUserSession, req *pb.SociatySettingReq) (errdata *pb.ErrorData) { - if len(req.Notice) > 150 || req.ApplyLv == 0 || req.Icon == "" { + if len(req.Notice) > 150 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_SociatyNoticeTextLen, + Title: pb.ErrorCode_SociatyNoticeTextLen.ToString(), + } + } else if req.ApplyLv == 0 || req.Icon == "" { errdata = &pb.ErrorData{ Code: pb.ErrorCode_ReqParameterError, Title: pb.ErrorCode_ReqParameterError.ToString(), diff --git a/modules/worldtask/api_test.go b/modules/worldtask/api_trigger.go similarity index 71% rename from modules/worldtask/api_test.go rename to modules/worldtask/api_trigger.go index 53790cc6c..bf411bfa4 100644 --- a/modules/worldtask/api_test.go +++ b/modules/worldtask/api_trigger.go @@ -5,7 +5,7 @@ import ( "go_dreamfactory/pb" ) -func (this *apiComp) TestCheck(session comm.IUserSession, req *pb.WorldtaskTestReq) (errdata *pb.ErrorData) { +func (this *apiComp) TriggerCheck(session comm.IUserSession, req *pb.WorldtaskTriggerReq) (errdata *pb.ErrorData) { if len(req.Params) < 1 { errdata = &pb.ErrorData{ Code: pb.ErrorCode_ReqParameterError, @@ -15,11 +15,11 @@ func (this *apiComp) TestCheck(session comm.IUserSession, req *pb.WorldtaskTestR return } -func (this *apiComp) Test(session comm.IUserSession, req *pb.WorldtaskTestReq) (errdata *pb.ErrorData) { - if errdata = this.TestCheck(session, req); errdata != nil { +func (this *apiComp) Trigger(session comm.IUserSession, req *pb.WorldtaskTriggerReq) (errdata *pb.ErrorData) { + if errdata = this.TriggerCheck(session, req); errdata != nil { return } - rsp := &pb.WorldtaskTestResp{Flag: true, RtaskType: req.RtaskType} + rsp := &pb.WorldtaskTriggerResp{Flag: true, RtaskType: req.RtaskType} // 校验 if req.CondiId != 0 { condIds, err := this.module.ModuleBuried.CheckCondition(session.GetUserId(), req.CondiId) @@ -50,6 +50,6 @@ func (this *apiComp) Test(session comm.IUserSession, req *pb.WorldtaskTestReq) ( rsp.Flag = true } - session.SendMsg(string(this.module.GetType()), "test", rsp) + session.SendMsg(string(this.module.GetType()), "trigger", rsp) return } diff --git a/pb/worldtask_msg.pb.go b/pb/worldtask_msg.pb.go index 1d36b91cb..a13a138b7 100644 --- a/pb/worldtask_msg.pb.go +++ b/pb/worldtask_msg.pb.go @@ -940,7 +940,7 @@ func (x *WorldtaskChapterrewardResp) GetGroupId() int32 { } // 测试使用 -type WorldtaskTestReq struct { +type WorldtaskTriggerReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -952,8 +952,8 @@ type WorldtaskTestReq struct { RtaskIds string `protobuf:"bytes,5,opt,name=rtaskIds,proto3" json:"rtaskIds"` //已完成的任务ids } -func (x *WorldtaskTestReq) Reset() { - *x = WorldtaskTestReq{} +func (x *WorldtaskTriggerReq) Reset() { + *x = WorldtaskTriggerReq{} if protoimpl.UnsafeEnabled { mi := &file_worldtask_worldtask_msg_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -961,13 +961,13 @@ func (x *WorldtaskTestReq) Reset() { } } -func (x *WorldtaskTestReq) String() string { +func (x *WorldtaskTriggerReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*WorldtaskTestReq) ProtoMessage() {} +func (*WorldtaskTriggerReq) ProtoMessage() {} -func (x *WorldtaskTestReq) ProtoReflect() protoreflect.Message { +func (x *WorldtaskTriggerReq) ProtoReflect() protoreflect.Message { mi := &file_worldtask_worldtask_msg_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -979,47 +979,47 @@ func (x *WorldtaskTestReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use WorldtaskTestReq.ProtoReflect.Descriptor instead. -func (*WorldtaskTestReq) Descriptor() ([]byte, []int) { +// Deprecated: Use WorldtaskTriggerReq.ProtoReflect.Descriptor instead. +func (*WorldtaskTriggerReq) Descriptor() ([]byte, []int) { return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{18} } -func (x *WorldtaskTestReq) GetRtaskType() int32 { +func (x *WorldtaskTriggerReq) GetRtaskType() int32 { if x != nil { return x.RtaskType } return 0 } -func (x *WorldtaskTestReq) GetParams() []int32 { +func (x *WorldtaskTriggerReq) GetParams() []int32 { if x != nil { return x.Params } return nil } -func (x *WorldtaskTestReq) GetCondiId() int32 { +func (x *WorldtaskTriggerReq) GetCondiId() int32 { if x != nil { return x.CondiId } return 0 } -func (x *WorldtaskTestReq) GetGroupId() int32 { +func (x *WorldtaskTriggerReq) GetGroupId() int32 { if x != nil { return x.GroupId } return 0 } -func (x *WorldtaskTestReq) GetRtaskIds() string { +func (x *WorldtaskTriggerReq) GetRtaskIds() string { if x != nil { return x.RtaskIds } return "" } -type WorldtaskTestResp struct { +type WorldtaskTriggerResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1029,8 +1029,8 @@ type WorldtaskTestResp struct { RtaskType int32 `protobuf:"varint,3,opt,name=rtaskType,proto3" json:"rtaskType"` } -func (x *WorldtaskTestResp) Reset() { - *x = WorldtaskTestResp{} +func (x *WorldtaskTriggerResp) Reset() { + *x = WorldtaskTriggerResp{} if protoimpl.UnsafeEnabled { mi := &file_worldtask_worldtask_msg_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1038,13 +1038,13 @@ func (x *WorldtaskTestResp) Reset() { } } -func (x *WorldtaskTestResp) String() string { +func (x *WorldtaskTriggerResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*WorldtaskTestResp) ProtoMessage() {} +func (*WorldtaskTriggerResp) ProtoMessage() {} -func (x *WorldtaskTestResp) ProtoReflect() protoreflect.Message { +func (x *WorldtaskTriggerResp) ProtoReflect() protoreflect.Message { mi := &file_worldtask_worldtask_msg_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1056,26 +1056,26 @@ func (x *WorldtaskTestResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use WorldtaskTestResp.ProtoReflect.Descriptor instead. -func (*WorldtaskTestResp) Descriptor() ([]byte, []int) { +// Deprecated: Use WorldtaskTriggerResp.ProtoReflect.Descriptor instead. +func (*WorldtaskTriggerResp) Descriptor() ([]byte, []int) { return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{19} } -func (x *WorldtaskTestResp) GetFlag() bool { +func (x *WorldtaskTriggerResp) GetFlag() bool { if x != nil { return x.Flag } return false } -func (x *WorldtaskTestResp) GetRtaskIds() []int32 { +func (x *WorldtaskTriggerResp) GetRtaskIds() []int32 { if x != nil { return x.RtaskIds } return nil } -func (x *WorldtaskTestResp) GetRtaskType() int32 { +func (x *WorldtaskTriggerResp) GetRtaskType() int32 { if x != nil { return x.RtaskType } @@ -1176,24 +1176,25 @@ var file_worldtask_worldtask_msg_proto_rawDesc = []byte{ 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x36, 0x0a, 0x1a, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 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, 0x22, 0x98, - 0x01, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 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, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x61, 0x0a, 0x11, 0x57, 0x6f, 0x72, - 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, - 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, - 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x9b, + 0x01, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 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, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x64, 0x0a, 0x14, + 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, + 0x6b, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, + 0x6b, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 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 ( @@ -1228,8 +1229,8 @@ var file_worldtask_worldtask_msg_proto_goTypes = []interface{}{ (*WorldtaskFinishIdsPush)(nil), // 15: WorldtaskFinishIdsPush (*WorldtaskChapterrewardReq)(nil), // 16: WorldtaskChapterrewardReq (*WorldtaskChapterrewardResp)(nil), // 17: WorldtaskChapterrewardResp - (*WorldtaskTestReq)(nil), // 18: WorldtaskTestReq - (*WorldtaskTestResp)(nil), // 19: WorldtaskTestResp + (*WorldtaskTriggerReq)(nil), // 18: WorldtaskTriggerReq + (*WorldtaskTriggerResp)(nil), // 19: WorldtaskTriggerResp nil, // 20: WorldtaskNexttaskPush.NextTaskEntry (*DBWorldtask)(nil), // 21: DBWorldtask (*ConIProgress)(nil), // 22: ConIProgress @@ -1483,7 +1484,7 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskTestReq); i { + switch v := v.(*WorldtaskTriggerReq); i { case 0: return &v.state case 1: @@ -1495,7 +1496,7 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskTestResp); i { + switch v := v.(*WorldtaskTriggerResp); i { case 0: return &v.state case 1: